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_ACCESS_CONTROL_FOR_PLUGINS.md
+14-52Lines changed: 14 additions & 52 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,9 +16,9 @@ This feature ensures **secure** and **controlled** access to shareableResources
16
16
This feature introduces **one primary component** for plugin developers:
17
17
18
18
### **1. `opensearch-security-spi`**
19
-
- A **Service Provider Interface (SPI)** that plugins must implement to declare themselves as **Resource Plugins**.
19
+
- A **Service Provider Interface (SPI)** that provides `ResourceSharingExtension` interface that plugins must implement to declare themselves as **Resource Plugins**.
20
20
- The security plugin keeps track of these plugins (similar to how JobScheduler tracks `JobSchedulerExtension`).
21
-
-Allows resource plugins to utilize a **service provider client** to implement access control.
21
+
-Provides resource plugins with a **client** to implement access control.
22
22
23
23
### **Plugin Implementation Requirements:**
24
24
@@ -42,16 +42,14 @@ opensearchplugin {
42
42
}
43
43
```
44
44
-**Implement** the `ResourceSharingExtension` class.
45
-
-**Ensure** that its declared resources implement the `Resource` interface.
46
45
-**Ensure** that each resource index only contains 1 type of resource.
47
-
-**Provide a resource parser**, which the security plugin uses to extract resource details from the resource index.
48
46
-**Register itself** in `META-INF/services` by creating the following file:
- This file must contain a **single line** specifying the **fully qualified class name** of the plugin’s `ResourceSharingExtension` implementation, e.g.:
### **Calling Access Control Methods from the ResourceSharingClient Client**
223
186
The client provides **four access control methods** for plugins. For detailed usage and implementation, refer to the [`opensearch-security-spi` README.md](./spi/README.md#available-java-apis)
224
187
@@ -230,20 +193,20 @@ The client provides **four access control methods** for plugins. For detailed us
Copy file name to clipboardExpand all lines: spi/README.md
+78-90Lines changed: 78 additions & 90 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,49 +5,19 @@ This **Service Provider Interface (SPI)** provides the necessary **interfaces an
5
5
6
6
### **Resource Sharing and Access Control Extension**
7
7
8
-
This **Service Provider Interface (SPI)** provides an extension point to implement **Resource Sharing and Access Control** in OpenSearch.
8
+
This extension point provides extending plugins with interfaces necessary to implement **Resource Sharing and Access Control** in OpenSearch.
9
9
10
10
---
11
11
12
12
### **Usage**
13
13
14
14
A plugin that **defines a resource** and aims to implement **access control** over that resource must **extend** the `ResourceSharingExtension` class to register itself as a **Resource Plugin**.
0 commit comments