I tried to change the password in three ways, but all failed.
First attempt
Viewed the document and changed the administrator password. An error occurred when I saw the article Apply configuration changes using securityadmin.sh
ERR: An unexpected IllegalStateException occured: failed to load plugin class [com.amazon.opendistroforelasticsearch.security.OpenDistroSecurityPlugin]
Trace:
java.lang.IllegalStateException: failed to load plugin class [com.amazon.opendistroforelasticsearch.security.OpenDistroSecurityPlugin]
at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:722)
at org.elasticsearch.plugins.PluginsService.<init>(PluginsService.java:124)
at org.elasticsearch.client.transport.TransportClient.newPluginService(TransportClient.java:114)
at org.elasticsearch.client.transport.TransportClient.buildTemplate(TransportClient.java:139)
at org.elasticsearch.client.transport.TransportClient.<init>(TransportClient.java:282)
at com.amazon.opendistroforelasticsearch.security.tools.OpenDistroSecurityAdmin$TransportClientImpl.<init>(OpenDistroSecurityAdmin.java:1007)
at com.amazon.opendistroforelasticsearch.security.tools.OpenDistroSecurityAdmin.execute(OpenDistroSecurityAdmin.java:520)
at com.amazon.opendistroforelasticsearch.security.tools.OpenDistroSecurityAdmin.main(OpenDistroSecurityAdmin.java:157)
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:64)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:713)
... 7 more
Caused by: ElasticsearchSecurityException[Error while initializing transport SSL layer from PEM: ElasticsearchException[Unable to read /etc/elasticsearch/kirk.pem (/etc/elasticsearch/kirk.pem). Please make sure this files exists and is readable regarding to permissions. Property: opendistro_security.ssl.transport.pemcert_filepath]]; nested: ElasticsearchException[Unable to read /etc/elasticsearch/kirk.pem (/etc/elasticsearch/kirk.pem). Please make sure this files exists and is readable regarding to permissions. Property: opendistro_security.ssl.transport.pemcert_filepath];
at com.amazon.opendistroforelasticsearch.security.ssl.DefaultOpenDistroSecurityKeyStore.initTransportSSLConfig(DefaultOpenDistroSecurityKeyStore.java:409)
at com.amazon.opendistroforelasticsearch.security.ssl.DefaultOpenDistroSecurityKeyStore.initSSLConfig(DefaultOpenDistroSecurityKeyStore.java:248)
at com.amazon.opendistroforelasticsearch.security.ssl.DefaultOpenDistroSecurityKeyStore.<init>(DefaultOpenDistroSecurityKeyStore.java:169)
at com.amazon.opendistroforelasticsearch.security.ssl.OpenDistroSecuritySSLPlugin.<init>(OpenDistroSecuritySSLPlugin.java:217)
at com.amazon.opendistroforelasticsearch.security.OpenDistroSecurityPlugin.<init>(OpenDistroSecurityPlugin.java:246)
... 13 more
Caused by: ElasticsearchException[Unable to read /etc/elasticsearch/kirk.pem (/etc/elasticsearch/kirk.pem). Please make sure this files exists and is readable regarding to permissions. Property: opendistro_security.ssl.transport.pemcert_filepath]
at com.amazon.opendistroforelasticsearch.security.ssl.DefaultOpenDistroSecurityKeyStore.checkPath(DefaultOpenDistroSecurityKeyStore.java:948)
at com.amazon.opendistroforelasticsearch.security.ssl.DefaultOpenDistroSecurityKeyStore.resolve(DefaultOpenDistroSecurityKeyStore.java:227)
at com.amazon.opendistroforelasticsearch.security.ssl.DefaultOpenDistroSecurityKeyStore.initTransportSSLConfig(DefaultOpenDistroSecurityKeyStore.java:386)
... 17 more
Second try
In order to approach it in a different way, we tried to change the password through ‘Internal users’ menu in ‘kibana’ but it also failed.
{"status":"FORBIDDEN","message":"Resource 'admin' is read-only."}
Last attempt
Although it was used to execute the ‘internal_users.yml’ docker container that was modified after reading the above article, This, too, failed.
node1 | [2021-04-05T05:02:05,046][WARN ][c.a.o.s.a.BackendRegistry] [15a978978631] Authentication finally failed for kibanaserver from ....
kibana | {"type":"log","@timestamp":"2021-04-05T05:02:05Z","tags":["error","elasticsearch","data"],"pid":1,"message":"[ResponseError]: Response Error"}
The above error occurred when trying to access the changed information after changing the password of the kibanaserver account for testing. I think the changed password is probably not applied correctly.
It’s okay if it’s not my approach. I want to know how to change the password. Can someone help me?