Adding users or changing password

If upgrading Kloudfuse release 1.3.4 and earlier, please make sure to follow post upgrade steps after finishing upgrade.

 

To setup new credentials for a user or adding a new user follow these steps:

  • Step 1. Dump the current content of the htpasswd ‘users.txt’ file.

    # Make sure to connect to kfuse cluster. rm users.txt # ignore this if there's no such file currently. kubectl get secret -n kfuse kfuse-auth-users -o json | jq -r '.data."users.txt"' | base64 -d > users.txt
  • Step 2. Remove existing entry for the user from users.txt file.

  • Step 3. create or change password for the user (following example uses testuser as the user. For admin user use admin ):

    htpasswd -Bn testuser >> users.txt cat users.txt | base64
  • Step 4. create a kubernetes secret called kfuse-auth-users (or update the existing one). Use the output of cat users.txt| base64 as the value of users.txt entry in the secret as shown below.

    apiVersion: v1 data: users.txt: |- <base64-encoded-value-from-above> kind: Secret metadata: name: kfuse-auth-users type: Opaque
  • Step 5. Skip to Step 6 if adding new user or updating password for existing user. Otherwise, update your custom values.yaml to point to kfuse-auth-users secret as below:

  • Step 6. restart kfuse-auth deployment.