To enable Google OAuth2, you need to register a new application with Google.
If upgrading Kloudfuse release 1.3.4 and earlier, please make sure to follow post upgrade steps after finishing upgrade.
Go to the Credentials page.
Click Create credentials > OAuth client ID.
Select the Web application application type.
Enter Name (e.g. Kloudfuse)
Enter URL of the kloudfuse installation in the Authorized JavaScript Origins. Example: kloudfuse.yourcompany.com
Enter URL with /oauth2/callback of the kloudfuse in the Authorized redirect URIs. Example: kloudfuse.yourcompany.com/oauth2/callback
Click Create
Copy the Client ID and Client Secret from the ‘OAuth Client’ modal. It is required for further steps.
In your custom values.yaml, add google client ID and secret:
kfuse-auth: oauth2-proxy: config: clientID: "REPLACE_CLIENT_ID" clientSecret: "REPLACE_CLIENT_SECRET" |
Create 2 kubernetes secrets in kfuse
namespace.
Create secret called kfuse-auth-users
as mentioned here.
Create secret called kfuse-auth-google
. Use base64 encoded values of client-id and client-secret from above. To generate cookie secret, use these steps.
apiVersion: v1 data: client-id: <base 64 encoded google client id> client-secret: <base 64 encoded google client secret> cookie-secret: <base 64 encoded random value> kind: Secret metadata: name: kfuse-auth-google type: Opaque |
and refer it from your custom values.yaml by adding the following
kfuse-auth: oauth2-proxy: config: existingSecret: "kfuse-auth-google" htpasswdFile: existingSecret: "kfuse-auth-users" |