Skip to content

Conversation

shdpl
Copy link

@shdpl shdpl commented Apr 27, 2025

I've been following the guide on configuring MinIO for Authenticating using keycloak.
I think that section 2) Validate Admin API Access of Enable the Keycloak Admin REST API doesn't work as it's supposed to.

Expected Behavior

Retrieve the bearer token:

curl -d "client_id=minio" \
     -d "client_secret=secretvalue" \
     -d "grant_type=client_credentials" \
     http://keycloak-url:port/realms/REALM/protocol/openid-connect/token

Use the value returned as the access_token to access the Admin API:

curl -H "Authorization: Bearer ACCESS_TOKEN_VALUE" \
     http://keycloak-url:port/admin/realms/REALM/users/UUID

Current Behavior

Retrieve the bearer token:

curl -d "client_id=minio" \
     -d "client_secret=secretvalue" \
     -d "grant_type=password" \
     http://keycloak-url:port/admin/realms/REALM/protocol/openid-connect/token

Use the value returned as the access_token to access the Admin API:

curl -H "Authentication: Bearer ACCESS_TOKEN_VALUE" \
     http://keycloak-url:port/admin/realms/REALM/users/UUID

Possible Solution

Replacing snippets from Current Behavior to Expected Behavior i mentioned seems to work.

Steps to Reproduce (for bugs)

Follow the guide under https://min.io/docs/minio/container/operations/external-iam/configure-keycloak-identity-management.html

…without "admin" prefix for retrieving bearer token, "Authorization" instead of "Authentication" for testing access to the Admin API
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant