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

Support Signed JWT #6

Open
torbsto opened this issue Feb 23, 2024 · 0 comments
Open

Support Signed JWT #6

torbsto opened this issue Feb 23, 2024 · 0 comments

Comments

@torbsto
Copy link
Contributor

torbsto commented Feb 23, 2024

There are different ways how Keycloak can authenticate a client (that is, not the user but the backend or frontend). So far we use a client secret but we also need to support signed JWT.
Here, the client (!) generates a private/public key pair, creates a JWT and signs it with the private key. Additionally, Keycloak needs to know about the public key. There are two options: 1) Upload the key manually. 2) An admin can configure a URL where Keycloak can fetch the cert. This allows rotating keys without having to reconfigure Keycloak and is therefore preferred.

I've made a working PoC how this can be achieved: https://github.com/bakdata/python-keycloak-oauth/pull/5/files

I think the following things are missing:

  • Endpoint for the public key
  • A utlitly to read a cert and extract the public key
  • An abstraction over the auth_method (maybe we can just add all those arguments to client_kwargs already?)
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

No branches or pull requests

1 participant