You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: RESOURCE_SHARING_AND_ACCESS_CONTROL.md
+43-44Lines changed: 43 additions & 44 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,6 +75,7 @@ opensearchplugin {
75
75
```
76
76
-**Implement** the `ResourceSharingExtension` interface. For guidance, refer [SPI README.md](./spi/README.md#4-implement-the-resourcesharingextension-interface).
77
77
-**Implement** the `ResourceSharingClientAccessor` wrapper class to access ResourceSharingClient. Refer [SPI README.md](./spi/README.md#5-implement-the-resourcesharingclientaccessor-class).
78
+
- If plugin implements search, add a **plugin client** if not already present. Can be copied from sample-plugin's [PluginClient.java](./sample-resource-plugin/src/main/java/org/opensearch/sample/utils/PluginClient.java).
78
79
-**Ensure** that each resource index only contains 1 type of resource.
79
80
-**Register itself** in `META-INF/services` by creating the following file:
80
81
```
@@ -129,10 +130,28 @@ resource_types:
129
130
- "cluster:admin/sample-resource-plugin/*"
130
131
- "cluster:admin/security/resource/share"
131
132
```
133
+
- If your plugin enabled testing with security, add the following to you node-setup for `integTest` task:
Each plugin receives its own sharing index, centrally managed by security plugin, which stores **resource access metadata**, mapping **resources to their access control policies**.
SPI ->> Security: Sends request to Security Plugin for processing
405
404
406
405
%% Step 5: Security Plugin handles request and returns response
407
-
Security-->>SPI:Response (AccessGranted or Denied/ResourceShared or Revoked/ListResourceIDs )
406
+
Security -->> SPI: Response (Access Granted or Denied / Resource Shared or Revoked / List Resource IDs / Feature Enabled or Disabled for Resource Type)
408
407
409
408
%% Step 6: Security SPI sends response back to Plugin
410
409
SPI -->> Plugin: Passes processed response back to Plugin
@@ -628,19 +627,19 @@ Read documents from a plugin’s index and migrate ownership and backend role-ba
Copy file name to clipboardExpand all lines: sample-resource-plugin/src/integrationTest/java/org/opensearch/sample/resource/securityapis/MigrateApiTests.java
Copy file name to clipboardExpand all lines: src/main/java/org/opensearch/security/resources/migrate/MigrateResourceSharingInfoApiAction.java
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -76,7 +76,7 @@
76
76
* source_index: "abc", // name of plugin index
77
77
* username_path: "/path/to/username/node", // path to user-name in resource document in the plugin index
78
78
* backend_roles_path: "/path/to/user_backend-roles/node" // path to backend-roles in resource document in the plugin index
79
-
* default_access_level: "<some-default-access-level>" // default value that should replace the otherwise ResourceAccessLevels.PLACE_HOLDER assigned to the new ResourceSharing object
79
+
* default_access_level: "<some-default-access-level>" // default access-level at which sharing records should be created
80
80
* }
81
81
* - Response:
82
82
* 200 OK Migration Complete. Migrate X, skippedNoUser Y, failed Z // migrate -> successful migration count, skippedNoUser -> records with no creator info, failed -> records that failed to migrate
0 commit comments