How to manage the permission of indices

Hi
I have a requirement
i have enable SAML authentication in ELK, i have assigned user in different group on the AD side.
so the SAML attributes contain the group message of user.
so i want to assigned user different permission to access the indices.
for example
group A only have the read permission of index"helloworldA"
group B have the read and write permission of index "hellowroldA"

group C only have the read permission of index"helloworldB"
group D have the read and write permission of index"hellowroldB"

can you tell me how to configure it.

This isn't a Logstash question. I suggest you edit your post and move it to the X-Pack category.

You need to create a role for each of the different sets of permissions you want.
In your case it looks like you need 4 roles.

Then you use role mapping to assign different roles based on the SAML attributes.
Haven't we already discussed this?