Skip to content

Preparing an IAM instance for test purposes: how to get a refresh token without requiring any manual operation during the test? #563

Answered by federicaagostini
aldbr asked this question in Q&A
Discussion options

You must be logged in to vote

Hello, if the DIRAC service relies on a scope based authorization model you can use client_credentials (the RT is not issued since a new access token can be requested in an automated way given the credentials of the client).

In case for instance the service requires to know the groups a user belongs to, you could use the refresh_token flow.
For example:

  • obtain a RT from an authorization code flow including the offline_access scope (you can use iam-test-client, or oidc-agent for instance)
  • register a client with the refresh_token grant enabled
  • store the RT, client_id and client_secret in a secure place of your automated environment
  • use the refresh token flow as done in this example to get …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@aldbr
Comment options

Answer selected by aldbr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants