Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
Opensearch version is 2.8.0
keycloak version is latest
authorization profile is openid
Describe the issue:
Error failed when trying to obtain the endpoint from idp.
Configuration:
Openid-dev-certs is the one which we took the certs from the realm settings of keycloak.
Opensearch.yaml
apiVersion: opensearch.opster.io/v1
kind: OpenSearchCluster
metadata:
name: os-dev-cluster
namespace: opensearch-dev
spec:
initHelper:
image: "public.ecr.aws/opsterio/busybox"
security:
config:
adminCredentialsSecret:
name: a-admin-credentials-secret
securityConfigSecret:
name: a-securityconfig-secret
tls:
transport:
generate: true
http:
generate: true
general:
serviceName: my-cluster1
version: 2.8.0
drainDataNodes: true
setVMMaxMapCount: true
image: docker.io/opensearchproject/opensearch:2.8.0
imagePullPolicy: IfNotPresent
additionalVolumes:
- name: openid-dev-certs
path: /usr/share/opensearch/config/certs/
configMap:
name: openid-dev-certs
restartPods: true
#additionalConfig:
#plugins.security.allow_default_init_securityindex: "true"
#plugins.security.ssl.transport.pemtrustedcas_filepath: /usr/share/opensearch/config/certs/openid-certs
dashboards:
additionalConfig:
logging.verbose: "true"
opensearch_security.auth.type: '["basicauth","openid"]'
opensearch_security.auth.multiple_auth_enabled: "True"
opensearch_security.openid.connect_url: https://keycloak-dev.os-es.xyz.com/auth/realms/master/.well-known/openid-configuration
opensearch_security.openid.base_redirect_url: https://opensearchdashboard.os-es.xyz.com/
opensearch_security.openid.client_id: keycloak-dev-grafana
opensearch_security.openid.client_secret: V6WO9Xv5Hs0xkzI6cs4DEsx9M6tLj4Xh
opensearch_security.openid.scope: openid profile email
opensearch_security.openid.header: Authorization
opensearch_security.openid.trust_dynamic_headers: "true"
opensearch.optimizedHealthcheckId: "os-es-cluster"
opensearch_security.openid.verify_hostnames: "false"
opensearch.ssl.verificationMode: none
opensearch_security.cookie.secure: "false"
opensearch.requestHeadersWhitelist: |
["securitytenant","Authorization","security_tenant"]
opensearch_security.readonly_mode.roles: '[ "kibana_user", "readall" ]'
image: docker.io/opensearchproject/opensearch-dashboards:2.8.0
imagePullPolicy: IfNotPresent
opensearchCredentialsSecret:
name: a-admin-credentials-secret
enable: true
tls:
enable: true
generate: true
version: 2.8.0
replicas: 1
resources:
requests:
memory: "512Mi"
cpu: "200m"
limits:
memory: "512Mi"
cpu: "200m"
nodePools:
- component: masters
replicas: 3
diskSize: "5Gi"
jvm: "-Dopensearch.allow_insecure_settings=true"
resources:
requests:
memory: "2Gi"
cpu: "500m"
limits:
memory: "3Gi"
cpu: "1000m"
roles:
- "data"
- "master"
- "ingest"
persistence:
pvc:
storageClass: nfs-csi
accessModes: # You can change the accessMode
- ReadWriteOnce
Security_config:
config.yml: |-
_meta:
type: "config"
config_version: 2
config:
dynamic:
authz: {}
authc:
basic_internal_auth_domain:
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
verify_hostnames: false
pemtrustedcas_filepath: /usr/share/opensearch/config/certs/openid-dev-certs
subject_key: preferred_username
roles_key: roles
openid_connect_url: "https://keycloak-dev.os-es.xyz.com/auth/realms/master/.well-known/openid-configuration"
authentication_backend:
type: noop
roles_mapping.yml: |-
_meta:
type: "rolesmapping"
config_version: 2
Relevant Logs or Screenshots:
{"type":"log","@timestamp":"2024-04-16T06:08:57Z","tags":["error","plugins","securityDashboards"],"pid":1,"message":"Error: getaddrinfo ENOTFOUND keycloak-dev.os-es.xyz.com\n at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:109:26) {\n errno: -3007,\n code: 'ENOTFOUND',\n syscall: 'getaddrinfo',\n hostname: 'keycloak-dev.os-es.xyz.com',\n trace: [\n {\n method: 'GET',\n url: 'https://keycloak-dev.os-es.xyz.com/auth/realms/master/.well-known/openid-configuration'\n }\n ],\n isBoom: true,\n isServer: true,\n data: null,\n output: {\n statusCode: 502,\n payload: {\n message: 'Client request error: getaddrinfo ENOTFOUND keycloak-dev.os-es.xyz.com',\n statusCode: 502,\n error: 'Bad Gateway'\n },\n headers: {}\n }\n}"}
{"type":"log","@timestamp":"2024-04-16T06:08:57Z","tags":["debug","root"],"pid":1,"message":"shutting root down"}
{"type":"log","@timestamp":"2024-04-16T06:08:57Z","tags":["fatal","root"],"pid":1,"message":"Error: Failed when trying to obtain the endpoints from your IdP\n at OpenIdAuthentication.init (/usr/share/opensearch-dashboards/plugins/securityDashboards/server/auth/types/openid/openid_auth.ts:117:13)\n at processTicksAndRejections (node:internal/process/task_queues:96:5)\n at MultipleAuthentication.init (/usr/share/opensearch-dashboards/plugins/securityDashboards/server/auth/types/multiple/multi_auth.ts:79:11)\n at createAuthentication (/usr/share/opensearch-dashboards/plugins/securityDashboards/server/auth/auth_handler_factory.ts:46:3)\n at getAuthenticationHandler (/usr/share/opensearch-dashboards/plugins/securityDashboards/server/auth/auth_handler_factory.ts:91:37)\n at SecurityPlugin.setup (/usr/share/opensearch-dashboards/plugins/securityDashboards/server/plugin.ts:117:39)\n at PluginsSystem.setupPlugins (/usr/share/opensearch-dashboards/src/core/server/plugins/plugins_system.js:71:24)\n at PluginsService.setup (/usr/share/opensearch-dashboards/src/core/server/plugins/plugins_service.js:79:19)\n at Server.setup (/usr/share/opensearch-dashboards/src/core/server/server.js:249:26)\n at Root.setup (/usr/share/opensearch-dashboards/src/core/server/root/index.js:44:14)\n at bootstrap (/usr/share/opensearch-dashboards/src/core/server/bootstrap.js:103:5)\n at Command.<anonymous> (/usr/share/opensearch-dashboards/src/cli/serve/serve.js:193:5)"}
{"type":"log","@timestamp":"2024-04-16T06:08:57Z","tags":["debug","server"],"pid":1,"message":"stopping server"}
{"type":"log","@timestamp":"2024-04-16T06:08:57Z","tags":["debug","legacy-service"],"pid":1,"message":"stopping legacy service"}
{"type":"log","@timestamp":"2024-04-16T06:08:57Z","tags":["debug","plugins-service"],"pid":1,"message":"Stopping plugins service"}
{"type":"log","@timestamp":"2024-04-16T06:08:57Z","tags":["info","plugins-system"],"pid":1,"message":"Stopping all plugins."}
{"type":"log","@timestamp":"2024-04-16T06:08:57Z","tags":["debug","plugins-system"],"pid":1,"message":"Stopping plugin \"savedObjectsManagement\"..."}
{"type":"log","@timestamp":"2024-04-16T06:08:57Z","tags":["debug","plugins-system"],"pid":1,"message":"Stopping plugin \"discover\"..."}
{"type":"log","@timestamp":"2024-04-16T06:08:57Z","tags":["debug","plugins-system"],"pid":1,"message":"Stopping plugin \"observabilityDashboards\"..."}
{"type":"log","@timestamp":"2024-04-16T06:08:57Z","tags":["debug","plugins-system"],"pid":1,"message":"Stopping plugin \"visTypeMetric\"..."}
{"type":"log","@timestamp":"2024-04-16T06:08:57Z","tags":["debug","plugins-system"],"pid":1,"message":"Stopping plugin \"visTypeTagcloud\"..."}
{"type":"log","@timestamp":"2024-04-16T06:08:57Z","tags":["debug","plugins-system"],"pid":1,"message":"Stopping plugin \"visTypeTimeseries\"..."}
{"type":"log","@timestamp":"2024-04-16T06:08:57Z","tags":["debug","plugins-system"],"pid":1,"message":"Stopping plugin \"visTypeVislib\"..."}
{"type":"log","@timestamp":"2024-04-16T06:08:57Z","tags":["debug","plugins-system"],"pid":1,"message":"Stopping plugin \"charts\"..."}
{"type":"log","@timestamp":"2024-04-16T06:08:57Z","tags":["debug","plugins-system"],"pid":1,"message":"Stopping plugin \"notificationsDashboards\"..."}
{"type":"log","@timestamp":"2024-04-16T06:08:57Z","tags":["debug","plugins-system"],"pid":1,"message":"Stopping plugin \"queryWorkbenchDashboards\"..."}
{"type":"log","@timestamp":"2024-04-16T06:08:58Z","tags":["debug","plugins-system"],"pid":1,"message":"Stopping plugin \"visualize\"..."}
{"type":"log","@timestamp":"2024-04-16T06:08:58Z","tags":["debug","plugins-system"],"pid":1,"message":"Stopping plugin \"ganttChartDashboards\"..."}
{"type":"log","@timestamp":"2024-04-16T06:08:58Z","tags":["debug","plugins-system"],"pid":1,"message":"Stopping plugin \"inputControlVis\"..."}
{"type":"log","@timestamp":"2024-04-16T06:08:58Z","tags":["debug","plugins-system"],"pid":1,"message":"Stopping plugin \"customImportMapDashboards\"..."}
{"type":"log","@timestamp":"2024-04-16T06:08:58Z","tags":["debug","plugins-system"],"pid":1,"message":"Stopping plugin \"regionMap\"..."}
{"type":"log","@timestamp":"2024-04-16T06:08:58Z","tags":["debug","plugins-system"],"pid":1,"message":"Stopping plugin \"tileMap\"..."}
{"type":"log","@timestamp":"2024-04-16T06:08:58Z","tags":["debug","plugins-system"],"pid":1,"message":"Stopping plugin \"visBuilder\"..."}
{"type":"log","@timestamp":"2024-04-16T06:08:58Z","tags":["debug","plugins-system"],"pid":1,"message":"Stopping plugin \"visTypeMarkdown\"..."}
{"type":"log","@timestamp":"2024-04-16T06:08:58Z","tags":["debug","plugins-system"],"pid":1,"message":"Stopping plugin \"visTypeTable\"..."}
{"type":"log","@timestamp":"2024-04-16T06:08:58Z","tags":["debug","plugins-system"],"pid":1,"message":"Stopping plugin \"visTypeTimeline\"..."}
{"type":"log","@timestamp":"2024-04-16T06:08:58Z","tags":["debug","plugins","visTypeTimeline"],"pid":1,"message":"Stopping plugin"}
{"type":"log","@timestamp":"2024-04-16T06:08:58Z","tags":["debug","plugins-system"],"pid":1,"message":"Stopping plugin \"visTypeVega\"..."}
{"type":"log","@timestamp":"2024-04-16T06:08:58Z","tags":["debug","plugins-system"],"pid":1,"message":"Stopping plugin \"visualizations\"..."}
{"type":"log","@timestamp":"2024-04-16T06:08:58Z","tags":["debug","plugins-system"],"pid":1,"message":"Stopping plugin \"dashboard\"..."}
{"type":"log","@timestamp":"2024-04-16T06:08:58Z","tags":["debug","plugins-system"],"pid":1,"message":"Stopping plugin \"anomalyDetectionDashboards\"..."}
{"type":"log","@timestamp":"2024-04-16T06:08:58Z","tags":["debug","plugins-system"],"pid":1,"message":"Stopping plugin \"indexManagementDashboards\"..."}
{"type":"log","@timestamp":"2024-04-16T06:08:58Z","tags":["debug","plugins-system"],"pid":1,"message":"Stopping plugin \"reportsDashboards\"..."}
{"type":"log","@timestamp":"2024-04-16T06:08:58Z","tags":["debug","plugins-system"],"pid":1,"message":"Stopping plugin \"searchRelevanceDashboards\"..."}
{"type":"log","@timestamp":"2024-04-16T06:08:58Z","tags":["debug","plugins-system"],"pid":1,"message":"Stopping plugin \"savedObjects\"..."}
{"type":"log","@timestamp":"2024-04-16T06:08:58Z","tags":["debug","plugins-system"],"pid":1,"message":"Stopping plugin \"advancedSettings\"..."}
{"type":"log","@timestamp":"2024-04-16T06:08:58Z","tags":["debug","plugins-system"],"pid":1,"message":"Stopping plugin \"indexPatternManagement\"..."}
{"type":"log","@timestamp":"2024-04-16T06:08:58Z","tags":["debug","plugins-system"],"pid":1,"message":"Stopping plugin \"management\"..."}
{"type":"log","@timestamp":"2024-04-16T06:08:58Z","tags":["debug","plugins-system"],"pid":1,"message":"Stopping plugin \"apmOss\"..."}
{"type":"log","@timestamp":"2024-04-16T06:08:58Z","tags":["debug","plugins-system"],"pid":1,"message":"Stopping plugin \"console\"..."}
{"type":"log","@timestamp":"2024-04-16T06:08:58Z","tags":["debug","plugins-system"],"pid":1,"message":"Stopping plugin \"home\"..."}
{"type":"log","@timestamp":"2024-04-16T06:08:58Z","tags":["debug","plugins-system"],"pid":1,"message":"Stopping plugin \"securityAnalyticsDashboards\"..."}
{"type":"log","@timestamp":"2024-04-16T06:08:58Z","tags":["debug","plugins-system"],"pid":1,"message":"Stopping plugin \"data\"..."}
{"type":"log","@timestamp":"2024-04-16T06:08:58Z","tags":["debug","plugins-system"],"pid":1,"message":"Stopping plugin \"expressions\"..."}
{"type":"log","@timestamp":"2024-04-16T06:08:58Z","tags":["debug","plugins-system"],"pid":1,"message":"Stopping plugin \"embeddable\"..."}
{"type":"log","@timestamp":"2024-04-16T06:08:58Z","tags":["debug","plugins-system"],"pid":1,"message":"Stopping plugin \"legacyExport\"..."}
{"type":"log","@timestamp":"2024-04-16T06:08:58Z","tags":["debug","plugins-system"],"pid":1,"message":"Stopping plugin \"opensearchUiShared\"..."}
{"type":"log","@timestamp":"2024-04-16T06:08:58Z","tags":["debug","plugins-system"],"pid":1,"message":"Stopping plugin \"share\"..."}
{"type":"log","@timestamp":"2024-04-16T06:08:58Z","tags":["debug","plugins","share"],"pid":1,"message":"Stopping plugin"}
{"type":"log","@timestamp":"2024-04-16T06:08:58Z","tags":["debug","plugins-system"],"pid":1,"message":"Stopping plugin \"mapsLegacy\"..."}
{"type":"log","@timestamp":"2024-04-16T06:08:58Z","tags":["debug","plugins-system"],"pid":1,"message":"Stopping plugin \"opensearchDashboardsLegacy\"..."}
{"type":"log","@timestamp":"2024-04-16T06:08:58Z","tags":["debug","plugins-system"],"pid":1,"message":"Stopping plugin \"opensearchDashboardsUsageCollection\"..."}
{"type":"log","@timestamp":"2024-04-16T06:08:58Z","tags":["debug","plugins-system"],"pid":1,"message":"Stopping plugin \"usageCollection\"..."}
{"type":"log","@timestamp":"2024-04-16T06:08:58Z","tags":["debug","plugins","usageCollection"],"pid":1,"message":"Stopping plugin"}
{"type":"log","@timestamp":"2024-04-16T06:08:58Z","tags":["debug","plugins-system"],"pid":1,"message":"Stopping plugin \"alertingDashboards\"..."}
{"type":"log","@timestamp":"2024-04-16T06:08:58Z","tags":["debug","opensearch-service"],"pid":1,"message":"Stopping opensearch service"}
FATAL Error: Failed when trying to obtain the endpoints from your IdP