How can we search the security index?

Hi all,

I was wondering if it is possible to search the security index? Currently the security APIs only list the roles but does not offer full text search over them. This makes it difficult to find roles if the list of roles are, say a million roles.


I wonder if the answer provided here helps:

@asfoorial What is the use case?

You could also try the jq tool.

curl --insecure -u admin:admin -XGET https://localhost:9200/_plugins/_security/api/roles?pretty|jq '.readall'

1 Like

I want full text search against roles and the users inside them. Is there an easy way to do it?

To be more specific, I want to count the users whose role name starts with a specific prefix. I also want to list roles that contain users with names containing specific string.