It clearly says that “As an alternative” to the certs , we can use keystores and truststores. i have set my certs file paths correctly and yet it asks for the plugins.security.ssl.transport.truststore_filepath to be set resulting in below exception:
java.lang.IllegalStateException: failed to load plugin class [org.opensearch.security.OpenSearchSecurityPlugin]
Likely root cause: OpenSearchException[Empty file path for plugins.security.ssl.transport.truststore_filepath] java.lang.IllegalStateException: failed to load plugin class [org.opensearch.security.OpenSearchSecurityPlugin]
Is there any way to choose only certs route and not provide truststore ? if not, how can i create truststore using opensearch-keystore utility? is that even possible ?
@vanamvijay23
I think you are looking for:
plugins.security.ssl.transport.pemtrustedcas_filepath: (for transport)
plugins.security.ssl.http.pemtrustedcas_filepath: (for http).
If this doesn’t work, can you provide your opensearrch.yml file with any sensitive details redacted if necessary.
i have commented this line and now i am getting new exceptions:
Suppressed: java.lang.IllegalArgumentException: unknown secure setting [root-ca.pem] please check that any required plugins are installed, or check the breaking changes documentation for removed settings
Suppressed: java.lang.IllegalArgumentException: unknown secure setting [node.pem] please check that any required plugins are installed, or check the breaking changes documentation for removed settings
Suppressed: java.lang.IllegalArgumentException: unknown secure setting [node-key.pem] please check that any required plugins are installed, or check the breaking changes documentation for removed settings
openserch security plugins are installed by default. yet it throws above error, any pointers ? do i need to enable opensearch security plugin using some property ?
yeah i have fixed this. issue :
(also typo in plugins.security.oles_mapping_resolution: MAPPING_ONLY)
This needs further investigation. Can you confirm how you are running opensearch? Binary? docker-compose? etc
A. i am running opensearch in kubernetes , using docker image : opensearch:1.2.4
Also, Do you see the error when you are starting opensearch or after some action?
A. this is happening while opensearch master node pod is starting up , the pod is not restarting but giving this error continuously! i have tried generating different certs and having same issues!
@Anthony , even though i have set plugins.security.allow_unsafe_democertificates: true it stills complains. saying that
Likely root cause: OpenSearchException[Unable to read /usr/share/opensearch/config/esnode.pem (/usr/share/opensearch/config/esnode.pem). Please make sure this files exists and is readable regarding to permissions. Property: plugins.security.ssl.transport.pemcert_filepath]
does this mean, default certs are not shipped in docker image ?
@vanamvijay23 The demo certificates are automatically generated at startup using script install_demo_configuration.sh in /usr/share/opensearch/plugins/opensearch-security/tools. This should be trigger automatically unless you have set the below:
If you follow the instructions on the docs here you should be able to start a cluster using default values.yaml file (helm install --values=values.yaml opensearch opensearch-1.7…) , from there you can extract the certificates that were generated and use them in the next deployment.
Naturally these are demo certificates and should never be used in prod, but for testing this approach is very straightforward