Configure password authentication
Creating a User
ResiliencyIO allows define multiple users to login trought to a Kubernetes Secret. By default, this Secret is called:
<instance-name>-users
You can define multiple users inside the same
<instance-name>-userssecret. In this guide, we’ll use theresiliency-io-userssecret.
1. Download the current secret content
Save the current users list to a file:
kubectl get secret resiliency-io-users -n resiliency-system -o jsonpath="{.data.users\.yaml}" | base64 --decode > users.yaml
2. Add more users
Edit the users.yaml file and append new user entries following the same structure:
# Existing users
# ...
# New users:
- email: user@example.com
username: username
password: your-password
3. Update the Kubernetes secret
Once the file is updated, re-encode it and update the secret:
kubectl create secret generic resiliency-io-users \
--from-file=users.yaml=users.yaml \
-n resiliency-system \
--dry-run=client -o yaml | kubectl apply -f -
This will overwrite the existing secret with the updated list of users.
You can check that the users were correctly updated by decoding the secret again:
kubectl get secret resiliency-io-users -n resiliency-system -o jsonpath="{.data.users\.yaml}" | base64 --decode