GUACAMOLE-2258 : OpenID code flow, client secret and PKCE - #1219
Conversation
…lient secret and with or without pkce
… PKCE removing the need for local REST redirect and callback function
- Add openid-well-known-endpoint and treat it to automatically find the : * issuer, * authorization_endpoint, * token_endpoint, * jwks_uri - Replace openid-flow-type with openid-response-type - Use an Enum for openid-response-type to limit to the values 'id_token', 'token' or 'code' - Treat the response type as an implicit flow type allowing use of AWS Cognito
- Remove unused configuration getter functions - Combine and simplify validateCode and validateToken - Style fixes - More JsDoc comments and consistent JsDoc style of comment blocks - IOException and not GuacamoleException of URLreader function
…et.http.HttpClient, make the outboud url connection asynchronous
…fier-validity for consistency with openid-max-nonce-validity. Clarification in the comments.
- Style fixes - Comment more code - Use environment.getProperty to set default values rather than local code - Add a latch to getters of well-known endpoint so that they stall rather than incorrectly returning null
The OpenID core specification notes the nonce as optional for code flow, but recommended to reduce the risk of replay attacks. So include the nonce with code flow as well.
necouchman
left a comment
There was a problem hiding this comment.
A few items to address, here - mainly style, and a couple of other minor issues. Looking pretty good to me.
| initializedLatch.await(); | ||
| } catch (InterruptedException e) { | ||
| Thread.currentThread().interrupt(); | ||
| throw new IllegalStateException("Initialization interrupted", e); |
There was a problem hiding this comment.
Maybe this should throw some form of GuacamoleException instead of the more generic one?
There was a problem hiding this comment.
I never actually call "initializedLatch.interrupt()" so this should never happen, but the await needs to be wrapped in a try/catch. What would be the appropriate Guacamole Exception for something that is never supposed to happen ? "GuacamoleUnsupportedException" ?
|
Hi, eagerly waiting for OIDC code auth flow. May I jump in and contribute? |
Go for it, though not sure what there is left to add ? |
CoPilot mistakenly lead me to believe I could create a new branch with my commits that were on my "main" branch without closing my existing pull request. Please refer to the conversation in #1198 for the discussion of this pull request.. Sorry to have lost the conversation