Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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.

Create Google OAuth2 Keys

  1. Go to the Credentials page.

  2. Click Create credentials > OAuth client ID.

  3. Select the Web application application type.

  4. Enter Name (e.g. Kloudfuse)

  5. Enter URL of the kloudfuse installation in the Authorized JavaScript Origins. Example: kloudfuse.yourcompany.com

  6. Enter URL with /oauth2/callback of the kloudfuse in the Authorized redirect URIs. Example: kloudfuse.yourcompany.com/oauth2/callback

  7. Click Create

  8. Copy the Client ID and Client Secret from the ‘OAuth Client’ modal. It is required for further steps.

Enable Google Auth in Kloudfuse

...

Edit the auth-credentials secret in kfuse namespace of your kloudfuse installation.

  1. Replace/add Client ID, Client Secret and google domain - you will need to do base64 encode the Client ID, Client Secret and the google domain.

  2. Code Block
    kubectl edit secret auth-credentials -n kfuse

...

Set the authentication type (AUTH_TYPE) in auth config map to “google”

  1. Code Block
     kubectl edit configmap auth -n kfuse
  2. You can also edit the values.yaml from your original installation of kfuse to add:

  3. Code Block
    auth:
      config:
        AUTH_TYPE: "google"
  4. You will need to do

    Code Block
    helm upgrade --install kfuse -f <values.yaml> -f <gcp/aws>.yaml

...

For the config to take effect

...

Restart the auth service

...

Option 1. Using Client ID & Secret
  • In your custom values.yaml, add google client ID and secret:

Code Block
 kfuse-auth:
   oauth2-proxy:
     config:
       clientID: "REPLACE_CLIENT_ID"
       clientSecret: "REPLACE_CLIENT_SECRET"
Option 2. Using a Kubernetes secrets.
  • 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.

Code Block
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

Code Block
kfuse-auth:
  oauth2-proxy:
    config:
      existingSecret: "kfuse-auth-google"
    htpasswdFile:
      existingSecret: "kfuse-auth-users"