diff --git a/.github/workflows/cypress-test-oidc-e2e.yml b/.github/workflows/cypress-test-oidc-e2e.yml index 6f6a025e9..2c1dcc39b 100644 --- a/.github/workflows/cypress-test-oidc-e2e.yml +++ b/.github/workflows/cypress-test-oidc-e2e.yml @@ -191,23 +191,26 @@ jobs: if: ${{ runner.os == 'Linux' }} run: | cd ./OpenSearch-Dashboards - echo 'server.host: "localhost"' >> ./config/opensearch_dashboards.yml - echo 'opensearch.hosts: ["https://localhost:9200"]' >> ./config/opensearch_dashboards.yml - echo 'opensearch.ssl.verificationMode: none' >> ./config/opensearch_dashboards.yml - echo 'opensearch.username: "kibanaserver"' >> ./config/opensearch_dashboards.yml - echo 'opensearch.password: "kibanaserver"' >> ./config/opensearch_dashboards.yml - echo 'opensearch.requestHeadersWhitelist: [ authorization,securitytenant ]' >> ./config/opensearch_dashboards.yml - echo 'opensearch_security.multitenancy.enabled: true' >> ./config/opensearch_dashboards.yml - echo 'opensearch_security.multitenancy.tenants.preferred: ["Private", "Global"]' >> ./config/opensearch_dashboards.yml - echo 'opensearch_security.readonly_mode.roles: ["kibana_read_only"]' >> ./config/opensearch_dashboards.yml - echo 'opensearch_security.cookie.secure: false' >> ./config/opensearch_dashboards.yml - echo 'opensearch_security.openid.connect_url: "http://127.0.0.1:8080/auth/realms/master/.well-known/openid-configuration"' >> ./config/opensearch_dashboards.yml - echo 'opensearch_security.openid.client_id: "opensearch"' >> ./config/opensearch_dashboards.yml - echo 'opensearch_security.openid.client_secret: "${{ env.TEST_KEYCLOAK_CLIENT_SECRET }}"'>> ./config/opensearch_dashboards.yml - echo 'opensearch_security.auth.type: ["openid"]' >> ./config/opensearch_dashboards.yml - echo 'opensearch_security.auth.multiple_auth_enabled: true' >> ./config/opensearch_dashboards.yml - echo 'opensearch_security.ui.openid.login.buttonname: "OIDC"' >> ./config/opensearch_dashboards.yml - echo 'home.disableWelcomeScreen: true' >> ./config/opensearch_dashboards.yml + rm -rf ./config/opensearch_dashboards.yml + cat << 'EOT' > ./config/opensearch_dashboards.yml + server.host: "localhost" + opensearch.hosts: ["https://localhost:9200"] + opensearch.ssl.verificationMode: none + opensearch.username: "kibanaserver" + opensearch.password: "kibanaserver" + 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.cookie.secure: false + opensearch_security.openid.connect_url: "http://127.0.0.1:8080/auth/realms/master/.well-known/openid-configuration" + opensearch_security.openid.client_id: "opensearch" + opensearch_security.openid.client_secret: "${{ env.TEST_KEYCLOAK_CLIENT_SECRET }}" + opensearch_security.auth.type: ["openid"] + opensearch_security.auth.multiple_auth_enabled: true + opensearch_security.ui.openid.login.buttonname: "OIDC" + home.disableWelcomeScreen: true + EOT echo 'HERE IS THE DASHBOARD CONFIG' cat ./config/opensearch_dashboards.yml nohup yarn start --no-base-path --no-watch & diff --git a/.github/workflows/cypress-test-saml-e2e.yml b/.github/workflows/cypress-test-saml-e2e.yml index 25578ecdc..5ff953bde 100644 --- a/.github/workflows/cypress-test-saml-e2e.yml +++ b/.github/workflows/cypress-test-saml-e2e.yml @@ -175,21 +175,24 @@ jobs: if: ${{ runner.os == 'Linux' }} run: | cd ./OpenSearch-Dashboards - echo 'server.host: "localhost"' >> ./config/opensearch_dashboards.yml - echo 'opensearch.hosts: ["https://localhost:9200"]' >> ./config/opensearch_dashboards.yml - echo 'opensearch.ssl.verificationMode: none' >> ./config/opensearch_dashboards.yml - echo 'opensearch.username: "kibanaserver"' >> ./config/opensearch_dashboards.yml - echo 'opensearch.password: "kibanaserver"' >> ./config/opensearch_dashboards.yml - echo 'opensearch.requestHeadersWhitelist: [ authorization,securitytenant ]' >> ./config/opensearch_dashboards.yml - echo 'opensearch_security.multitenancy.enabled: true' >> ./config/opensearch_dashboards.yml - echo 'opensearch_security.multitenancy.tenants.preferred: ["Private", "Global"]' >> ./config/opensearch_dashboards.yml - echo 'opensearch_security.readonly_mode.roles: ["kibana_read_only"]' >> ./config/opensearch_dashboards.yml - echo 'opensearch_security.cookie.secure: false' >> ./config/opensearch_dashboards.yml - echo 'server.xsrf.allowlist: ["/_plugins/_security/api/authtoken", "/_opendistro/_security/api/authtoken", "/_opendistro/_security/saml/acs", "/_opendistro/_security/saml/acs/idpinitiated", "/_opendistro/_security/saml/logout"]' >> ./config/opensearch_dashboards.yml - echo 'opensearch_security.auth.type: ["saml"]' >> ./config/opensearch_dashboards.yml - echo 'opensearch_security.auth.multiple_auth_enabled: true' >> ./config/opensearch_dashboards.yml - echo 'opensearch_security.auth.anonymous_auth_enabled: false' >> ./config/opensearch_dashboards.yml - echo 'home.disableWelcomeScreen: true' >> ./config/opensearch_dashboards.yml + rm -rf ./config/opensearch_dashboards.yml + cat << 'EOT' > ./config/opensearch_dashboards.yml + server.host: "localhost" + opensearch.hosts: ["https://localhost:9200"] + opensearch.ssl.verificationMode: none + opensearch.username: "kibanaserver" + opensearch.password: "kibanaserver" + 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.cookie.secure: false + server.xsrf.allowlist: ["/_plugins/_security/api/authtoken", "/_opendistro/_security/api/authtoken", "/_opendistro/_security/saml/acs", "/_opendistro/_security/saml/acs/idpinitiated", "/_opendistro/_security/saml/logout"] + opensearch_security.auth.type: ["saml"] + opensearch_security.auth.multiple_auth_enabled: true + opensearch_security.auth.anonymous_auth_enabled: false + home.disableWelcomeScreen: true + EOT echo 'HERE IS THE DASHBOARD CONFIG' cat ./config/opensearch_dashboards.yml nohup yarn start --no-base-path --no-watch &