@@ -10,67 +10,73 @@ The following diagram depicts the components that are involved:
1010
1111## Setting up an OIDC SSO configuration
1212
13+ In order to be able to authenticate using OIDC SSO, you'll need to choose and configure a suitable OIDC provider. For this sample we demonstrate how this can be achieved by either using GitHub, or an IBM-internal provider. While many other OIDC providers will also work out-of-the-box, some may require few adjustments in the implementation of the ` auth ` app that we provide in this sample.
14+
1315### Github.com OIDC SSO
1416
17+ Github.com provides a publicly available OIDC provider, that can be used to point to Code Engine applications, which you deployed in your IBM Cloud account. Use the following steps to configure an SSO app:
18+
1519* Create Github OIDC app through https://github.com/settings/developers
1620 ```
17- name: jupyter
18- homepage: https://jupyter -auth.<CE_SUBDOMAIN>.<REGION>.codeengine.appdomain.cloud
19- callback URL: https://jupyter -auth.<CE_SUBDOMAIN>.<REGION>.codeengine.appdomain.cloud/auth/callback
21+ name: oidc-sample
22+ homepage: https://oidc-sample -auth.<CE_SUBDOMAIN>.<REGION>.codeengine.appdomain.cloud
23+ callback URL: https://oidc-sample -auth.<CE_SUBDOMAIN>.<REGION>.codeengine.appdomain.cloud/auth/callback
2024 ```
2125* Store the client id and the secret in local file called `oidc.properties`
2226 ```
23- OIDC_CLIENT_ID=<CLIENT_ID>
24- OIDC_CLIENT_SECRET=<CLIENT_SECRET>
27+ echo " OIDC_CLIENT_ID=<CLIENT_ID>" > oidc.properties
28+ echo " OIDC_CLIENT_SECRET=<CLIENT_SECRET>" >> oidc.properties
2529 ```
2630* Generate a random cookie secret that is used to encrypt the auth cookie value and add it to the `oidc.properties` file
2731 ```
28- COOKIE_SIGNING_ENCRYPTION_KEY=$(openssl rand -base64 32)
32+ echo " COOKIE_SIGNING_ENCRYPTION_KEY=$(openssl rand -base64 32)" >> oidc.properties
2933 ```
3034* From your OIDC provider obtain the following values and add them to the `oidc.properties` file
3135 ```
32- OIDC_PROVIDER_AUTHORIZATION_ENDPOINT=https://github.com/login/oauth/authorize
33- OIDC_PROVIDER_TOKEN_ENDPOINT=https://github.com/login/oauth/access_token
34- OIDC_PROVIDER_USERINFO_ENDPOINT=https://api.github.com/user
36+ echo " OIDC_PROVIDER_AUTHORIZATION_ENDPOINT=https://github.com/login/oauth/authorize" >> oidc.properties
37+ echo " OIDC_PROVIDER_TOKEN_ENDPOINT=https://github.com/login/oauth/access_token" >> oidc.properties
38+ echo " OIDC_PROVIDER_USERINFO_ENDPOINT=https://api.github.com/user" >> oidc.properties
3539 ```
36- * To add authorization checks one can either check for a specific user property
40+ * To add authorization checks one can check for a specific user property
3741 ```
38- AUTHZ_USER_PROPERTY=login
39- AUTHZ_ALLOWED_USERS=<<comma-separated-list-of-github-users>
42+ echo " AUTHZ_USER_PROPERTY=login" >> oidc.properties
43+ echo " AUTHZ_ALLOWED_USERS=<<comma-separated-list-of-github-users>" >> oidc.properties
4044 ```
4145
4246### IBMers-only: w3Id OIDC SSO
4347
44- * Create w3Id OIDC configuration through https://ies-provisioner.prod.identity-services.intranet.ibm.com/tools/sso/home
48+ To protect IBM's workforce, the SSO Provisioner provides the ability to configure an w3Id SSO. Note: This SSO provider can only be used by IBMers
49+
50+ * Create w3Id OIDC configuration through https://w3.ibm.com/security/sso-provisioner
4551 ```
46- name: jupyter
47- homepage: https://jupyter -auth.<CE_SUBDOMAIN>.<REGION>.codeengine.appdomain.cloud
48- callback URL: https://jupyter -auth.<CE_SUBDOMAIN>.<REGION>.codeengine.appdomain.cloud/auth/callback
52+ name: oidc-sample
53+ homepage: https://oidc-sample -auth.<CE_SUBDOMAIN>.<REGION>.codeengine.appdomain.cloud
54+ callback URL: https://oidc-sample -auth.<CE_SUBDOMAIN>.<REGION>.codeengine.appdomain.cloud/auth/callback
4955 ```
5056* Store the client id and the secret in local file called `oidc.properties`
5157 ```
52- OIDC_CLIENT_ID=<CLIENT_ID>
53- OIDC_CLIENT_SECRET=<CLIENT_SECRET>
58+ echo " OIDC_CLIENT_ID=<CLIENT_ID>" > oidc.properties
59+ echo " OIDC_CLIENT_SECRET=<CLIENT_SECRET>" >> oidc.properties
5460 ```
5561* Generate a random cookie secret that is used to encrypt the auth cookie value and add it to the `oidc.properties` file
5662 ```
57- COOKIE_SIGNING_ENCRYPTION_KEY=$(openssl rand -base64 32)
63+ echo " COOKIE_SIGNING_ENCRYPTION_KEY=$(openssl rand -base64 32)" >> oidc.properties
5864 ```
5965* From your OIDC provider obtain the following values and add them to the `oidc.properties` file
6066 ```
61- OIDC_PROVIDER_AUTHORIZATION_ENDPOINT=
62- OIDC_PROVIDER_TOKEN_ENDPOINT=
63- OIDC_PROVIDER_USERINFO_ENDPOINT=
67+ echo " OIDC_PROVIDER_AUTHORIZATION_ENDPOINT=" >> oidc.properties
68+ echo " OIDC_PROVIDER_TOKEN_ENDPOINT=" >> oidc.properties
69+ echo " OIDC_PROVIDER_USERINFO_ENDPOINT=" >> oidc.properties
6470 ```
6571* To add authorization checks one can either check for a specific user property, for a group property match
6672 ```
67- AUTHZ_USER_PROPERTY=preferred_username
68- AUTHZ_ALLOWED_USERS=<comma-separated-list-of-usernames>
73+ echo " AUTHZ_USER_PROPERTY=preferred_username" >> oidc.properties
74+ echo " AUTHZ_ALLOWED_USERS=<comma-separated-list-of-usernames>" >> oidc.properties
6975 ```
7076* Or for a group property match
7177 ```
72- AUTHZ_USER_PROPERTY=blueGroups
73- AUTHZ_ALLOWED_USERS=<comma-separated-list-of-groups>
78+ echo " AUTHZ_USER_PROPERTY=blueGroups" >> oidc.properties
79+ echo " AUTHZ_ALLOWED_USERS=<comma-separated-list-of-groups>" >> oidc.properties
7480 ```
7581
7682## Installing the sample
0 commit comments