Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
Describe the issue:
I recently enabled oidc for user authentication using MS entra id, it was successful, however i notice i am not seeing my email or preffered name showup on the dashboard when i login instead i get a long string as username
Configuration:
I have a two nodes cluster
manager node and warm node both are running on a onsite k3s server.
This is my dashboard yaml
opensearch_dashboards.yml: |
server.name: opensearch-dashboards
server.host: 0.0.0.0
server.port: 5601
opensearch.hosts: [âhttps://opensearch-manager:9200â,âhttps://opensearch-warm:9200â]
opensearch.ssl.verificationMode: none
opensearch.ssl.certificateAuthorities: â/usr/share/opensearch-dashboards/certs/root-ca.pemâ
server.ssl.enabled: false
opensearch_security.cookie.secure: false
opensearch.requestHeadersWhitelist: [âAuthorizationâ, âsecuritytenantâ]
opensearch_security.readonly_mode.roles: [âkibana_read_onlyâ]
opensearch_security.multitenancy.enabled: true
opensearch_security.multitenancy.tenants.preferred: [âPrivateâ, âGlobalâ]
opensearch_security.auth.multiple_auth_enabled: false
opensearch_security.auth.type: [âopenidâ]
opensearch_security.openid.connect_url: âentra id urlâ
opensearch_security.openid.client_id: ââ
opensearch_security.openid.client_secret: ââ
opensearch_security.openid.scope: âopenid email profile User.Readâ
opensearch_security.openid.base_redirect_url: âopensearch.xxxxxxxâ
opensearch_security.openid.verify_hostnames: false
opensearch_security.openid.refresh_tokens: false
logging.verbose: true
Running securityadmin shows cluster is green with no issues
kubectl exec -it ti-opensearch-cluster-manager-node-0 -- sh plugins/opensearch-security/tools/securityadmin.sh \
-cd /usr/share/opensearch/config/opensearch-security/ \
-icl -nhnv \
-cert /usr/share/opensearch/config/certs/admin.pem \
-cacert /usr/share/opensearch/config/certs/root-ca.pem \
-key /usr/share/opensearch/config/certs/admin-key.pem \
-t config
output
Security Admin v7
Will connect to localhost:9200 ⌠done
Connected as âEMAILADDRESS=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxâ
OpenSearch Version: 3.0.0
Contacting opensearch cluster âopensearchâ and wait for YELLOW clusterstate âŚ
Clustername: main-opensearch-cluster
Clusterstate: GREEN
Number of nodes: 2
Number of data nodes: 2
.opendistro_security index already exists, so we do not need to create one.
Populate config from /usr/share/opensearch/config/opensearch-security/
Will update â/configâ with /usr/share/opensearch/config/opensearch-security/config.yml
SUCC: Configuration for âconfigâ created or updated
Will update â/rolesâ with /usr/share/opensearch/config/opensearch-security/roles.yml
SUCC: Configuration for ârolesâ created or updated
Will update â/rolesmappingâ with /usr/share/opensearch/config/opensearch-security/roles_mapping.yml
SUCC: Configuration for ârolesmappingâ created or updated
Will update â/internalusersâ with /usr/share/opensearch/config/opensearch-security/internal_users.yml
SUCC: Configuration for âinternalusersâ created or updated
Will update â/actiongroupsâ with /usr/share/opensearch/config/opensearch-security/action_groups.yml
SUCC: Configuration for âactiongroupsâ created or updated
Will update â/tenantsâ with /usr/share/opensearch/config/opensearch-security/tenants.yml
SUCC: Configuration for âtenantsâ created or updated
Will update â/nodesdnâ with /usr/share/opensearch/config/opensearch-security/nodes_dn.yml
SUCC: Configuration for ânodesdnâ created or updated
Will update â/auditâ with /usr/share/opensearch/config/opensearch-security/audit.yml
SUCC: Configuration for âauditâ created or updated
Will update â/allowlistâ with /usr/share/opensearch/config/opensearch-security/allowlist.yml
SUCC: Configuration for âallowlistâ created or updated
SUCC: Expected 9 config types for node {âupdated_config_typesâ:[âallowlistâ,âtenantsâ,ârolesmappingâ,ânodesdnâ,âauditâ,ârolesâ,âactiongroupsâ,âconfigâ,âinternalusersâ],âupdated_config_sizeâ:9,âmessageâ:null} is 9 ([âallowlistâ,âtenantsâ,ârolesmappingâ,ânodesdnâ,âauditâ,ârolesâ,âactiongroupsâ,âconfigâ,âinternalusersâ]) due to: null
SUCC: Expected 9 config types for node {âupdated_config_typesâ:[âallowlistâ,âtenantsâ,ârolesmappingâ,ânodesdnâ,âauditâ,ârolesâ,âactiongroupsâ,âconfigâ,âinternalusersâ],âupdated_config_sizeâ:9,âmessageâ:null} is 9 ([âallowlistâ,âtenantsâ,ârolesmappingâ,ânodesdnâ,âauditâ,ârolesâ,âactiongroupsâ,âconfigâ,âinternalusersâ]) due to: null
Done with success
This is my config.yml on the nodes
config.yml: |
_meta:
type: âconfigâ
config_version: 2
config:
dynamic:
http:
anonymous_auth_enabled: false
xff:
enabled: false
internalProxies: â192.168.0.10|192.168.0.11â
remoteIpHeader: âx-forwarded-forâ
do_not_fail_on_forbidden: true
do_not_fail_on_forbidden_empty: true
authc:
basic_internal_auth_domain:
description: âAuthenticate via HTTP Basic against internal users databaseâ
http_enabled: true
transport_enabled: true
order: 0
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:
openid_connect_idp:
enable_ssl: true
pemtrustedcas_filepath: /usr/share/opensearch/config/certs/root-ca.pem
verify_hostnames: false
subject_key: preferred_username
roles_key: roles
openid_connect_url: entra url
authentication_backend:
type: noop
on the subject key, i have used email and preffered name none worked.
on the azure side i have enabled app roles on the registered application
admin and read_only
i also have the following enabled for token configuration
- prefered_username
what am i missing. i have been on this for weeks, i couldget my username or email to popup on the dashboard. Kindly assist