generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 631
Adds doc for Resource Sharing and Access Control feature #11571
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
Merged
natebower
merged 14 commits into
opensearch-project:main
from
DarshitChanpura:resource-sharing-feature
Dec 9, 2025
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
ada43e3
Adds doc for Resource Sharing and Access Control feature
DarshitChanpura e850c48
Adds a line for onboarding plugin
DarshitChanpura b736bd5
Add tech writer review.
Naarcha-AWS af0d632
Apply suggestions from code review
Naarcha-AWS 90aaf81
Adds experimental to feature-flag key
DarshitChanpura c953f00
Merge remote-tracking branch 'upstream/main' into resource-sharing-fe…
DarshitChanpura 56c887f
Merge remote-tracking branch 'upstream/main' into resource-sharing-fe…
DarshitChanpura d13cef8
Merge remote-tracking branch 'upstream/main' into resource-sharing-fe…
DarshitChanpura f3810bd
Adds resource sharing and access control documentation
DarshitChanpura 37763a4
Adds dashboards doc and makes minor mods in backend doc file
DarshitChanpura c7adfea
Doc review
kolchfa-aws 37750f7
Adds example responses
DarshitChanpura 5f04573
Merge branch 'main' into resource-sharing-feature
DarshitChanpura a2b6ae3
Apply suggestions from code review
natebower 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,135 @@ | ||
| --- | ||
| layout: default | ||
| title: Resource access management | ||
| parent: Dashboards Management | ||
| nav_order: 55 | ||
| --- | ||
|
|
||
| # Resource access management | ||
| **Introduced 3.3** | ||
| {: .label .label-purple } | ||
|
|
||
| This is an experimental feature and is not recommended for use in a production environment. For updates on the progress of the feature or if you want to leave feedback, join the discussion on the [OpenSearch forum](https://forum.opensearch.org/). | ||
| {: .warning} | ||
|
|
||
| Resource sharing in OpenSearch Dashboards provides fine-grained, document-level access control for plugin-defined resources such as machine learning (ML) model groups, anomaly detectors, report definitions, and other shareable objects. This feature extends OpenSearch's role-based access control by allowing resource owners to specify who can access a resource and what level of access they have, including read-only or read-write permissions. OpenSearch Dashboards offers a simple UI for everyday access management, while the Dev Tools console enables automation or batch operations for advanced workflows. | ||
|
|
||
| If resource sharing features are not visible in OpenSearch Dashboards, contact your OpenSearch administrator to enable the capability and assign appropriate permissions. | ||
| {: .note} | ||
|
|
||
| A **resource** is a document created by a plugin and stored in a protected system index, for example: | ||
|
|
||
| - ML model groups and models. | ||
| - Anomaly detectors. | ||
| - Reporting definitions. | ||
| - Flow framework workflows. | ||
| - Any plugin-defined resource type. | ||
|
|
||
| The following table lists the default resource access, which is determined by the user's role and relationship to the resource. | ||
|
|
||
| | User | Access | | ||
| |------------------|-----------------------------------------| | ||
| | Resource creator | Full access (view, edit, delete, share) | | ||
| | Superadmin | Full access | | ||
| | Other users | No access unless shared | | ||
|
|
||
| Once a resource is shared with specific users, roles, or backend roles, it becomes visible to those users in OpenSearch Dashboards. OpenSearch Dashboards automatically filters resource lists based on your identity, permissions, and the resource sharing configuration. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| To use resource sharing in OpenSearch Dashboards, you must fulfill the following prerequisites: | ||
|
|
||
| * **Plugin-level cluster permissions**: Assigned by an administrator; required for creating resources. | ||
| * **Resource-level sharing access**: The resource must be explicitly shared with you unless you are the owner or a superadmin. | ||
| * **Security plugin settings enabled**: Administrators must enable the following in the configuration: | ||
| ```yaml | ||
| plugins.security.experimental.resource_sharing.enabled: true | ||
| plugins.security.experimental.resource_sharing.protected_types: ["<resource-type>"] | ||
| plugins.security.system_indices.enabled: true | ||
| ``` | ||
| {% include copy.html %} | ||
|
|
||
| For more information, see [Experimental feature flags]({{site.url}}{{site.baseurl}}/install-and-configure/configuring-opensearch/experimental/). | ||
|
|
||
| ## Sharing resources using OpenSearch Dashboards | ||
|
|
||
| Follow these steps to share resources in OpenSearch Dashboards: | ||
|
|
||
| 1. Open a shareable resource: | ||
|
|
||
| * In the left navigation menu, under the **Management** section, select **Resource Access Management** (visible only if resource sharing is enabled). | ||
| * From the resource type dropdown list, choose the resource type you want to view or manage. The **Resources** table automatically displays all resources you have access to. If no resources appear, create one or ask an administrator or resource owner to share it with you. | ||
|
|
||
| 1. Choose an access level. OpenSearch Dashboards dynamically retrieves available access levels (action groups) from OpenSearch, for example: | ||
|
|
||
| * `ad_read_only` | ||
| * `ml_read_write` | ||
| * `flow_framework_full_access` | ||
| Access levels are plugin-specific and vary by resource type. | ||
| {: .note} | ||
|
|
||
| 1. Add users, roles, or backend roles: | ||
| * Specific users (for example, `alice`) | ||
| * Specific roles (for example, `data_viewer`) | ||
| * Specific backend roles (for example, `engineering_team`) | ||
|
|
||
| Wildcards (`*`) are supported for the `users` field to make a resource publicly accessible at the chosen access level. | ||
| {: .note} | ||
|
|
||
| 1. Select **Save** to update the backend configuration. Changes are applied immediately. | ||
|
|
||
| ## Viewing and managing access | ||
|
|
||
| Follow these steps to view and manage access for a resource in OpenSearch Dashboards: | ||
|
|
||
| 1. Open the **Sharing** panel: | ||
|
|
||
| * Navigate to the **Resource Access Management** app and select a resource from the **Resources** table. The panel displays: | ||
| * The resource owner. | ||
| * All users, roles, and backend roles with access. | ||
| * Their assigned access levels. | ||
| * Whether you have permission to reshare the resource. | ||
|
Check failure on line 91 in _dashboards/management/resource-sharing.md
|
||
|
|
||
| 1. Determine sharing permissions. You can share a resource only if you meet one of the following conditions: | ||
|
|
||
| * You are the owner of the resource. | ||
| * The owner shared the resource with you and granted share permission. | ||
| * You are a superadmin. | ||
|
|
||
| 1. Add or remove users, roles, or backend roles as needed. Removing access immediately hides the resource from the affected users. | ||
|
|
||
| ## Listing resources shared with you | ||
|
|
||
| OpenSearch Dashboards automatically shows only the resources you have access to. No additional actions are required. | ||
|
|
||
| Resource visibility is determined by: | ||
|
|
||
| * **Ownership** – You are the owner of the resource. | ||
| * **Sharing configuration** – The resource has been explicitly shared with you. | ||
| * **Plugin cluster permissions** – You have the necessary permissions for the resource's plugin. | ||
| * **Role or backend role membership** – Your roles grant access to the resource. | ||
| * **Public resources** – Resources shared with all users using wildcards (for example, `users: ["*"]`). | ||
|
|
||
natebower marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ## Managing resource sharing using APIs | ||
|
|
||
| You can manage resource sharing programmatically using REST APIs. These operations can only be performed if you are the owner, a superadmin, or have sharing access to the resource. You can use the command line or the **Dev Tools** console to send API requests. | ||
|
|
||
| For complete API documentation, including endpoints, parameters, and examples, see [Resource sharing APIs]({{site.url}}{{site.baseurl}}/security/access-control/resource-sharing-api/). | ||
|
|
||
| ## Troubleshooting | ||
|
|
||
| Use the following table to troubleshoot the following common issues. | ||
|
|
||
| | Issue | Possible cause | Fix | | ||
| |----------------------------------------------|----------------------------------------|----------------------------------------------------------------------------| | ||
| | `Resource Access Management` app not visible | Feature disabled | Ask admin to enable `resource_sharing.enabled` | | ||
| | User can't create resource | Missing plugin API permissions | Ask admin to map to appropriate role | | ||
| | User can't access a resource | Resource is not shared with them | Ask owner to share it with them at appropriate access level | | ||
| | API returns 403 in Dev Tools | Resource is not shared with them | Ask owner to share it with them at appropriate access level | | ||
| | Resource not listed in OpenSearch Dashboards | Resource not marked as protected | Ask admin to mark resource as protected `resource_sharing.protected_types` | | ||
| | PATCH does nothing | Access level not defined for that type | Verify plugin's action-groups | | ||
|
|
||
| ## Related documentation | ||
|
|
||
| - [Resource sharing and access control]({{site.url}}{{site.baseurl}}/security/access-control/resources/) -- Backend concepts, configuration, and setup | ||
| - [Resource sharing APIs]({{site.url}}{{site.baseurl}}/security/access-control/resource-sharing-api/) -- REST API reference for programmatic management | ||
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.