Skip to content

Conversation

olexandr-havryliak
Copy link
Contributor

Example setup with keycloak, requires mongo-go-driver v2
To aquire access_token from keycloak:
curl -XPOST "https://keycloak:8443/realms/test/protocol/openid-connect/token" -d 'grant_type=client_credentials&client_id=pbmclient&client_secret=pbm-secret' -i
To connect to mongodb with native mongoshell using this access_token
mongo --authenticationMechanism MONGODB-OIDC --authenticationDatabase="\$external" --oidcAccessToken=
To connect to mongodb using pbm - put this token into the file
/var/run/secrets/kubernetes.io/serviceaccount/token

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