Hello, I followed all the instruction that you give about configuring the super admin using the admin_dn in the opensearch.yml.
However, when querying to
curl -XGET https://192.168.10.32:9200/_plugins/_security/api/nodesdn?pretty -u 'admin:12345678' --insecure --cert /opt/opensearch-2.11.1/config/opensearch-admin.pem --key /opt/opensearch-2.11.1/config/opensearch-admin-key.pem
I get as a response { }, and the following error in the log file:
[2024-02-14T16:34:44,762][INFO ][o.o.s.d.r.a.RestApiPrivilegesEvaluator] [single-1] User User [name=CN=admin,OU=O,O=O,L=O,ST=O,C=O, backend_roles=, requestedTenant=null] with Security roles [own_index] does not have any role privileged for admin access.
I am trying on a single-node cluster to troubleshoot the issue, but I have the same issue on clusters that consist more nodes.
Additionally, when I request the following:
curl -XGET https://192.168.10.32:9200/_plugins/_security/api/account?pretty --cert /opt/opensearch-2.11.1/config/opensearch-admin.pem --key /opt/opensearch-2.11.1/config/opensearch-admi
n-key.pem --insecure
I get the following result:
{
"user_name" : "CN=admin,OU=O,O=O,L=O,ST=O,C=O",
"is_reserved" : false,
"is_hidden" : false,
"is_internal_user" : false,
"user_requested_tenant" : null,
"backend_roles" : [ ],
"custom_attribute_names" : [ ],
"tenants" : {
"CN=admin,OU=O,O=O,L=O,ST=O,C=O" : true
},
"roles" : [
"own_index"
]
}
Is this okay?
Why can’t I have access to nodesdn API endpoint despite the fact that I use a superadmin certificate?
Following is my opensearch.yml file:
cluster.name: singleNode-cluster
node.name: single-1
node.roles: [cluster_manager, data, ingest]
compatibility.override_main_response_version: true
network.bind_host: 192.168.10.32
network.publish_host: 192.168.10.32
discovery.type: single-node
plugins.security.ssl.transport.pemcert_filepath: /opt/opensearch-2.11.1/config/node1.pem
plugins.security.ssl.transport.pemkey_filepath: /opt/opensearch-2.11.1/config/node1-key.pem
plugins.security.ssl.transport.pemtrustedcas_filepath: /opt/opensearch-2.11.1/config/opensearch-root-ca.pem
plugins.security.ssl.transport.enforce_hostname_verification: false
plugins.security.ssl.http.enabled: true
plugins.security.ssl.http.pemcert_filepath: /opt/opensearch-2.11.1/config/node1.pem
plugins.security.ssl.http.pemkey_filepath: /opt/opensearch-2.11.1/config/node1-key.pem
plugins.security.ssl.http.pemtrustedcas_filepath: /opt/opensearch-2.11.1/config/opensearch-root-ca.pem
plugins.security.allow_default_init_securityindex: true
plugins.security.allow_unsafe_democertificates: false
plugins.security.authcz.admin_dn:
- 'CN=admin,OU=O,O=O,L=O,ST=O,C=O'
plugins.security.nodes_dn:
- 'CN=single2.test.com,OU=O,O=O,L=O,ST=O,C=O'
plugins.security.audit.type: internal_opensearch
plugins.security.restapi.roles_enabled: ["all_access", "security_rest_api_access","security_rest_api_full_access"]
plugins.security.check_snapshot_restore_write_privileges: true
plugins.security.enable_snapshot_restore_privilege: true
plugins.security.nodes_dn_dynamic_config_enabled: true
plugins.security.system_indices.indices:
- .plugins-ml-config
- .plugins-ml-connector
- .plugins-ml-model-group
- .plugins-ml-model
- .plugins-ml-task
- .plugins-ml-conversation-meta
- .plugins-ml-conversation-interactions
- .opendistro-alerting-config
- .opendistro-alerting-alert*
- .opendistro-anomaly-results*
- .opendistro-anomaly-detector*
- .opendistro-anomaly-checkpoints
- .opendistro-anomaly-detection-state
- .opendistro-reports-*
- .opensearch-notifications-*
- .opensearch-notebooks
- .opensearch-observability
- .ql-datasources
- .opendistro-asynchronous-search-response*
- .replication-metadata-store
- .opensearch-knn-models
- .geospatial-ip2geo-data*