Minio IAM¶
Admin service account¶
Set temporary admin alias:
Add serviceaccount to the admin account:
mc admin user svcacct add admin_tmp admin \
--name admin --description "Generic admin serviceaccount"
Use shown access and secret key to create a new alias:
Test if serviceaccount works:
Show information about accesskey including attached policy:
Users and service accounts¶
Create a user:
Add serviceaccount to varac's account:
mc admin user svcacct add pinenas-pub-varac varac \
--name restic-zancas --description "Restic backup on zancas"
Show information about accesskey including attached policy:
List all Serviceaccounts associated to an account:
Policies¶
List all global policies:
Dump readwrite (default) policy and write to file:
mc admin policy info pinenas-pub-admin readwrite | jq .Policy \
> ~/projects/cloud/storage/minio/policies/readwrite.json
Create global policy:
Attach global policy to user:
Remove/detach global policy from user:
Create a bucket:
And allow serviceaccount to use it (rw):
jq '.Statement[0].Resource = ["arn:aws:s3:::restic.zancas/*"]' \
~/projects/cloud/storage/minio/policies/readwrite.json > /tmp/policy-new.json
mc admin user svcacct edit --policy /tmp/policy-new.json \
pinenas-pub-admin ACCESSKEY
List all users with theis associated accesskeys: