Opensearch SAML & Basic auth with JDBC opendistro connector

Hey guys,

I’m using in my project two types of authentication: SAML and BASIC with config like below:

I’m trying to use JDBC opendistro driver to use SQL query, but it’s throwing 401 everytime when i’m trying to open connection (DriverManager.getConnection(url, user, password):wink:
Everything else works - kibana saml login, http basic auth request or resthighlevelclient with basic auth requests. Only with JDBC i’m getting 401. When I turned off SAML JDBC driver could connect with no issue.

Url which I’m using: jdbc:elasticsearch://https://{{HOST}}:443?trustSelfSigned=false&auth=BASIC&hostnameVerification=false

Thanks in advance for any suggestions.

1 Like

Hi @MarcinKaminski , are you using AWS managed OpenSearch or your own cluster?

I don’t have a lot experience with SAML but from docs looks like SAML is only used for Dashboards. After enabling SAML does OpenSearch still respond to commands like this?

curl -k -X POST "https://user:pass@host:443/_plugins/_sql" -H 'Content-Type: application/json' -d '{"query": "show tabels like %"}