Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
opensearch-2.5.0-1.x86_64
Describe the issue:
when I try to runsecurityadmin.sh script
Configuration:
single server on RHEL 8.7
in opensearch.yml file
plugins.security.disabled: false
#plugins.security.disabled: true
plugins.security.ssl.transport.pemcert_filepath: /etc/opensearch/opensearch-poc.pem
plugins.security.ssl.transport.pemkey_filepath: /etc/opensearch/opensearch-poc-key.pem
plugins.security.ssl.transport.pemtrustedcas_filepath: /etc/opensearch/root-ca.pem
plugins.security.ssl.http.enabled: true
plugins.security.ssl.http.pemcert_filepath: /etc/opensearch/opensearch-poc.pem
plugins.security.ssl.http.pemkey_filepath: /etc/opensearch/opensearch-poc-key.pem
plugins.security.ssl.http.pemtrustedcas_filepath: /etc/opensearch/root-ca.pem
plugins.security.allow_default_init_securityindex: true
plugins.security.authcz.admin_dn:
- “CN=A,OU=xxxx at xxx,O=Xxxx xx Xxxxxx,L=Xx Xxxx,ST=Xxxxxxx,C=US”
plugins.security.nodes_dn: - ‘CN=opensearch-poc-1.xxx.xxx.xxx.xx,OU=xxxx at xxx,O=Xxxx xx Xxxxxx,L=Xx Xxxx,ST=Xxxxxxx,C=US’
plugins.security.audit.type: internal_opensearch
plugins.security.enable_snapshot_restore_privilege: true
plugins.security.check_snapshot_restore_write_privileges: true
plugins.security.restapi.roles_enabled: [“all_access”, “security_rest_api_access”]
Relevant Logs or Screenshots:
[root@opensearch-dev-1 opensearch]# cd /usr/share/opensearch/plugins/opensearch-security/tools
[root@opensearch-dev-1 tools]# OPENSEARCH_JAVA_HOME=/usr/share/opensearch/jdk ./securityadmin.sh -cd /etc/opensearch/opensearch-security/ -cacert /etc/opensearch/root-ca.pem -cert /etc/opensearch/admin.pem -key /etc/opensearch/admin-key.pem -icl -nhnv
** This tool will be deprecated in the next major release of OpenSearch **
** [DEPRECATION] Security Plugin Tools will be replaced · Issue #1755 · opensearch-project/security · GitHub **
Security Admin v7
Will connect to localhost:9200 … done
Connected as “CN=A,OU=xxxx at xxx,O=Xxxx xx Mxxxxx,L=Xx Xxxx,ST=Xxxxxxx,C=US”
ERR: “CN=A,OU=xxxx at xxx,O=Xxxx xx Xxxxxx,L=Xx Xxxx,ST=Xxxxxxx,C=US” is not an admin user
Seems you use a client certificate but this one is not registered as admin_dn
Make sure opensearch.yml on all nodes contains:
plugins.security.authcz.admin_dn:
- ““CN=A,OU=xxxx at xxx,O=Xxxx xx Xxxxxx,L=Xx Xxxx,ST=Xxxxxxx,C=US””