OpenDistro - Security - Roles or permissions for a user to create other users only


I am trying to create a user, say usr-creator, who will have permissions to create other ‘Internal users’. I am able to create Roles, Action groups with permissions using root user.

I am working with AWS Elasticsearch service, so I can setup a Lambda to use Security API - Open Distro Documentation to get this done programmatically. But that’d be additional effort.

I do not want to give them root or admin access. So, is it possible for me to assign only user create permissions to the user - usr-creator to get this done from the UI?

Thanks for reading through.

Prashanth Sripathi

You can use below settings in opensearch.yml to control the rest api access: ["usr-creator"] ["PATCH","POST", "DELETE"] ["PUT", "GET", "POST", "DELETE", "PATCH"] ["PUT", "GET","POST", "DELETE", "PATCH"] ["PUT","GET", "POST", "DELETE", "PATCH"] ["PUT","GET", "POST", "DELETE", "PATCH"] ["PUT","GET","POST", "DELETE", "PATCH"] ["PUT", "GET","POST", "DELETE", "PATCH"]

Opendistro syntax is:


I haven’t used this much, but from quick testing, it seems that the update and create api both use PUT. Meaning the user will be able to not only create users, but also update existing one (change passwords, backend roles and attributes.)

Not sure if this will suffice for your use-case

You can also remove the GET, preventing the user from seeing created users and therefore preventing updating existing users through the UI, but this will not prevent them using curl with the PUT request to update those users.
Hopefully in the future these update api will be using PATCH and therefore can be filtered using this method.
Hope this helps