Hello guys
Suppose there is a role:
Summary
#GET /_xpack/security/role/role-name
{
"role-name": {
"cluster": [
"monitor",
"manage_index_templates"
],
"indices": [
{
"names": [
"index1-*",
"index2-*",
"index3-*"
],
"privileges": [
"read",
"write",
"create_index"
],
"field_security": {
"grant": [
"*"
]
}
}
],
"run_as": [],
"metadata": {},
"transient_metadata": {
"enabled": true
}
}
}
What kind of request should I send to get this?:
Summary
{
"role-name": {
"cluster": [
"monitor",
"manage_index_templates"
],
"indices": [
{
"names": [
"index1-*",
"index2-*",
"index3-*"
],
"privileges": [
"read",
"write",
"create_index"
],
"field_security": {
"grant": [
"*"
]
}
},
{
"names": [
"index-other1-*"
],
"privileges": [
"read",
"write",
"create_index"
],
"field_security": {
"grant": [
"*"
]
}
}
],
"run_as": [],
"metadata": {},
"transient_metadata": {
"enabled": true
}
}
}
That is, I want to add privileges to another index.
Is there a way of not requesting current role permissions, but adding new permissions?
I tried this method, but it overwrites the data:
Summary
#PUT /_xpack/security/role/role-name
{
"indices": [
{
"names": [
"index-other1-*"
],
"privileges": [
"read",
"write",
"create_index"
],
"field_security" : {
"grant" : [
"*"
]
}
}
]
}