Describe the issue:
I would like to have opensearch configured such as user can either login (via ldap) and do what ever they need to based on their roles or have an anonymous user with RO access.
i know that the 2 things can be done separetly (we use ldap today) and i’ve seen (but never understood how to configure) the anonymous user with https://playground.opensearch.org
The reason for the anonymous use is iframe embedding of some dashboards…
with Elastic the configuration was straight forward but with opensearch i am struggling to understand how that would be done…
i hope that’s actually possible with the help if the multiple-authentication options feature just added
Multiple Authentication Option feature for OpenSearch Dashboards can also enable anonymous login along with Basic authentication and OIDC. Configuration Steps:
Follow the instructions to enable multiple authentication for basic and OIDC
Authentication type: openid defined by OpenSearch Dashboards is based on OpenID Connect (OIDC) protocol. If I did not misunderstood, you configure LDAP as your authentication backend for basic authentication. If that is true, you do not need to enable multiple authentication. You can follow the steps in below:
Follow the instructions to enable basic auth with LDAP as authentication backend
The problem i see is that if i land on the dashboard page i get automatically logged in as “opendistro_security_anonymous” and there is no button “log in as anonymous”.
to login with username and password i must first log out from anonymous, then enter my credentials
That is the expected behavior for anonymous login for now. If you have any feedbacks on the existing authentication experience, please feel free to leave your feedbacks on:
Hi @anubisg1, I was wondering if you were able to reach this phase of logging in as anonymous. I am not able to do that even though I followed the documentation and applied exactly the changes in config.yml and opensearch_dashboards.yml. Your help is much appreciated
Thank you so much @pablo I am able to see Log in as anonymous.
But whenever I try to log in as anonymous, it gives me unauthorized. Did do you add any additional configuration? How were you able to log in as anonymous?
Set “anonymous_auth_enabled” to true in config.yml
Add this line in opensearch_dashboards.yml:
opensearch_security.auth.anonymous_auth_enabled: true
Add this in roles.yml:
opendistro_security_anonymous:
cluster_permissions:
“unlimited”
index_permissions:
index_patterns:
“*”
allowed_actions:
“unlimited”
tenant_permissions:
tenant_patterns:
“global_tenant”
allowed_actions:
“kibana_all_write”
Add this in roles_mapping.yml:
opendistro_security_anonymous:
backend_roles:
“opendistro_security_anonymous_backendrole”
Am I missing something here? Because I am still not able to login via anonymous.
I tried to login with an empty username and an empty password but it gives me 401 unauthorized
@MelissaL I was able reproduce the “Unauthorized” error only when config.dynamic.http.anonymous_auth_domain was set to false.
The last API should tell you if it is enabled inside the cluster. If you have the OpenSearch as a service then restarting the service won’t update the configuration. Also, it won’t update the config if you use the docker and you just restart it.
Once the security index is created the only way to update it is securityadmin.sh script.