# Enable TLS communication and proceed with API communication without authentication

**URL:** <https://forum.opensearch.org/t/enable-tls-communication-and-proceed-with-api-communication-without-authentication/16856>\
**Category:** Security\
**Tags:** discuss, configure\
**Created:** [November 28, 2023, 9:10am UTC](https://forum.opensearch.org/t/enable-tls-communication-and-proceed-with-api-communication-without-authentication/16856 "2023-11-28T09:10:53Z")\
**Posts on this page:** 2\
**Page:** 1

<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:** [November 28, 2023, 9:10am UTC](https://forum.opensearch.org/t/enable-tls-communication-and-proceed-with-api-communication-without-authentication/16856/1 "2023-11-28T09:10:54Z")

</div>

\*\*On behalf of a user of [Slack](https://opensearch.slack.com/archives/C051Y637FKK/p1700446384479649) \*\*

hello. I have one question.  
I can access my\_opensearch\_cluster with `curl -u admin:admin http://localhost:9200/_cat/health`  
I want to access my\_opensearch\_cluster with curl `http://localhost:9200/_cat/health.`  
If so, can’t I set anything other than `plugins.security.disabled: true`?  
What I want is to enable TLS communication and proceed with API communication without authentication.

I can’t enable anonymous auth.  
The login page still appears when accessing the OSD/

```auto
# config.yml (DataNode, MasterNode)

      data: #{}
        config.yml: |
          config:
            dynamic:
              http:
                anonymous_auth_enabled: true

        roles_mapping.yml: |-
          anonymous:
            backend_roles:
              - "opendistro_security_anonymous_backendrole"

        roles.yml: |-
          anonymous:
            cluster_permissions:
            - "cluster_composite_ops"
            - "cluster:monitor/main"
            index_permissions:
            - index_patterns:
              - "*"
              allowed_actions:
              - "read"

```

```auto
# opensearch_dashboard.yml ( OSD )
  config:
    opensearch_dashboards.yml: |
...

        opensearch_security:
          auth:
            anonymous_auth_enabled: true

```

---

<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:** [November 28, 2023, 10:10am UTC](https://forum.opensearch.org/t/enable-tls-communication-and-proceed-with-api-communication-without-authentication/16856/2 "2023-11-28T10:10:13Z")

</div>

Hi 싸라엘라 (띠리뷔),

To run [https://localhost:9200/\_cat/health`](https://localhost:9200/_cat/health%60) as anonymous you will need to add `cluster:monitor/health` to your `roles.yml: anonymous.cluster_permissions` :

```auto
        roles.yml: |-
          anonymous:
            cluster_permissions:
            - "cluster_composite_ops"
            - "cluster:monitor/main"
            - "cluster:monitor/health"
            index_permissions:
            - index_patterns:
              - "*"
              allowed_actions:
              - "read"

```

Please make sure to use securityadmin.sh to apply your changes, see more here: [Applying changes to configuration files - OpenSearch documentation](https://opensearch.org/docs/latest/security/configuration/security-admin/)

(Note: use fresh session on your browser (private/incognito) when testing newly applied changes)

Alternatively, for your use case, you could consider JWT authentication to skip the “The login page”,  
please see more here: [JSON Web Token - OpenSearch documentation](https://opensearch.org/docs/latest/security/authentication-backends/jwt/)

If any further questions on these topics, just let me know.

Best,  
Mantas
