security icon indicating copy to clipboard operation
security copied to clipboard

[FEATURE] Read-only access to security plugin resources (eg. roles, mappings)

Open riconnon opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? We run terraform in our CI environment and would like to use the opensearch provider. On PRs we run with an identity that has only read-only credentials, and need to be able to grant read-only access to read resources such as roles, role mappings, etc. to that identity.

What solution would you like? Create permissions to allow read-only access to security plugin resources available in the terraform provider.

What alternatives have you considered? N/A

Do you have any additional context? N/A

riconnon avatar Dec 03 '24 17:12 riconnon

I believe this is possible using the plugins.security.restapi.endpoints_disabled.{role}.{endpoint}: [HTTP Verbs...] setting.

See example below from opensearch.yml.example below:

# Disable particular endpoints and their HTTP methods for roles. 
# By default all endpoints/methods are allowed.
#plugins.security.restapi.endpoints_disabled.<role>.<endpoint>: <array of http methods>
# Example:
#plugins.security.restapi.endpoints_disabled.all_access.ACTIONGROUPS: ["PUT","POST","DELETE"]
#plugins.security.restapi.endpoints_disabled.xyz_role.LICENSE: ["DELETE"]

cwperks avatar Dec 09 '24 16:12 cwperks

@riconnon Is the ask to define a role in the configuration or use an existing role to grant read_only access? If latter is true, then @cwperks comment above should work as a solution.

DarshitChanpura avatar Feb 17 '25 16:02 DarshitChanpura