git clone https://github.com/weaviate-tutorials/rbac.git
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
First, follow the instructions from your DX guide, and update environment variables in docker-compose.yml
Focus on: Configure Users with API keys
AUTHENTICATION_APIKEY_ENABLED
– enables auth with API keys, set to trueAUTHENTICATION_APIKEY_USERS
- a list of userIDsAUTHENTICATION_APIKEY_ALLOWED_KEYS
- a list of API keys for each of the above userID
Configure RBAC
AUTHORIZATION_RBAC_ENABLED
- enables RBAC, set to trueAUTHORIZATION_RBAC_ROOT_USERS
- a list of user_ids that have Admin/Root permissions. Root users can create new roles, manage their permissions and assign them to users.
When ready, run:
docker compose up -d
Follow instructions from your DX guide.