stale-queen-97584
09/14/2022, 2:15 PMkratos
user with an admin (service account?) with a certain keto
access rule?
The goal is to create a developer account to maintain keto
rights that can only be accessed by our developers. One way, we figure, is to use kubectl exec
, but since this account only needs to be created on initialization, there must be a more conventional way
๐ค ๐จmagnificent-energy-493
kubectl exec
? I assume you call the Kratos admin API to create the account and add the relation-tuple to Keto - apologies, but I am not really familiar with k8s..stale-queen-97584
09/15/2022, 10:57 AMkubectl
cli is fine toomagnificent-energy-493
worried-kitchen-94392
09/15/2022, 11:43 AMstale-queen-97584
09/20/2022, 6:58 AMUSER_ID=$(curl --silent --show-error \
-X POST "<http://kratos-admin/admin/identities>" \
-d '{"schema_id":"user","traits":{"email":"<mailto:example@example.com|example@example.com>","name":{"first":"admin"}},"credentials":{"password":{"config":{"password":"valid_exammple"}}}}' -H 'Content-Type: application/json' | jq '.id')
echo USER_ID=$USER_ID
curl -s -i \
-X PUT "<http://keto-write/relation-tuples>" \
-d '{"namespace":"permissions","object":"administration","relation":"access","subject_id":'"$USER_ID"'}' -H 'Content-Type: application/json'
worried-kitchen-94392
09/20/2022, 7:03 AMmagnificent-energy-493