Repository navigation
Docs: Add OpenSearch FGAC permissions guide #599
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Shahzeb-DataEngineer
wants to merge
2
commits into
open-metadata:main
Choose a base branch
from
Shahzeb-DataEngineer:docs/opensearch-fgac-permissions
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,128 @@ | ||
| --- | ||
| title: "OpenSearch Fine-Grained Access Control Permissions" | ||
| description: "Minimal OpenSearch security permissions required by the OpenMetadata server backend when running against a security-enabled cluster." | ||
| sidebarTitle: "OpenSearch FGAC Permissions" | ||
| collate: false | ||
| --- | ||
|
|
||
| # OpenSearch Fine-Grained Access Control Permissions | ||
|
|
||
| When OpenMetadata runs against a security-enabled OpenSearch cluster — for example, | ||
| Amazon OpenSearch Service with fine-grained access control (FGAC), or a self-managed | ||
| cluster with the security plugin — the OpenMetadata server role does **not** need | ||
| admin-level access. This page lists the minimal set of index patterns and cluster | ||
| permissions the server backend requires. | ||
|
|
||
| <Info> | ||
| **Scope:** OpenMetadata **2.0.x**, OpenSearch backend only. The Elasticsearch backend | ||
| is not covered here. This list was compiled by auditing the search-client source | ||
| code of the 2.0.5 release. Permission requirements can change between releases — | ||
| validate in a non-production environment before applying least-privilege roles in | ||
| production. | ||
| </Info> | ||
|
|
||
| ## How OpenMetadata uses OpenSearch | ||
|
|
||
| The server backend writes to two kinds of targets, both namespaced by the | ||
| `clusterAlias` setting (default: `openmetadata`): | ||
|
|
||
| - **Entity indexes and aliases** — one index per entity type, named | ||
| `<clusterAlias>_<entityType>` (for example `openmetadata_table_search_index`). | ||
| - **Data Insights data streams** — `<clusterAlias>-di-data-assets-<entityType>` | ||
| (for example `openmetadata-di-data-assets-table`). | ||
|
|
||
| ## Index patterns | ||
|
|
||
| Grant index-level permissions on these patterns (replace `<prefix>` with your | ||
| `clusterAlias`): | ||
|
|
||
| | Pattern | Used for | | ||
| |---|---| | ||
| | `<prefix>_*` | Entity indexes and aliases | | ||
| | `<prefix>-di-*` | Data Insights data streams | | ||
|
|
||
| <Note> | ||
| On 2.x the Data Insights lifecycle (rollover) runs application-side, so the | ||
| `.ds-<prefix>-di-*` backing-index pattern required by 1.x ISM policies is no | ||
| longer needed for fresh 2.x deployments. If you are migrating from 1.x, keep it | ||
| until the migration cleanup has removed the old ISM policies. | ||
| </Note> | ||
|
|
||
| ## Cluster permissions | ||
|
|
||
| | Permission | When needed | | ||
| |---|---| | ||
| | `cluster:monitor/*` | Always — cluster health, stats, settings and nodes info | | ||
| | `cluster_composite_ops` | Always — bulk indexing and multi-search | | ||
| | `indices:admin/index_template/*` | Always — create and delete index templates | | ||
| | `cluster:admin/index_template/*` | Always — create and delete index templates | | ||
| | `indices:admin/component_template/*` | Always — create and delete component templates | | ||
| | `cluster:admin/component_template/*` | Always — create and delete component templates | | ||
| | `cluster:admin/opendistro/ism/policy/*` | Only when migrating 1.x → 2.x — deletes the legacy DI lifecycle policies; not needed for fresh 2.x deployments | | ||
| | `cluster:admin/search/pipeline/*` | Optional — only for deployments still serving hybrid search through the legacy named pipeline; 2.x inlines pipelines in the search request, which needs no cluster privilege | | ||
|
|
||
| ## Index-level operations | ||
|
|
||
| All operations run against the index patterns above and need no extra | ||
| cluster privilege: index creation, search, multi-get, document get/index/update/delete, bulk, | ||
| delete-by-query, update-by-query, reindex, force merge, index settings and | ||
| mapping updates, alias management, and data-stream create/delete/get/rollover. | ||
|
|
||
| ## Example security role | ||
|
|
||
| Below is a ready-to-use OpenSearch security-plugin role for a 2.0.x deployment | ||
| with `clusterAlias: openmetadata`. Adjust the prefix to match your configuration. | ||
|
|
||
| ```json | ||
| { | ||
| "cluster_permissions": [ | ||
| "cluster:monitor/*", | ||
| "cluster_composite_ops", | ||
| "indices:admin/index_template/*", | ||
| "cluster:admin/index_template/*", | ||
| "indices:admin/component_template/*", | ||
| "cluster:admin/component_template/*" | ||
| ], | ||
| "index_permissions": [ | ||
| { | ||
| "index_patterns": ["openmetadata_*", "openmetadata-di-*"], | ||
| "allowed_actions": [ | ||
| "crud", | ||
| "create_index", | ||
| "indices:data/write/bulk*", | ||
| "indices:data/write/delete_by_query", | ||
| "indices:data/write/update_by_query", | ||
| "indices:data/write/reindex", | ||
| "indices:admin/forcemerge", | ||
| "indices:admin/settings/update", | ||
| "indices:admin/mapping/put", | ||
| "indices:admin/aliases*", | ||
| "indices:admin/data_stream/*", | ||
| "indices:admin/rollover", | ||
| "indices:admin/refresh" | ||
| ] | ||
| } | ||
| ], | ||
| "tenant_permissions": [] | ||
| } | ||
| ``` | ||
|
|
||
| <Tip> | ||
| On Amazon OpenSearch Service with FGAC, map this role to the IAM role or user | ||
| OpenMetadata authenticates with (for example via IRSA) in **Security → Roles → | ||
| Mapped users**. The server connects with SigV4 signing when IRSA is configured. | ||
| </Tip> | ||
|
|
||
| ## Permission changes across releases | ||
|
|
||
| Releases sometimes add OpenSearch calls that require new permissions. Notable | ||
| changes: | ||
|
|
||
| - **1.6.6** — Data Insights data streams, templates and the ISM policy started | ||
| using the `clusterAlias` prefix (`<prefix>-di-data-assets-*`). Roles scoped to | ||
| an unprefixed pattern break in either upgrade direction. | ||
| - **1.13.x** — Added reindex, force merge, index settings updates and search | ||
| pipelines for hybrid search, expanding the required surface versus 1.6.x. | ||
| - **2.0.x** — ISM policy management removed (lifecycle is now application-side | ||
| rollover); the named hybrid-search pipeline became best-effort, so | ||
| `cluster:admin/search/pipeline/*` is optional. | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Potential P2] Include index creation in the example security role
Copying this ready-to-use role for an OpenMetadata 2.0.5 server denies creation of its entity search indexes:
crudgrants data reads/writes, but no listed action grantsindices:admin/create. The pinned 2.0.5OpenSearchIndexManagerexplicitly callsclient.indices().create(...), so initializing or rebuilding missing indexes cannot complete with this role alone. Addcreate_index(orindices:admin/create) on the entity index pattern and verify the complete role on a fresh FGAC deployment.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, thanks. Verified against the 2.0.5 OpenSearchIndexManager, which calls client.indices().create(...) when initializing missing indexes, and crud does not grant indices:admin/create. Added the create_index action group to the example role and mentioned index creation in the operations list.