feat(providers): OIDC key binding for the authorization-code and refresh flows - #395
Open
EthanHeilman wants to merge 3 commits into
Open
EthanHeilman wants to merge 3 commits into
EthanHeilman wants to merge 3 commits into
Conversation
EthanHeilman
force-pushed
the
kb-native-v3
branch
from
August 12, 2026 01:34
05d6bef to
86b1381
Compare
EthanHeilman
force-pushed
the
kb-native-v3
branch
from
August 12, 2026 01:43
86b1381 to
3e9decf
Compare
wim07101993
added a commit
to zitadel/oidc
that referenced
this pull request
Sep 14, 2026
# Which Problems Are Solved This PR adds client support for [OpenID Key Binding 1.0](https://openid.net/specs/openid-connect-key-binding-1_0.html) a draft standard for Proof-of-Possession ID Tokens. Basically ID Tokens that have a public key enabling the user to sign under their identity. OpenPubkey supports key binding using zitadel/oidc as the library. However because zitadel/oidc does not natively support key binding, OpenPubkey has to use [a fragile rounder-tripper work around for the RP](https://github.com/openpubkey/openpubkey/blob/main/providers/keybinding_provider.go#L109). This PR allows key binding support for OP and RP: - Authorization code flow - Device code flow - Refresh flow - Unit tests This PR is only for client/RP. It does not add key binding to the OP code. I would like to add that at a future point, but client/RP support the main blocker to using plain zitadel/oidc with key binding. I've run manual tests for code flow, refresh and device flow using the key binding with the Hello OP and this PR in OpenPubkey that runs against this branch: openpubkey/openpubkey#395 # How the Problems Are Solved Adds a `WithKeyBinding` option to RP so that the RP can request key bound ID Tokens from the OP and a `KeyBindingRelyingParty` to perform the additional steps used by key binding. ```golang func WithKeyBinding(signer crypto.Signer, alg jose.SignatureAlgorithm) Option ``` # Additional Changes No additional changes # Additional Context Do you want me to port this to v4 as well as v3? Relevant PRs - PR adding Key Binding to Authentik goauthentik/authentik#22590 - [OpenID Key Binding 1.0 Latest Draft](https://openid.net/specs/openid-connect-key-binding-1_0.html) - PR to use this RP option in OpenPubkey openpubkey/openpubkey#395 --------- Co-authored-by: Copilot Autofix powered by AI <[email protected]> Co-authored-by: Wim Van Laer <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Consume zitadel/oidc's native OpenID Connect Key Binding API (rp.WithKeyBinding) for the code and refresh flows, replacing the transport-based DPoP shim. The device authorization flow is out of scope here and fails closed with a clear error if combined with key binding; device support lands in a follow-up.
Includes a TEMP go.mod replace to the zitadel/oidc kb-support branch until it is released upstream.