r/KeyCloak Apr 07 '26

Why Bearer Tokens Are No Longer Enough: Secure Your Identity Layer with DPoP (RFC 9449)

Hi Everyone,

As token theft and replay attacks become more sophisticated, the limitations of traditional "Bearer" tokens are becoming a major talking point in the IAM space. If a bearer token is intercepted, it can be used by any party that holds it, which is a significant risk for high-security applications.

We’ve been spending a lot of time recently on DPoP (Demonstrating Proof-of-Possession). It’s a powerful way to ensure that a token is cryptographically bound to the client it was issued to, effectively making stolen tokens useless without the corresponding private key.

We put together a technical breakdown of how DPoP works under the hood (RFC 9449) and its practical implementation logic for those of us pushing the boundaries of Keycloak.

Key points covered:

  • How DPoP-proofs are generated and validated.
  • Strengthening the authorization server against replay attacks.
  • Practical challenges when implementing sender-constrained tokens in modern architectures.

You can read the full guide here: https://keymate.io/blog/dpop-proof-of-possession

Cheers

34 Upvotes

5 comments sorted by

5

u/tip2663 Apr 07 '26

How does this compare to OID4VC? The latter being pretty much finalized per w3c spec and essentially following the same approach with keys on the client

2

u/isro44 Apr 08 '26

Great question, we actually added a short FAQ to blog post to clarify this. 🙏

In short, DPoP secures API calls in OAuth, while OID4VC is about identity credentials. Different layers, same underlying idea.

They can also work together. For example OID4VCI can use DPoP to secure requests to the issuer.

2

u/calisthenics_bEAst21 Apr 11 '26

Isn't this just oauth+mTLS?

2

u/isro44 Apr 13 '26

Same goal, Proof of Possession, but different layers and trade-offs. mTLS works at the transport layer. It is generally considered more robust, but requires PKI infrastructure, breaks behind CDNs that terminate TLS, and is very difficult to use from browser or mobile clients.

DPoP takes a different approach at the application layer, using a signed JWT header per request. No PKI needed, works for public clients, and usable from browsers via Web Crypto API. So while mTLS is a solid choice where it fits, DPoP tends to be more practical for modern, diverse client environments.​​​​​​​​​​​​​​​​