Working on a new wazuh cluster and cannot get past a 500 server error on our idp initiated SSO setup via Okta.
Everything following the guide went as expected. A note that I think may be relevant is that we had not created any local users in this cluster before setting up SSO. The only account we did have was the admin account on the understanding that an account should be created for each new user who has the correct access group in Okta.
Jun 12 16:45:43 wazuh-dashboard opensearch-dashboards[20273]: {"type":"log","@timestamp":"2023-06-12T16:45:43Z","tags":["info","plugins-service"],"pid":20273,"message":"Plugin \"dataSourceManagement\" has been disabled since the following direct or transitive dependencies are missing or disabled: [dataSource]"}
Jun 12 16:45:43 wazuh-dashboard opensearch-dashboards[20273]: {"type":"log","@timestamp":"2023-06-12T16:45:43Z","tags":["info","plugins-service"],"pid":20273,"message":"Plugin \"mlCommonsDashboards\" is disabled."}
Jun 12 16:45:43 wazuh-dashboard opensearch-dashboards[20273]: {"type":"log","@timestamp":"2023-06-12T16:45:43Z","tags":["info","plugins-service"],"pid":20273,"message":"Plugin \"dataSource\" is disabled."}
Jun 12 16:45:43 wazuh-dashboard opensearch-dashboards[20273]: {"type":"log","@timestamp":"2023-06-12T16:45:43Z","tags":["info","plugins-service"],"pid":20273,"message":"Plugin \"visTypeXy\" is disabled."}
Jun 12 16:45:44 wazuh-dashboard opensearch-dashboards[20273]: {"type":"log","@timestamp":"2023-06-12T16:45:44Z","tags":["warning","config","deprecation"],"pid":20273,"message":"It is not recommended to disable xsrf protections for API endpoints via [server.xsrf.whitelist]. Instead, supply the \"osd-xsrf\" header."}
Jun 12 16:45:44 wazuh-dashboard opensearch-dashboards[20273]: {"type":"log","@timestamp":"2023-06-12T16:45:44Z","tags":["info","plugins-system"],"pid":20273,"message":"Setting up [45] plugins: [usageCollection,opensearchDashboardsUsageCollection,opensearchDashboardsLegacy,mapsLegacy,alertingDashboards,share,opensearchUiShared,legacyExport,embeddable,expressions,data,home,console,apmOss,management,indexPatternManagement,advancedSettings,savedObjects,dashboard,visualizations,visTypeVega,visTypeTimeline,timeline,visTypeTable,visTypeMarkdown,visBuilder,tileMap,regionMap,customImportMapDashboards,inputControlVis,visualize,ganttChartDashboards,reportsDashboards,indexManagementDashboards,notificationsDashboards,charts,visTypeVislib,visTypeTimeseries,visTypeTagcloud,visTypeMetric,discover,savedObjectsManagement,securityDashboards,wazuh,bfetch]"}
Jun 12 16:45:44 wazuh-dashboard opensearch-dashboards[20273]: {"type":"log","@timestamp":"2023-06-12T16:45:44Z","tags":["info","savedobjects-service"],"pid":20273,"message":"Waiting until all OpenSearch nodes are compatible with OpenSearch Dashboards before starting saved objects migrations..."}
Jun 12 16:45:44 wazuh-dashboard opensearch-dashboards[20273]: {"type":"log","@timestamp":"2023-06-12T16:45:44Z","tags":["info","savedobjects-service"],"pid":20273,"message":"Starting saved objects migrations"}
Jun 12 16:45:44 wazuh-dashboard opensearch-dashboards[20273]: {"type":"log","@timestamp":"2023-06-12T16:45:44Z","tags":["info","plugins-system"],"pid":20273,"message":"Starting [45] plugins: [usageCollection,opensearchDashboardsUsageCollection,opensearchDashboardsLegacy,mapsLegacy,alertingDashboards,share,opensearchUiShared,legacyExport,embeddable,expressions,data,home,console,apmOss,management,indexPatternManagement,advancedSettings,savedObjects,dashboard,visualizations,visTypeVega,visTypeTimeline,timeline,visTypeTable,visTypeMarkdown,visBuilder,tileMap,regionMap,customImportMapDashboards,inputControlVis,visualize,ganttChartDashboards,reportsDashboards,indexManagementDashboards,notificationsDashboards,charts,visTypeVislib,visTypeTimeseries,visTypeTagcloud,visTypeMetric,discover,savedObjectsManagement,securityDashboards,wazuh,bfetch]"}
Jun 12 16:45:45 wazuh-dashboard opensearch-dashboards[20273]: {"type":"log","@timestamp":"2023-06-12T16:45:45Z","tags":["listening","info"],"pid":20273,"message":"Server running at
https://0.0.0.0:443"}
Jun 12 16:45:45 wazuh-dashboard opensearch-dashboards[20273]: {"type":"log","@timestamp":"2023-06-12T16:45:45Z","tags":["info","http","server","OpenSearchDashboards"],"pid":20273,"message":"http server running at
https://0.0.0.0:443"}
Jun 12 17:04:43 wazuh-dashboard opensearch-dashboards[20273]: StatusCodeError: Authentication Exception
Jun 12 17:04:43 wazuh-dashboard opensearch-dashboards[20273]: at respond (/usr/share/wazuh-dashboard/node_modules/elasticsearch/src/lib/transport.js:349:15)
Jun 12 17:04:43 wazuh-dashboard opensearch-dashboards[20273]: at checkRespForFailure (/usr/share/wazuh-dashboard/node_modules/elasticsearch/src/lib/transport.js:306:7)
Jun 12 17:04:43 wazuh-dashboard opensearch-dashboards[20273]: at HttpConnector.<anonymous> (/usr/share/wazuh-dashboard/node_modules/elasticsearch/src/lib/connectors/http.js:173:7)
Jun 12 17:04:43 wazuh-dashboard opensearch-dashboards[20273]: at IncomingMessage.wrapper (/usr/share/wazuh-dashboard/node_modules/lodash/lodash.js:4991:19)
Jun 12 17:04:43 wazuh-dashboard opensearch-dashboards[20273]: at IncomingMessage.emit (events.js:412:35)
Jun 12 17:04:43 wazuh-dashboard opensearch-dashboards[20273]: at IncomingMessage.emit (domain.js:475:12)
Jun 12 17:04:43 wazuh-dashboard opensearch-dashboards[20273]: at endReadableNT (internal/streams/readable.js:1333:12)
Jun 12 17:04:43 wazuh-dashboard opensearch-dashboards[20273]: at processTicksAndRejections (internal/process/task_queues.js:82:21) {
Jun 12 17:04:43 wazuh-dashboard opensearch-dashboards[20273]: status: 401,
Jun 12 17:04:43 wazuh-dashboard opensearch-dashboards[20273]: displayName: 'AuthenticationException',
Jun 12 17:04:43 wazuh-dashboard opensearch-dashboards[20273]: path: '/_plugins/_security/api/authtoken',
Jun 12 17:04:43 wazuh-dashboard opensearch-dashboards[20273]: query: {},
Jun 12 17:04:43 wazuh-dashboard opensearch-dashboards[20273]: body: 'Authentication finally failed',
Jun 12 17:04:43 wazuh-dashboard opensearch-dashboards[20273]: statusCode: 401,
Jun 12 17:04:43 wazuh-dashboard opensearch-dashboards[20273]: response: 'Authentication finally failed',
Jun 12 17:04:43 wazuh-dashboard opensearch-dashboards[20273]: toString: [Function (anonymous)],
Jun 12 17:04:43 wazuh-dashboard opensearch-dashboards[20273]: toJSON: [Function (anonymous)],
Jun 12 17:04:43 wazuh-dashboard opensearch-dashboards[20273]: isBoom: true,
Jun 12 17:04:43 wazuh-dashboard opensearch-dashboards[20273]: isServer: false,
Jun 12 17:04:43 wazuh-dashboard opensearch-dashboards[20273]: data: null,
Jun 12 17:04:43 wazuh-dashboard opensearch-dashboards[20273]: output: {
Jun 12 17:04:43 wazuh-dashboard opensearch-dashboards[20273]: statusCode: 401,
Jun 12 17:04:43 wazuh-dashboard opensearch-dashboards[20273]: payload: {
Jun 12 17:04:43 wazuh-dashboard opensearch-dashboards[20273]: statusCode: 401,
Jun 12 17:04:43 wazuh-dashboard opensearch-dashboards[20273]: error: 'Unauthorized',
Jun 12 17:04:43 wazuh-dashboard opensearch-dashboards[20273]: message: 'Authentication Exception'
Jun 12 17:04:43 wazuh-dashboard opensearch-dashboards[20273]: },
Jun 12 17:04:43 wazuh-dashboard opensearch-dashboards[20273]: headers: { 'WWW-Authenticate': 'Basic realm="Authorization Required"' }
Jun 12 17:04:43 wazuh-dashboard opensearch-dashboards[20273]: },
Jun 12 17:04:43 wazuh-dashboard opensearch-dashboards[20273]: [Symbol(OpenSearchError)]: 'OpenSearch/notAuthorized'
Jun 12 17:04:43 wazuh-dashboard opensearch-dashboards[20273]: }
Jun 12 17:04:43 wazuh-dashboard opensearch-dashboards[20273]: {"type":"log","@timestamp":"2023-06-12T17:04:43Z","tags":["error","plugins","securityDashboards"],"pid":20273,"message":"SAML IDP initiated authentication workflow failed: Error: failed to get token"}
Jun 12 17:04:43 wazuh-dashboard opensearch-dashboards[20273]: {"type":"error","@timestamp":"2023-06-12T17:04:43Z","tags":[],"pid":20273,"level":"error","error":{"message":"Internal Server Error","name":"Error","stack":"Error: Internal Server Error\n at HapiResponseAdapter.toError (/usr/share/wazuh-dashboard/src/core/server/http/router/response_adapter.js:143:19)\n at HapiResponseAdapter.toHapiResponse (/usr/share/wazuh-dashboard/src/core/server/http/router/response_adapter.js:97:19)\n at HapiResponseAdapter.handle (/usr/share/wazuh-dashboard/src/core/server/http/router/response_adapter.js:92:17)\n at Router.handle (/usr/share/wazuh-dashboard/src/core/server/http/router/router.js:164:34)\n at runMicrotasks (<anonymous>)\n at processTicksAndRejections (internal/process/task_queues.js:95:5)\n at handler (/usr/share/wazuh-dashboard/src/core/server/http/router/router.js:124:50)\n at exports.Manager.execute (/usr/share/wazuh-dashboard/node_modules/@hapi/hapi/lib/toolkit.js:60:28)\n at Object.internals.handler (/usr/share/wazuh-dashboard/node_modules/@hapi/hapi/lib/handler.js:46:20)\n at exports.execute (/usr/share/wazuh-dashboard/node_modules/@hapi/hapi/lib/handler.js:31:20)\n at Request._lifecycle (/usr/share/wazuh-dashboard/node_modules/@hapi/hapi/lib/request.js:371:32)\n at Request._execute (/usr/share/wazuh-dashboard/node_modules/@hapi/hapi/lib/request.js:281:9)"},"url":"
https://wazuh/_opendistro/_security/saml/acs/idpinitiated","message":"Internal Server Error"}
Jun 12 17:04:43 wazuh-dashboard opensearch-dashboards[20273]: {"type":"response","@timestamp":"2023-06-12T17:04:43Z","tags":[],"pid":20273,"method":"post","statusCode":500,"req":{"url":"/_opendistro/_security/saml/acs/idpinitiated","method":"post","headers":{"host":"wazuh","connection":"Keep-Alive","accept-encoding":"gzip","x-forwarded-for":"40.133.177.97","cf-ray":"7d63acacbf2e9c31-IAD","content-length":"12577","x-forwarded-proto":"https","cf-visitor":"{\"scheme\":\"https\"}","cache-control":"max-age=0","sec-ch-ua":"\"Not.A/Brand\";v=\"8\", \"Chromium\";v=\"114\", \"Brave\";v=\"114\"","sec-ch-ua-mobile":"?0","sec-ch-ua-platform":"\"macOS\"","upgrade-insecure-requests":"1","origin":"
https://okta.com","content-type":"application/x-www-form-urlencoded","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/
114.0.0.0 Safari/537.36","accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8","sec-gpc":"1","accept-language":"en-US,en;q=0.5","sec-fetch-site":"cross-site","sec-fetch-mode":"navigate","sec-fetch-dest":"document","referer":"
https://okta.com/","priority":"u=0, i","cdn-loop":"cloudflare","cf-connecting-ip":"40.133.177.97","cf-ipcountry":"US"},"remoteAddress":"172.70.174.46","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/
114.0.0.0 Safari/537.36","referer":"
https://okta.com/"},"res":{"statusCode":500,"responseTime":75,"contentLength":9},"message":"POST /_opendistro/_security/saml/acs/idpinitiated 500 75ms - 9.0B"}
Jun 12 17:04:43 wazuh-dashboard opensearch-dashboards[20273]: {"type":"response","@timestamp":"2023-06-12T17:04:43Z","tags":[],"pid":20273,"method":"get","statusCode":401,"req":{"url":"/favicon.ico","method":"get","headers":{"host":"wazuh","connection":"Keep-Alive","accept-encoding":"gzip","x-forwarded-for":"40.133.177.97","cf-ray":"7d63acafeb1d9c31-IAD","x-forwarded-proto":"https","cf-visitor":"{\"scheme\":\"https\"}","sec-ch-ua":"\"Not.A/Brand\";v=\"8\", \"Chromium\";v=\"114\", \"Brave\";v=\"114\"","sec-ch-ua-mobile":"?0","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/
114.0.0.0 Safari/537.36","sec-ch-ua-platform":"\"macOS\"","accept":"image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8","sec-gpc":"1","accept-language":"en-US,en;q=0.5","sec-fetch-site":"same-origin","sec-fetch-mode":"no-cors","sec-fetch-dest":"image","referer":"
https://wazuh/_opendistro/_security/saml/acs/idpinitiated","priority":"u=1, i","cdn-loop":"cloudflare","cf-connecting-ip":"40.133.177.97","cf-ipcountry":"US"},"remoteAddress":"172.70.174.55","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/
114.0.0.0 Safari/537.36","referer":"
https://wazuh/_opendistro/_security/saml/acs/idpinitiated"},"res":{"statusCode":401,"responseTime":6,"contentLength":9},"message":"GET /favico
Jun 12 17:04:43 wazuh-dashboard opensearch-dashboards[20273]: error: 'Unauthorized',
Jun 12 17:04:43 wazuh-dashboard opensearch-dashboards[20273]: message: 'Authentication Exception'
Jun 12 17:04:43 wazuh-dashboard opensearch-dashboards[20273]: },
Jun 12 17:04:43 wazuh-dashboard opensearch-dashboards[20273]: headers: { 'WWW-Authenticate': 'Basic realm="Authorization Required"' }
Jun 12 17:04:43 wazuh-dashboard opensearch-dashboards[20273]: },
Jun 12 17:04:43 wazuh-dashboard opensearch-dashboards[20273]: [Symbol(OpenSearchError)]: 'OpenSearch/notAuthorized'
Jun 12 17:04:43 wazuh-dashboard opensearch-dashboards[20273]: }
Jun 12 17:04:43 wazuh-dashboard opensearch-dashboards[20273]: {"type":"log","@timestamp":"2023-06-12T17:04:43Z","tags":["error","plugins","securityDashboards"],"pid":20273,"message":"SAML IDP initiated authentication workflow failed: Error: failed to get token"}
Jun 12 17:04:43 wazuh-dashboard opensearch-dashboards[20273]: {"type":"error","@timestamp":"2023-06-12T17:04:43Z","tags":[],"pid":20273,"level":"error","error":{"message":"Internal Server Error","name":"Error","stack":"Error: Internal Server Error\n at HapiResponseAdapter.toError (/usr/share/wazuh-dashboard/src/core/server/http/router/response_adapter.js:143:19)\n at HapiResponseAdapter.toHapiResponse (/usr/share/wazuh-dashboard/src/core/server/http/router/response_adapter.js:97:19)\n at HapiResponseAdapter.handle (/usr/share/wazuh-dashboard/src/core/server/http/router/response_adapter.js:92:17)\n at Router.handle (/usr/share/wazuh-dashboard/src/core/server/http/router/router.js:164:34)\n at runMicrotasks (<anonymous>)\n at processTicksAndRejections (internal/process/task_queues.js:95:5)\n at handler (/usr/share/wazuh-dashboard/src/core/server/http/router/router.js:124:50)\n at exports.Manager.execute (/usr/share/wazuh-dashboard/node_modules/@hapi/hapi/lib/toolkit.js:60:28)\n at Object.internals.handler (/usr/share/wazuh-dashboard/node_modules/@hapi/hapi/lib/handler.js:46:20)\n at exports.execute (/usr/share/wazuh-dashboard/node_modules/@hapi/hapi/lib/handler.js:31:20)\n at Request._lifecycle (/usr/share/wazuh-dashboard/node_modules/@hapi/hapi/lib/request.js:371:32)\n at Request._execute (/usr/share/wazuh-dashboard/node_modules/@hapi/hapi/lib/request.js:281:9)"},"url":"
https://wazuh/_opendistro/_security/saml/acs/idpinitiated","message":"Internal Server Error"}
Jun 12 17:04:43 wazuh-dashboard opensearch-dashboards[20273]: {"type":"response","@timestamp":"2023-06-12T17:04:43Z","tags":[],"pid":20273,"method":"post","statusCode":500,"req":{"url":"/_opendistro/_security/saml/acs/idpinitiated","method":"post","headers":{"host":"wazuh","connection":"Keep-Alive","accept-encoding":"gzip","x-forwarded-for":"40.133.177.97","cf-ray":"7d63acacbf2e9c31-IAD","content-length":"12577","x-forwarded-proto":"https","cf-visitor":"{\"scheme\":\"https\"}","cache-control":"max-age=0","sec-ch-ua":"\"Not.A/Brand\";v=\"8\", \"Chromium\";v=\"114\", \"Brave\";v=\"114\"","sec-ch-ua-mobile":"?0","sec-ch-ua-platform":"\"macOS\"","upgrade-insecure-requests":"1","origin":"
https://okta.com","content-type":"application/x-www-form-urlencoded","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/
114.0.0.0 Safari/537.36","accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8","sec-gpc":"1","accept-language":"en-US,en;q=0.5","sec-fetch-site":"cross-site","sec-fetch-mode":"navigate","sec-fetch-dest":"document","referer":"
https://okta.com/","priority":"u=0, i","cdn-loop":"cloudflare","cf-connecting-ip":"40.133.177.97","cf-ipcountry":"US"},"remoteAddress":"172.70.174.46","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/
114.0.0.0 Safari/537.36","referer":"
https://okta.com/"},"res":{"statusCode":500,"responseTime":75,"contentLength":9},"message":"POST /_opendistro/_security/saml/acs/idpinitiated 500 75ms - 9.0B"}
Jun 12 17:04:43 wazuh-dashboard opensearch-dashboards[20273]: {"type":"response","@timestamp":"2023-06-12T17:04:43Z","tags":[],"pid":20273,"method":"get","statusCode":401,"req":{"url":"/favicon.ico","method":"get","headers":{"host":"wazuh","connection":"Keep-Alive","accept-encoding":"gzip","x-forwarded-for":"40.133.177.97","cf-ray":"7d63acafeb1d9c31-IAD","x-forwarded-proto":"https","cf-visitor":"{\"scheme\":\"https\"}","sec-ch-ua":"\"Not.A/Brand\";v=\"8\", \"Chromium\";v=\"114\", \"Brave\";v=\"114\"","sec-ch-ua-mobile":"?0","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/
114.0.0.0 Safari/537.36","sec-ch-ua-platform":"\"macOS\"","accept":"image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8","sec-gpc":"1","accept-language":"en-US,en;q=0.5","sec-fetch-site":"same-origin","sec-fetch-mode":"no-cors","sec-fetch-dest":"image","referer":"
https://wazuh/_opendistro/_security/saml/acs/idpinitiated","priority":"u=1, i","cdn-loop":"cloudflare","cf-connecting-ip":"40.133.177.97","cf-ipcountry":"US"},"remoteAddress":"172.70.174.55","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/
114.0.0.0 Safari/537.36","referer":"
https://wazuh./_opendistro/_security/saml/acs/idpinitiated"},"res":{"statusCode":401,"responseTime":6,"contentLength":9},"message":"GET /favicon.ico 401 6ms - 9.0B"}
Jun 12 17:05:51 wazuh-dashboard opensearch-dashboards[20273]: {"type":"response","@timestamp":"2023-06-12T17:05:51Z","tags":[],"pid":20273,"method":"post","statusCode":404,"req":{"url":"/dns-query","method":"post","headers":{"host":"35.212.254.197","accept-encoding":"gzip, deflate","connection":"keep-alive","user-agent":"python-httpx/0.23.3","accept":"application/dns-message","content-type":"application/dns-message","content-length":"27"},"remoteAddress":"8.209.68.21","userAgent":"python-httpx/0.23.3"},"res":{"statusCode":404,"responseTime":54,"contentLength":9},"message":"POST /dns-query 404 54ms - 9.0B"}
Jun 12 17:13:44 wazuh-dashboard opensearch-dashboards[20273]: {"type":"response","@timestamp":"2023-06-12T17:13:44Z","tags":[],"pid":20273,"method":"get","statusCode":401,"req":{"url":"/index.php?s=%2FIndex%2F%5Cthink%5Capp%2Finvokefunction&function=call_user_func_array&vars%5B0%5D=md5&vars%5B1%5D%5B%5D=HelloThinkPHP21","method":"get","headers":{"host":"
35.212.254.197:443","user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36","accept-encoding":"gzip","connection":"close"},"remoteAddress":"83.97.73.89","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"},"res":{"statusCode":401,"responseTime":5,"contentLength":9},"message":"GET /index.php?s=%2FIndex%2F%5Cthink%5Capp%2Finvokefunction&function=call_user_func_array&vars%5B0%5D=md5&vars%5B1%5D%5B%5D=HelloThinkPHP21 401 5ms - 9.0B"}