feat(plugin): add dpop plugin for RFC 9449 proof-of-possession#13161
Closed
Alnyli07 wants to merge 3 commits into
Closed
feat(plugin): add dpop plugin for RFC 9449 proof-of-possession#13161Alnyli07 wants to merge 3 commits into
Alnyli07 wants to merge 3 commits into
Conversation
Add DPoP (Demonstrating Proof of Possession) validation plugin that enforces sender-constrained access tokens at the API gateway level. - Full RFC 9449 DPoP proof validation (typ, alg, htm, htu, iat, ath, jti) - JWK Thumbprint binding (cnf.jkt) per RFC 7638 - Token introspection fallback (RFC 7662) for opaque tokens - Distributed JTI replay protection (memory/Redis/Infinispan) - Bearer downgrade detection - Authorization header rewrite (DPoP → Bearer) for upstream compatibility - Selective enforcement via uri_allow - 15 Test::Nginx test cases - English documentation in APISIX format Signed-off-by: Ali Tuğrul Pınar <ali@keymate.io>
Signed-off-by: Ali Tuğrul Pınar <ali@keymate.io>
Signed-off-by: Ali Tuğrul Pınar <ali@keymate.io>
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.
Description
Add
dpopplugin for RFC 9449 DPoP (Demonstrating Proof of Possession) validation. This plugin enforces sender-constrained access tokens at the API gateway level, preventing token theft and replay attacks with zero changes to upstream services.Fixes #11219
Why a Separate Plugin?
DPoP is a proof-of-possession layer, not an authentication mechanism. It complements existing auth plugins (
openid-connect,jwt-auth,multi-auth) rather than replacing them. It runs at priority 2601 to rewriteAuthorization: DPoP→Authorization: Bearerbefore downstream auth plugins process the token.Features
typ,alg,htm,htu,iat,ath,jti)cnf.jkt) per RFC 7638DPoP→Bearerheader rewrite +DPoP-Thumbprintheader injectionuri_allowA Go WASM version (proxy-wasm-go-sdk v0.24.0) is also available at Keymate-io/keymate-apisix-dpop-plugin.
Files Changed
apisix/plugins/dpop.luaconf/config.yaml.exampledocs/en/latest/plugins/dpop.mdt/plugin/dpop.tTested With
resty.openssl,resty.http,resty.redis,resty.lrucache)Checklist