Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
opensearch version : “2.17.1”
opensearch dasboard : 2.17.1
Browser : Chrome
Describe the issue:
After configuring OpenID Connect in OpenSearch with Azure as the identity provider, I’m encountering a 401 Unauthorized error. I can see the Microsoft login screen, but after entering credentials, it returns a 401 error.
Configuration:
config.yml
---
_meta:
type: "config"
config_version: 2
config:
dynamic:
http:
anonymous_auth_enabled: false
authc:
basic_internal_auth_domain:
description: "Authenticate via HTTP Basic against internal users database"
http_enabled: true
transport_enabled: true
order: 0 # Must set to 1 to prevent logs flooding with warnings
http_authenticator:
type: basic
challenge: false
authentication_backend:
type: internal
openid_auth_domain:
http_enabled: true
transport_enabled: true
order: 1
http_authenticator:
type: openid
challenge: false
config:
enable_ssl: true
verify_hostnames: false
subject_key: preferred_username
roles_key: groups
openid_connect_url: https://login.microsoftonline.com/f98dce6e-1a76-47b2-b1fa-21ab2df162c7/v2.0/.well-known/openid-configuration
authentication_backend:
type: noop
opensearch_dashboard.yml
opensearch.hosts: [https://localhost:9200]
opensearch.ssl.verificationMode: none
opensearch.username: admin
opensearch.password: <password>
opensearch.requestHeadersWhitelist: [authorization, securitytenant]
opensearch_security.multitenancy.enabled: true
opensearch_security.multitenancy.tenants.preferred: [Private, Global]
opensearch_security.readonly_mode.roles: [kibana_read_only]
opensearch_security.auth.multiple_auth_enabled: true
opensearch_security.auth.type: ["openid", "basicauth"]
# opensearch_security.auth.type: "openid"
# The IdP metadata endpoint
opensearch_security.openid.connect_url: "https://login.microsoftonline.com/<tenant-id>/v2.0/.well-known/openid-configuration"
opensearch_security.openid.base_redirect_url: "http://localhost:5601"
opensearch_security.openid.trust_dynamic_headers: true
# The ID of the OpenID Connect client in your IdP
opensearch_security.openid.client_id: <client-id>
# The client secret of the OpenID Connect client
opensearch_security.openid.client_secret: <client-sec>
opensearch_security.openid.scope: "openid"
opensearch_security.openid.header: "Authorization"
# Use this setting if you are running opensearch-dashboards without https
opensearch_security.cookie.secure: false
server.host: "0.0.0.0"
Relevant Logs or Screenshots: