Replies: 3 comments 11 replies
-
|
Anyone, please? π I just cannot believe there is no method to authenticate a user (just authenticate it, maybe return something given we are already there). |
Beta Was this translation helpful? Give feedback.
-
|
Check the docs: https://min.io/docs/minio/linux/reference/minio-mc.html#test-the-connection |
Beta Was this translation helpful? Give feedback.
-
|
For future reference, this is the BASH script I am executing in an # Set temporary alias
mcli alias set tmp-alias https://$(hostname -f):9000 svc-account "password"
if [ "$?" == "0" ]
then
# Credentials are valid: clean up and exit
mcli alias remove tmp-alias
else
# Credentials invalid: check if service account exists
mcli admin user svcacct info $(hostname) "svc-account"
if [ "$?" == "0" ]
then
# Service account exists: rotate password
mcli admin accesskey edit $(hostname) "svc-account" --secret-key "password"
else
# Service account does not exist: create it
mcli admin accesskey create $(hostname) parent_user \
--access-key "svc-account" \
--secret-key "password" \
--policy "/tmp/svcacct-policy-.json" \
--name "Some name" \
--description "Some description"
fi
fi |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone! First time here and cross-posting from Reddit, where I also seeked help.
On a MinIO installation (latest version as of 2024-02-14), I have a user and this user has a number of service accounts, one per customer (separate web application per customer).
I use Ansible to deploy and update the application into separate LXC containers. This playbook includes handing the MinIO service account and bucket of each customer. When creating a new customer from scratch, the service account does not exist, but it does when updating.
I would like to know whether there is a way for me to use
mc admin user avcacct info(or similar) to attempt an authentication and check whether my current credentials are valid, therefore I don't need to re-create or modify the service account.I have been browsing the documentation but I could not find it.
If
mcdoes not support such feature, Maybe via the API? If so, how could I achieve that? I could use the "parent" user that "owns" the service account to validate myself when calling a certain method.Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions