Skip to content

support pkce when fetching user certificates#3304

Merged
psasidhar merged 3 commits intomasterfrom
pkce
Apr 16, 2026
Merged

support pkce when fetching user certificates#3304
psasidhar merged 3 commits intomasterfrom
pkce

Conversation

@havetisyan
Copy link
Copy Markdown
Collaborator

@havetisyan havetisyan commented Apr 15, 2026

Description

improve security posture for user certificates:

UserCertificateProvider:

  • audience is now required
  • token endpoints must be https
  • if no secret, then pkce code verifier is required
  • attestation data must be code={code}&code_verifier={code_verifier} format

Idp go library:

  • state value is verified on return
  • option pkce option - default true
  • cert stored with 600 mode

Contribution Checklist:

  • The pull request does not introduce any breaking changes
  • I have read the contribution guidelines.
  • Create an issue and link to the pull request.

Attach Screenshots (Optional)

Signed-off-by: Henry Avetisyan <hga@yahooinc.com>
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request implements PKCE support for the IdP authentication flow in both Go and Java libraries, enhancing security for user certificate requests. Key updates include the generation and verification of code challenges and verifiers, mandatory audience configuration, and enforcing HTTPS for IdP endpoints. Additionally, file permissions for saved certificates in the Go utility were restricted to 0600. Review feedback suggests updating the documentation for the verifier generation function to reflect its new parameters and removing the non-standard inclusion of the 'state' parameter in the token exchange request.

Comment thread libs/go/usercert/idp.go Outdated
Signed-off-by: Henry Avetisyan <hga@yahooinc.com>
Signed-off-by: Henry Avetisyan <hga@yahooinc.com>
@psasidhar psasidhar merged commit 8ddb741 into master Apr 16, 2026
8 checks passed
@psasidhar psasidhar deleted the pkce branch April 16, 2026 00:49
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.

2 participants