Skip to content

GUACAMOLE-2258 : OpenID code flow, client secret and PKCE - #1219

Open
adb014 wants to merge 20 commits into
apache:mainfrom
adb014:openid
Open

GUACAMOLE-2258 : OpenID code flow, client secret and PKCE#1219
adb014 wants to merge 20 commits into
apache:mainfrom
adb014:openid

Conversation

@adb014

@adb014 adb014 commented Jun 18, 2026

Copy link
Copy Markdown

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

David Bateman and others added 19 commits June 18, 2026 16:41
… 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 necouchman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this should throw some form of GuacamoleException instead of the more generic one?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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" ?

@rophy

rophy commented Aug 7, 2026

Copy link
Copy Markdown

Hi, eagerly waiting for OIDC code auth flow. May I jump in and contribute?

@adb014

adb014 commented Aug 17, 2026

Copy link
Copy Markdown
Author

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 ?

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

Successfully merging this pull request may close these issues.

3 participants