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

Add support for signed JWT (client assertion) authentication in Java admin client #108

Open
gim- opened this issue Nov 18, 2024 · 0 comments

Comments

@gim-
Copy link

gim- commented Nov 18, 2024

Description

Current admin client implementation only supports 3 options for authentication:

  • Basic username & password - usually considered insecure
  • Client ID and client secret - good and simple option, but not most secure
  • Already existing access token - access token has to be managed outside of the client, and the client instance has to be recreated after every access token expiration

But the most secure way for client authentication, with signed JWT, is not supported, and we'd like to see it implemented or at least be able to override default TokenManager implementation with our own and pass it to the admin client.

Discussion

No response

Motivation

One of our client applications is using Keycloak java admin client to make changes in Keycloak realms based on all kind of business events. Though one of the security requirements in the organisation is to only use signed JWT (client assertion) for client authentication. Basic and client secret are discouraged.

Details

I believe there are 2 things that could be done to improve this and make it future-proof:

  • Add a way to inject a custom TokenManager implementation into Keycloak instance.
  • Provide out-of-the-box TokenManager implementation that supports signed JWT authentication and manages access token lifecycle automatically

I'm open to contributing by implementing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants