console icon indicating copy to clipboard operation
console copied to clipboard

Alternative to test SSO in UI

Open cniackz opened this issue 3 years ago • 0 comments

Objective:

Allow environmental variables set SSO for testing as this support was removed in previous PR: https://github.com/minio/console/pull/2167

How to test:

  1. Prepare MinIO for SSO
export MINIO_ROOT_USER=minio
export MINIO_ROOT_PASSWORD=minio123
export MINIO_IDENTITY_OPENID_CONFIG_URL=<url>
export MINIO_IDENTITY_OPENID_CLIENT_ID=<client-id>
export MINIO_IDENTITY_OPENID_CLIENT_SECRET=<secret>
export MINIO_IDENTITY_OPENID_SCOPES="openid,profile,email"
export MINIO_IDENTITY_OPENID_CLAIM_NAME="https://min.io/policy"
export MINIO_BROWSER_REDIRECT_URL=http://localhost:9001
export MINIO_SERVER_URL=http://localhost:9000
minio server ~/Data --console-address ":9001"
  1. Set your Console Variables, compile and execute:
cd ~/console
export CONSOLE_IDP_URL=<url>
export CONSOLE_IDP_CLIENT_ID=<client-id>
export CONSOLE_IDP_SECRET=<secret>
export CONSOLE_IDP_CALLBACK=<url>
make install-sso
~/go/bin/console server
  1. Prepare UI for testing:
cd ~/console/portal-ui
yarn install
yarn build
yarn run start
  1. You can test SSO Login in UI port 5005:
Screen Shot 2022-08-31 at 11 56 10 AM

Related PRs:

  • https://github.com/minio/console/pull/2167
  • https://github.com/minio/console/pull/2201

Important Part:

To modify a variable in Go Binary during build

-ldflags="-s -w -X 'main.ssoTesting=readFromVars'"

Other unrelated failures:

Operator API test is failing but unrelated to this PR:

  • https://github.com/minio/console/pull/2289

cniackz avatar Aug 31 '22 15:08 cniackz