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: README.md
+144Lines changed: 144 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,7 @@ OpenSearch Security is a plugin for OpenSearch that offers encryption, authentic
22
22
-[Installation](#installation)
23
23
-[Test and Build](#test-and-build)
24
24
-[Config hot reloading](#config-hot-reloading)
25
+
-[Resource Sharing API](#resource-sharing-api)
25
26
-[Onboarding new APIs](#onboarding-new-apis)
26
27
-[System Index Protection](#system-index-protection)
27
28
-[Contributing](#contributing)
@@ -113,6 +114,149 @@ The Security Plugin configuration is stored in a dedicated index in OpenSearch i
113
114
* Configuration changes do not require a restart
114
115
* Configuration changes take effect immediately
115
116
117
+
## Resource Sharing API
118
+
119
+
The Security Plugin, starting v3.2.0, introduces a share API that can be used by opensearch-dashboards and/or REST client to enable resource-owners to share their resources. A resource is currently defined as a document in an index. The feature grants creators of the document access to share it with other entities, i.e., users, roles or backend_roles.
120
+
The feature is proposed in this GitHub issue: https://github.com/opensearch-project/security/issues/4500
Returns the current sharing configuration for a resource.
229
+
230
+
**Query Parameters:**
231
+
232
+
*`resource_id` (required)
233
+
*`resource_index` (required)
234
+
235
+
**Example Request:**
236
+
237
+
```
238
+
GET /_plugins/_security/api/resource/share?resource_id=resource-123&resource_index=my-resource-index
239
+
```
240
+
241
+
**Success Response:**
242
+
243
+
```json
244
+
{
245
+
"sharing_info": {
246
+
"resource_id": "resource-123",
247
+
"created_by": { "username": "admin" },
248
+
"share_with": {
249
+
"read_only": {
250
+
"users": ["charlie"],
251
+
"roles": ["readers"],
252
+
"backend_roles": ["data-readers"]
253
+
},
254
+
"read_write": {}
255
+
}
256
+
}
257
+
}
258
+
```
259
+
116
260
## Onboarding new APIs
117
261
118
262
It is common practice to create new transport actions to perform different tasks between nodes when developing new APIs. For any new or existing plugins that want to onboard & integrate these actions with security, they should follow the steps below:
0 commit comments