security: [BUG] LDAP fails when the `security.ssl.transport.truststore_filepath` is missing
What is the bug?
This is a continuation of the issue 1866. The LDAP authentication process fails when the security.ssl.transport.truststore_filepath is missing from the opensearch.yml file, leading to an unresolved bug from a previous issue. The steps to reproduce the bug are documented in the Opensearch forum thread, along with the host/environment details.
How can one reproduce the bug? Steps to reproduce the behavior:
All the steps and config files are published in https://forum.opensearch.org/t/empty-file-path-for-plugins-security-ssl-transport-truststore-filepath-ldap-authentication/12991 thread.
What is the expected behavior?
The LDAP authentication process should function as expected when the security.ssl.transport.truststore_filepath is missing from the opensearch.yml file, and the pemtrustedcas_filepath: is included in the config.yml file
What is your host/environment? All the information is provided in the Opesearch forum thread
Do you have any screenshots? If applicable, add screenshots to help explain your problem.
Do you have any additional context?
It appears that the Java code responsible for the logic of how the CA certificates are read is located at this location. We are unsure if the documentation is incorrect, as the security.ssl.transport.truststore_filepath option is listed as optional, while it appears to be required for authorization. We are also considering the possibility of changing the logic for searching the IdP RootCA certificate
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 1
- Comments: 18 (6 by maintainers)
Does exist any way to counturn this problem?
Thank you @vaskosmihaylov. I opened a PR on the documentation website to address this in documentation: https://github.com/opensearch-project/documentation-website/pull/5727
@vaskosmihaylov I just tried to reproduce this error. I was able to reproduce the error from the OP description by setting
enable_ssl: trueand not configuringpemtrustedcas_filepathon the LDAP config, but after some trial and error I was able to get it to work.One thing I noticed is that on this forum post, the
pemtrustedcas_filepathwas only configured in theldap authenticator(authc:section) and was not also configured in theldap authorizer(authz:section). After configuring this setting twice (in bothauthc:andauthz:) I was able to login.From my understanding of the
authzportion of the config is that is queries the LDAP directory after authentication is successful to extract information about the user’s roles from the LDAP directory.[Triage] Thanks for filing @vaskosmihaylov looks like have an issue here that should be investigated. Additionally thanks for following up on the forums and back here.