Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OAuth2 Client credentials flow for M2M requests #396

Open
4 tasks
byewokko opened this issue Jun 24, 2024 · 1 comment
Open
4 tasks

OAuth2 Client credentials flow for M2M requests #396

byewokko opened this issue Jun 24, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@byewokko
Copy link
Collaborator

OAuth defines client credentials flow as a means of obtaining access token on behalf of the client application, without end-user authentication. This token is used for M2M requests, like an API key.

Describe the solution you'd like

  • The token endpoint initiates the client credentials flow if the grant_type request parameter value is client_credentials.
  • The code parameter must not be expected in this case.
  • The client must be authenticated according to their configured token_endpoint_auth_method.
  • If successful, the server must issue a new access token and ID token (without refresh token!) and return them in the response.

See RFC6749#4.4 for details.

@byewokko byewokko added the enhancement New feature or request label Jun 24, 2024
@byewokko
Copy link
Collaborator Author

byewokko commented Jul 1, 2024

Set up confidential client (with client secret)

Implement client link to m2m credentials

  • New m2m_credentials_id attribute in client.
  • This allows for assigning tenants and roles to the client.

Implement client credentials flow

  • Must comply with https://datatracker.ietf.org/doc/html/rfc6749#section-4.4
  • Make sure that the common auth code flow (with authorized user) is also handled somehow - at least NotImplementedError.
  • Create root SSO session with m2m_credentials_id, then immediately create client session with client_id.

Bonus

  • Implement WebUI for resetting client secret and setting token_endpoint_auth_method and m2m_credentials_id.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant