Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
version 3.0
cluster of 1, one manager, one warm. opensearch running on onprem k3s cluster
MS Entra id for idp
Describe the issue:
yesterday i started seeing 401 error which login in to opensearch dashboard, Everything worked great until i tried to create an internal user via the portal yesterday then the issue started. while trying to debug, i have modified by dashboard config, node configs etc and none of them helped.
STEPS
i launch the opensearch dashboard, i am able to login but i am not able to authenticate without logging in and this happens to everyone that tries to access via oidc. Basic authentication works perfect. I need help
Configuration:
apiVersion: v1
data:
opensearch_dashboards.yml: |
home:
disableWelcomeScreen: true
opensearch:
hosts:
- "https://opensearch-manager:9200"
- "https://opensearch-warm:9200"
password: admin
username: admin
requestHeadersAllowlist:
- Authorization
ssl:
certificateAuthorities: "/usr/share/opensearch-dashboards/certs/root-ca.pem"
verificationMode: full
opensearch_security:
auth:
multiple_auth_enabled: "true"
type:
- basicauth
- openid
cookie:
ttl: 86400000
password: "xxxxxxxxxxxxxxxxxxxxxxxx"
multitenancy:
enabled: true
openid:
base_redirect_url: "https://opensearch.ui"
client_id: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
client_secret: "xxxxxxxxxxxxxxxxxxxxxxxx"
connect_url: "https://login.microsoftonline.com/xxxxxxxxxxxxx/v2.0/.well-known/openid-configuration"
refresh_tokens: true
scope: openid email profile
verify_hostnames: true
session:
keepalive: true
ttl: 86400000
ui:
openid:
login:
buttonname: Log in with Microsoft EntraID
server:
host: 0.0.0.0
name: opensearch-dashboards
port: "5601"
kind: ConfigMap
metadata:
name: opensearch-dashboards-config
namespace: opensearch-main
cat << EOF | kubectl apply -f -
apiVersion: v1
data:
opensearch_dashboards.yml: |
home:
disableWelcomeScreen: true
opensearch:
hosts:
- "https://opensearch-manager:9200"
- "https://opensearch-warm:9200"
password: xxxxxxxxxxxx
username: xxxxxxxxxxxx
requestHeadersAllowlist:
- Authorization
ssl:
certificateAuthorities: "/usr/share/opensearch-dashboards/certs/root-ca.pem"
verificationMode: full
opensearch_security:
auth:
multiple_auth_enabled: "true"
type:
- basicauth
- openid
cookie:
ttl: 86400000
password: "xxxxxxxxxxxxxxxxxxxxxxxxx"
multitenancy:
enabled: true
openid:
base_redirect_url: "https://opensearch.app"
client_id: "xxxxxxxxxxxxxxxxxxxxxxxxxxx"
client_secret: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
connect_url: "https://login.microsoftonline.com/xxxxxxxxxxxxxxxxx/v2.0/.well-known/openid-configuration"
refresh_tokens: true
scope: openid email profile
verify_hostnames: true
session:
keepalive: true
ttl: 86400000
ui:
openid:
login:
buttonname: Log in with Microsoft EntraID
server:
host: 0.0.0.0
name: opensearch-dashboards
port: "5601"
kind: ConfigMap
metadata:
name: opensearch-dashboards-config
namespace: opensearch-main
EOF
cluster is healthy
sh /usr/share/opensearch/plugins/opensearch-security/tools/securityadmin.sh
-cd /usr/share/opensearch/config/opensearch-security \
-icl \
-nhnv \
-key /usr/share/opensearch/config/certs/admin-key.pem \
-cert /usr/share/opensearch/config/certs/admin.pem \
-cacert /usr/share/opensearch/config/certs/root-ca.pem
Security Admin v7
Will connect to localhost:9200 ... done
Connected as "CN=admin,OU=Azure
OpenSearch Version: 3.0.0
Contacting opensearch cluster 'opensearch' and wait for YELLOW clusterstate ...
Clustername: 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
Relevant Logs or Screenshots:
