Describe the issue: Members sharing at least one common backend role are not able to see the alerts or monitor definition. When I look at the monitor definition, I do not see the backend roles.
Configuration:
We have enabled this in our OS cluster.
plugins.alerting.filter_by_backend_roles: true
Relevant Logs or Screenshots: No errors or messages in the cluster or dashboard logs. The top level objects are.
We have a scenario where users cannot be in the same Domain group (onshore/offshore), how do we make sure that an alert created by onshore team is visible to offshore domain group.
@muraliv I’ve tested alerting with LDAP and backed roles. I had no issues accessing monitors with different LDAP users that share one or more backend roles.
The API below doesn’t return backend roles because they’re stored in the .opendistro-alerting-config index.
GET _plugins/_alerting/monitors/_search
This index can be searched only with a superadmin certificate defined in plugins.security.authcz.admin_dn in opensearch.yml
According to the documentation, the Alerting plugin has an additional option, plugins.alerting.filter_by_backend_roles_access_strategy, for filtering backend roles.
Did you set it in your cluster configuration?
Thank you for testing this at your end. I ran the query for a specific monitor_id and do not see the output like what you have. I have that setting set to “default” which is intersect.
@muraliv Did you run that query with the superadmin certificate as I did? Is that certificate listed in the plugins.security.authcz.admin_dn? Do you use custom or demo SSL certificates?
Only that certificate allows you to see that index content.
The problem is that the users do not share a common backend role (because of onshore vs offshore). We are looking at a workaround to make this work. I am not getting the output that includes the user info & all of the backend roles, as I am seeing in your output.
Yes, I used the admin certificate listed in the opensearch.yml file under plugins.security.authcz.admin_dn. We are using custom certificates and the cluster settings exceeding the character limit. What’s the best way to share this info ?
The interesting part is that you don’t get the monitor definition in that index; you get only metadata, and another document with _id: oXX4ap8BBk3d7Yfex3Kg should contain the definition of your monitor. As far as I’m aware, there is no setting that would split a monitor’s metadata and definition into different indices.
We have users in two locations (onshore & offshore) and they cannot share a common backend role. One of the offshore users created the monitor using the UI. We only use LDAP for authentication. The user is offline at the moment, will share the auth info as soon as I can.
I can get the monitor details in DEV tools by running this command.
GET _plugins/_alerting/monitors/_search
{
"query": {
"match_all": {}
}
}
I tried to migrate from the legacy to the new option that you shared with me and I am getting this error. Tried the migration in DEV tools and also with admin certificate.
```
{“error”:{“root_cause”:[{“type”:“illegal_state_exception”,“reason”:“No allowed indices configured”}],“type”:“illegal_state_exception”,“reason”:“No allowed indices configured”},“status”:500}
```