[NEW] Keycloak: JWT login via REST API#13413
[NEW] Keycloak: JWT login via REST API#13413KonstantinCodes wants to merge 2 commits intoRocketChat:developfrom
Conversation
c92435e to
f4728f6
Compare
f4728f6 to
60320e1
Compare
|
@KonstantinCodes - not sure of actual issue, can you make use of JWK set which is published by Keycloak? You should be able to read public key needed to verify issued tokens. Usually it is available at |
|
@splatch Yes, you're right. I think it's a good idea to fetch the Public Key from the server. |
|
Hello, |
|
An additional note |
|
With the latest commits (pull request #14113) Rocket.Chat allows API access for all OAuth providers by checking accessTokens via the identity endpoint (/userinfo or /me). |
|
@ralfbecker Thanks for letting us know! I think this is great, but does require an extra HTTP request to the IDP. I'd hope to polish this pr so that you can use any JWT and validate locally, just using the public key. Do you have any input, how we can increase the quality of this PR to make it mergeable? |
|
Not sure I can help to get that PR mergeable, I'm not a project-member either. |
|
Hi, Is it possible to do it now ? I mean, use the rest api with a keycloak jwt token ? Thanks, |
Closes #5521
PR for Docs needed.
TODO
This works perfectly fine. But I need help, to make the JWT signing Public Key configurable via the Admin interface. For now, you have to manually paste the Cert into the
keycloak.jsfile.Prerequisites
keycloak.keycloak.jsfile.How it works
Request
POSTtohttp://localhost:3000/api/v1/loginHeader:
Content-Type: application/jsonContent:
Response
like documented here: https://rocket.chat/docs/developer-guides/rest-api/authentication/login/#result