# Anonymous authentication does not login

**URL:** <https://forum.opensearch.org/t/anonymous-authentication-does-not-login/19610>\
**Category:** Security\
**Tags:** troubleshoot\
**Created:** [May 29, 2024, 10:00am UTC](https://forum.opensearch.org/t/anonymous-authentication-does-not-login/19610 "2024-05-29T10:00:14Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![koby058](https://avatars.discourse-cdn.com/v4/letter/k/f9ae1b/32.png) [@koby058](https://forum.opensearch.org/u/koby058)\
**Post date:** [May 29, 2024, 10:00am UTC](https://forum.opensearch.org/t/anonymous-authentication-does-not-login/19610/1 "2024-05-29T10:00:14Z")

</div>

**Versions** (relevant - OpenSearch/Dashboard/Server OS/Browser):

2.14

**Describe the issue** :  
I have trying to allow anonymous auth according to [this](https://opensearch.org/docs/latest/security/access-control/anonymous-authentication/#:~:text=To%20enable%20anonymous%20authentication%20for,of%20your%20OpenSearch%20Dashboards%20installation.&text=Anonymous%20login%20for%20OpenSearch%20Dashboards,enabled%20on%20the%20OpenSearch%20cluster.) guide

the issue is that i am getting to the log in screen and i can see the login as anonymous button but when i press it, i get a circle and getting buck to login screen

**Configuration** :

i have configure according to the guide in the link

**Relevant Logs or Screenshots** :

![image](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/2X/a/a25c4eef43b0156f7aeda7069d85afc97c218f91.png)

---

<div class="post-metadata">

**Author:** ![Mantas](https://avatars.discourse-cdn.com/v4/letter/m/7bcc69/32.png) [@Mantas](https://forum.opensearch.org/u/Mantas)\
**Post date:** [May 29, 2024, 10:10am UTC](https://forum.opensearch.org/t/anonymous-authentication-does-not-login/19610/2 "2024-05-29T10:10:33Z")

</div>

Hi @koby058 ,

Could you share your `config.yml` and `opensearch_dashboards.yml`?

Thanks,  
mj

---

<div class="post-metadata">

**Author:** ![koby058](https://avatars.discourse-cdn.com/v4/letter/k/f9ae1b/32.png) [@koby058](https://forum.opensearch.org/u/koby058)\
**Post date:** [May 29, 2024, 12:59pm UTC](https://forum.opensearch.org/t/anonymous-authentication-does-not-login/19610/3 "2024-05-29T12:59:58Z")

</div>

Hi @Mantas

Here are the files

```auto
> Blockquote
_meta:
  type: "config"
  config_version: 2

config:
  dynamic:
    # Set filtered_alias_mode to 'disallow' to forbid more than 2 filtered aliases per index
    # Set filtered_alias_mode to 'warn' to allow more than 2 filtered aliases per index but warns about it (default)
    # Set filtered_alias_mode to 'nowarn' to allow more than 2 filtered aliases per index silently
    #filtered_alias_mode: warn
    #do_not_fail_on_forbidden: false
    #kibana:
    # Kibana multitenancy
    #multitenancy_enabled: true
    #private_tenant_enabled: true
    #default_tenant: ""
    #server_username: kibanaserver
    #index: '.kibana'
    http:
      anonymous_auth_enabled:true
      xff:
        enabled: false
        internalProxies: '192\.168\.0\.10|192\.168\.0\.11' # regex pattern
        #internalProxies: '.*' # trust all internal proxies, regex pattern
        #remoteIpHeader: 'x-forwarded-for'
        ###### see https://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html for regex help
        ###### more information about XFF https://en.wikipedia.org/wiki/X-Forwarded-For
        ###### and here https://tools.ietf.org/html/rfc7239
        ###### and https://tomcat.apache.org/tomcat-8.0-doc/config/valve.html#Remote_IP_Valve
    authc:
      kerberos_auth_domain:
        http_enabled: false
        transport_enabled: false
        order: 6
        http_authenticator:
          type: kerberos
          challenge: true
          config:
            # If true a lot of kerberos/security related debugging output will be logged to standard out
            krb_debug: false
            # If true then the realm will be stripped from the user name
            strip_realm_from_principal: true
        authentication_backend:
          type: noop
      basic_internal_auth_domain:
        description: "Authenticate via HTTP Basic against internal users database"
        http_enabled: true
        transport_enabled: true
        order: 4
        http_authenticator:
          type: basic
          challenge: true
        authentication_backend:
          type: intern
      proxy_auth_domain:
        description: "Authenticate via proxy"
        http_enabled: false
        transport_enabled: false
        order: 3
        http_authenticator:
          type: proxy
          challenge: false
          config:
            user_header: "x-proxy-user"
            roles_header: "x-proxy-roles"
        authentication_backend:
          type: noop
      jwt_auth_domain:
        description: "Authenticate via Json Web Token"
        http_enabled: false
        transport_enabled: false
        order: 0
        http_authenticator:
          type: jwt
          challenge: false
          config:
            signing_key: "base64 encoded HMAC key or public RSA/ECDSA pem key"
            jwt_header: "Authorization"
            jwt_url_parameter: null
            jwt_clock_skew_tolerance_seconds: 30
            roles_key: null
            subject_key: null
        authentication_backend:
          type: noop
      clientcert_auth_domain:
        description: "Authenticate via SSL client certificates"
        http_enabled: false
        transport_enabled: false
        order: 2
        http_authenticator:
          type: clientcert
          config:
            username_attribute: cn #optional, if omitted DN becomes username
          challenge: false
        authentication_backend:
          type: noop
      ldap:
        description: "Authenticate via LDAP or Active Directory"
        http_enabled: false
        transport_enabled: false
        order: 5
        http_authenticator:
          type: basic
          challenge: false
        authentication_backend:
          # LDAP authentication backend (authenticate users against a LDAP or Active Directory)
          type: ldap
          config:
            # enable ldaps
            enable_ssl: false
            # enable start tls, enable_ssl should be false
            enable_start_tls: false
            # send client certificate
            enable_ssl_client_auth: false
            # verify ldap hostname
            verify_hostnames: true
            hosts:
            - localhost:8389
            bind_dn: null
            password: null
            userbase: 'ou=people,dc=example,dc=com'
            # Filter to search for users (currently in the whole subtree beneath userbase)
            # {0} is substituted with the username
            usersearch: '(sAMAccountName={0})'
            # Use this attribute from the user as username (if not set then DN is used)
            username_attribute: null
    authz:
      roles_from_myldap:
        description: "Authorize via LDAP or Active Directory"
        http_enabled: false
        transport_enabled: false
        authorization_backend:
          # LDAP authorization backend (gather roles from a LDAP or Active Directory, you have to configure the above LDAP authentication backend settings too)
          type: ldap
          config:
            # enable ldaps
            enable_ssl: false
            # enable start tls, enable_ssl should be false
            enable_start_tls: false
            # send client certificate
            enable_ssl_client_auth: false
            # verify ldap hostname
            verify_hostnames: true
            hosts:
            - localhost:8389
            bind_dn: null
            password: null
            rolebase: 'ou=groups,dc=example,dc=com'
            # Filter to search for roles (currently in the whole subtree beneath rolebase)
            # {0} is substituted with the DN of the user
            # {1} is substituted with the username
            # {2} is substituted with an attribute value from user's directory entry, of the authenticated user. Use userroleattribute to specify the name of the attribute
            rolesearch: '(member={0})'
            # Specify the name of the attribute which value should be substituted with {2} above
            userroleattribute: null
            # Roles as an attribute of the user entry
            userrolename: disabled
            #userrolename: memberOf
            # The attribute in a role entry containing the name of that role, Default is "name".
            # Can also be "dn" to use the full DN as rolename.
            rolename: cn
            # Resolve nested roles transitive (roles which are members of other roles and so on ...)
            resolve_nested_roles: true
            userbase: 'ou=people,dc=example,dc=com'
            # Filter to search for users (currently in the whole subtree beneath userbase)
            # {0} is substituted with the username
            usersearch: '(uid={0})'
            # Skip users matching a user name, a wildcard or a regex pattern
            #skip_users:
            # - 'cn=Michael Jackson,ou*people,o=TEST'
            # - '/\S*/'
      roles_from_another_ldap:
        description: "Authorize via another Active Directory"
        http_enabled: false
        transport_enabled: false
        authorization_backend:
          type: ldap
          #config goes here ...

DASHBOARD
opensearch.hosts: [https://localhost:9200]
opensearch.ssl.verificationMode: none
opensearch.username: kibanaserver
opensearch.password: kibanaserver
opensearch.requestHeadersWhitelist: [authorization, securitytenant]

# anonymous 1 lines added
opensearch_security.auth.anonymous_auth_enabled: true

opensearch_security.multitenancy.enabled: true
opensearch_security.multitenancy.tenants.preferred: [Private, Global]
opensearch_security.readonly_mode.roles: [kibana_read_only]
opensearch_security.openid.root_ca: /etc/ssl/certs/ca-certificates.crt
# Use this setting if you are running opensearch-dashboards without https
opensearch_security.cookie.secure: false

```

---

<div class="post-metadata">

**Author:** ![koby058](https://avatars.discourse-cdn.com/v4/letter/k/f9ae1b/32.png) [@koby058](https://forum.opensearch.org/u/koby058)\
**Post date:** [June 2, 2024, 12:35pm UTC](https://forum.opensearch.org/t/anonymous-authentication-does-not-login/19610/4 "2024-06-02T12:35:00Z")

</div>

Can any one help with this ?

---

<div class="post-metadata">

**Author:** ![Mantas](https://avatars.discourse-cdn.com/v4/letter/m/7bcc69/32.png) [@Mantas](https://forum.opensearch.org/u/Mantas)\
**Post date:** [June 4, 2024, 10:57am UTC](https://forum.opensearch.org/t/anonymous-authentication-does-not-login/19610/5 "2024-06-04T10:57:50Z")

</div>

Hi @koby058,

Could you please run the below and share the output:

`curl --insecure -u <admin_username>:<admin_password> -XGET https://<OS_node>:9200/_plugins/_security/api/securityconfig?pretty`

Thanks,  
mj

---

<div class="post-metadata">

**Author:** ![Mantas](https://avatars.discourse-cdn.com/v4/letter/m/7bcc69/32.png) [@Mantas](https://forum.opensearch.org/u/Mantas)\
**Post date:** [June 4, 2024, 1:35pm UTC](https://forum.opensearch.org/t/anonymous-authentication-does-not-login/19610/6 "2024-06-04T13:35:01Z")

</div>

One more thing, have you defined anonymous authentication privileges?

more info here: [https://opensearch.org/docs/latest/security/access-control/anonymous-authentication/#defining-anonymous-authentication-privileges](https://opensearch.org/docs/latest/security/access-control/anonymous-authentication/#defining-anonymous-authentication-privileges)

Best,  
mj

---

<div class="post-metadata">

**Author:** ![koby058](https://avatars.discourse-cdn.com/v4/letter/k/f9ae1b/32.png) [@koby058](https://forum.opensearch.org/u/koby058)\
**Post date:** [June 5, 2024, 12:38pm UTC](https://forum.opensearch.org/t/anonymous-authentication-does-not-login/19610/7 "2024-06-05T12:38:41Z")

</div>

Hi @Mantas  
here is the command output"

about your 2nd question i did add both configuration to both of the files as is no change made

> Blockquote  
> {  
> “config” : {  
> “dynamic” : {  
> “filtered\_alias\_mode” : “warn”,  
> “disable\_rest\_auth” : false,  
> “disable\_intertransport\_auth” : false,  
> “respect\_request\_indices\_options” : false,  
> “kibana” : {  
> “multitenancy\_enabled” : true,  
> “private\_tenant\_enabled” : true,  
> “default\_tenant” : “”,  
> “server\_username” : “kibanaserver”,  
> “index” : “.kibana”,  
> “sign\_in\_options” : [  
> “BASIC”  
> ]  
> },  
> “http” : {  
> “anonymous\_auth\_enabled” : false,  
> “xff” : {  
> “enabled” : false,  
> “internalProxies” : “192\.168\.0\.10|192\.168\.0\.11”,  
> “remoteIpHeader” : “X-Forwarded-For”  
> }  
> },  
> “authc” : {  
> “jwt\_auth\_domain” : {  
> “http\_enabled” : false,  
> “order” : 0,  
> “http\_authenticator” : {  
> “challenge” : false,  
> “type” : “jwt”,  
> “config” : {  
> “signing\_key” : “base64 encoded HMAC key or public RSA/ECDSA pem key”,  
> “jwt\_header” : “Authorization”,  
> “jwt\_clock\_skew\_tolerance\_seconds” : 30  
> }  
> },  
> “authentication\_backend” : {  
> “type” : “noop”,  
> “config” : { }  
> },  
> “description” : “Authenticate via Json Web Token”  
> },  
> “ldap” : {  
> “http\_enabled” : false,  
> “order” : 5,  
> “http\_authenticator” : {  
> “challenge” : false,  
> “type” : “basic”,  
> “config” : { }  
> },  
> “authentication\_backend” : {  
> “type” : “ldap”,  
> “config” : {  
> “enable\_ssl” : false,  
> “enable\_start\_tls” : false,  
> “enable\_ssl\_client\_auth” : false,  
> “verify\_hostnames” : true,  
> “hosts” : [  
> “localhost:8389”  
> ],  
> “userbase” : “ou=people,dc=example,dc=com”,  
> “usersearch” : “(sAMAccountName={0})”  
> }  
> },  
> “description” : “Authenticate via LDAP or Active Directory”  
> },  
> “basic\_internal\_auth\_domain” : {  
> “http\_enabled” : true,  
> “order” : 4,  
> “http\_authenticator” : {  
> “challenge” : true,  
> “type” : “basic”,  
> “config” : { }  
> },  
> “authentication\_backend” : {  
> “type” : “intern”,  
> “config” : { }  
> },  
> “description” : “Authenticate via HTTP Basic against internal users database”  
> },  
> “proxy\_auth\_domain” : {  
> “http\_enabled” : false,  
> “order” : 3,  
> “http\_authenticator” : {  
> “challenge” : false,  
> “type” : “proxy”,  
> “config” : {  
> “user\_header” : “x-proxy-user”,  
> “roles\_header” : “x-proxy-roles”  
> }  
> },  
> “authentication\_backend” : {  
> “type” : “noop”,  
> “config” : { }  
> },  
> “description” : “Authenticate via proxy”  
> },  
> “clientcert\_auth\_domain” : {  
> “http\_enabled” : false,  
> “order” : 2,  
> “http\_authenticator” : {  
> “challenge” : false,  
> “type” : “clientcert”,  
> “config” : {  
> “username\_attribute” : “cn”  
> }  
> },  
> “authentication\_backend” : {  
> “type” : “noop”,  
> “config” : { }  
> },  
> “description” : “Authenticate via SSL client certificates”  
> },  
> “kerberos\_auth\_domain” : {  
> “http\_enabled” : false,  
> “order” : 6,  
> “http\_authenticator” : {  
> “challenge” : true,  
> “type” : “kerberos”,  
> “config” : {  
> “krb\_debug” : false,  
> “strip\_realm\_from\_principal” : true  
> }  
> },  
> “authentication\_backend” : {  
> “type” : “noop”,  
> “config” : { }  
> }  
> }  
> },  
> “authz” : {  
> “roles\_from\_another\_ldap” : {  
> “http\_enabled” : false,  
> “authorization\_backend” : {  
> “type” : “ldap”,  
> “config” : { }  
> },  
> “description” : “Authorize via another Active Directory”  
> },  
> “roles\_from\_myldap” : {  
> “http\_enabled” : false,  
> “authorization\_backend” : {  
> “type” : “ldap”,  
> “config” : {  
> “enable\_ssl” : false,  
> “enable\_start\_tls” : false,  
> “enable\_ssl\_client\_auth” : false,  
> “verify\_hostnames” : true,  
> “hosts” : [  
> “localhost:8389”  
> ],  
> “rolebase” : “ou=groups,dc=example,dc=com”,  
> “rolesearch” : “(member={0})”,  
> “userrolename” : “disabled”,  
> “rolename” : “cn”,  
> “resolve\_nested\_roles” : true,  
> “userbase” : “ou=people,dc=example,dc=com”,  
> “usersearch” : “(uid={0})”  
> }  
> },  
> “description” : “Authorize via LDAP or Active Directory”  
> }  
> },  
> “auth\_failure\_listeners” : { },  
> “do\_not\_fail\_on\_forbidden” : false,  
> “multi\_rolespan\_enabled” : true,  
> “hosts\_resolver\_mode” : “ip-only”,  
> “do\_not\_fail\_on\_forbidden\_empty” : false,  
> “on\_behalf\_of” : {  
> “enabled” : false  
> }  
> }  
> }

---

<div class="post-metadata">

**Author:** ![Mantas](https://avatars.discourse-cdn.com/v4/letter/m/7bcc69/32.png) [@Mantas](https://forum.opensearch.org/u/Mantas)\
**Post date:** [June 5, 2024, 12:53pm UTC](https://forum.opensearch.org/t/anonymous-authentication-does-not-login/19610/8 "2024-06-05T12:53:37Z")

</div>

> [@koby058](#):
>
> “anonymous\_auth\_enabled” : false,

Hi @koby058,

You will need to run `securityadmin.sh` to load the updated config files into the index.

Here is how to do so and more: [Applying changes to configuration files - OpenSearch Documentation](https://opensearch.org/docs/latest/security/configuration/security-admin/)

let me know if you get stuck and need help with it.

Best,  
mj

---

<div class="post-metadata">

**Author:** ![koby058](https://avatars.discourse-cdn.com/v4/letter/k/f9ae1b/32.png) [@koby058](https://forum.opensearch.org/u/koby058)\
**Post date:** [June 6, 2024, 7:23am UTC](https://forum.opensearch.org/t/anonymous-authentication-does-not-login/19610/9 "2024-06-06T07:23:04Z")

</div>

Hi @Mantas

Thanks a lot it is now works
