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. If changing the password of a user, then remove existing entry for that user from users.txt file. Otherwise go to step 3.

  • 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. Use the following command if you are editing the existing secret.

kubectl edit secret kfuse-auth-users
  • 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.