From 182759848c898fe811714af4d30da841e0de9403 Mon Sep 17 00:00:00 2001 From: Joe Chen Date: Mon, 20 Mar 2023 15:02:30 +0800 Subject: [PATCH 1/3] soap: quick steps to debug config --- .../cloud/technical-docs/oidc_site_admin.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/content/departments/cloud/technical-docs/oidc_site_admin.md b/content/departments/cloud/technical-docs/oidc_site_admin.md index da5929a4a038..e50daa6e6680 100644 --- a/content/departments/cloud/technical-docs/oidc_site_admin.md +++ b/content/departments/cloud/technical-docs/oidc_site_admin.md @@ -177,3 +177,16 @@ Disabling SOAP is currently not supported on v2. 4. Start the local Sourcegraph instance and sign in with **Continue with Sourcergaph Operators** using the same Okta account used in the step 1. > NOTE: If you are not using `sg` to start your Sourcegraph instance, make sure the environment variable `SRC_CLOUD_SITE_CONFIG` is set for `frontend`/`sourcegraph-frontend` and `worker` services. + +### How debug SOAP configuration? + +> WARNING: Do not use any online base64 tool to decode `SRC_CLOUD_SITE_CONFIG` because its value is only encoded but not encrypted! + +1. Grab the value of the environment variable `SRC_CLOUD_SITE_CONFIG`, e.g. `eyJzaWduYXR1cmUiOnsiRm9ybWF0Ijoic3NoLWVkMjU1M...`. +2. Use `base64` to decode to get its signature and signed content (`siteConfig`): + + ```sh + echo "eyJzaWduYXR1cmUiOnsiRm9ybWF0Ijoic3NoLWVkMjU1M..." | base64 --decode + ``` + +3. Use `base64` to decode the `siteConfig` again to get the actual content. From c7be122232ccba3633834d691559128fa7207f5f Mon Sep 17 00:00:00 2001 From: Joe Chen Date: Mon, 20 Mar 2023 15:03:06 +0800 Subject: [PATCH 2/3] Update oidc_site_admin.md --- content/departments/cloud/technical-docs/oidc_site_admin.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/departments/cloud/technical-docs/oidc_site_admin.md b/content/departments/cloud/technical-docs/oidc_site_admin.md index e50daa6e6680..80dd2a18e5a0 100644 --- a/content/departments/cloud/technical-docs/oidc_site_admin.md +++ b/content/departments/cloud/technical-docs/oidc_site_admin.md @@ -189,4 +189,4 @@ Disabling SOAP is currently not supported on v2. echo "eyJzaWduYXR1cmUiOnsiRm9ybWF0Ijoic3NoLWVkMjU1M..." | base64 --decode ``` -3. Use `base64` to decode the `siteConfig` again to get the actual content. +3. Use `base64` to decode the `siteConfig` field again to get the actual content. From e24fd8eb6d50ede90fa610d74d35d87d5f9c70a1 Mon Sep 17 00:00:00 2001 From: unknwon Date: Mon, 20 Mar 2023 07:04:31 +0000 Subject: [PATCH 3/3] squash! Prettier --- content/departments/cloud/technical-docs/oidc_site_admin.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/departments/cloud/technical-docs/oidc_site_admin.md b/content/departments/cloud/technical-docs/oidc_site_admin.md index 80dd2a18e5a0..19da229b2319 100644 --- a/content/departments/cloud/technical-docs/oidc_site_admin.md +++ b/content/departments/cloud/technical-docs/oidc_site_admin.md @@ -184,7 +184,7 @@ Disabling SOAP is currently not supported on v2. 1. Grab the value of the environment variable `SRC_CLOUD_SITE_CONFIG`, e.g. `eyJzaWduYXR1cmUiOnsiRm9ybWF0Ijoic3NoLWVkMjU1M...`. 2. Use `base64` to decode to get its signature and signed content (`siteConfig`): - + ```sh echo "eyJzaWduYXR1cmUiOnsiRm9ybWF0Ijoic3NoLWVkMjU1M..." | base64 --decode ```