Upgrade to Pro — share decks privately, control downloads, hide ads and more …

apidays Paris 2024 - Military-Grade Security fo...

apidays
December 22, 2024

apidays Paris 2024 - Military-Grade Security for APIs, Michał Trojanowski, Curity

Military-Grade Security for APIs
Michał Trojanowski, Product Marketing Engineer at Curity

apidays Paris 2024 - The Future API Stack for Mass Innovation
December 3 - 5, 2024

------

Check out our conferences at https://www.apidays.global/

Do you want to sponsor or talk at one of our conferences?
https://apidays.typeform.com/to/ILJeAaV8

Learn more on APIscene, the global media made by the community for the community:
https://www.apiscene.io

Explore the API ecosystem with the API Landscape:
https://apilandscape.apiscene.io/

apidays

December 22, 2024
Tweet

More Decks by apidays

Other Decks in Programming

Transcript

  1. Sender-constrained Tokens in OAuth • OAuth 2.0 Mutual-TLS Client Authentication

    and Certificate-Bound Access Tokens — RFC 8705 • OAuth 2.0 Demonstrating Proof of Possession (DPoP) — RFC 9449
  2. mTLS Certificate-bound Access Token Client API API Gateway Authorization Server

    public key private key { “cnf”: { “x5t#S256”: “bw…g2” } } mTLS mTLS
  3. PAR

  4. Pushed Authorization Requests • Standard defined in RFC 9126. •

    Provides means for confidential and integrity-protected authorization requests.
  5. HTTP 400 Standard OAuth Authorization Requests GET /authorize?client_id=abc&scopes=read%20write HTTP 302

    Location: /cb?code=123 Is that a legitimate client? Are the parameters OK? Can these end up in the browser logs? Client Authorization Server
  6. Pushed Authorization Requests • The client is authenticated before the

    authorization request. • Authorization request parameters can’t be tampered with. • Request parameters do not traverse through unsecure transport. • URL limitations are no longer a concern.
  7. JWT Secured Authorization Response Mode • A specification from the

    OpenID Foundation. • Protects against attacks on the authorization code response.
  8. Standard Response GET /authorize?client_id=abc&scopes=read%20write… HTTP 302 Location: https://example.com/cb?code=abcdef&state=1234 Was it

    issued by the correct Authorization Server? Does this code belong to this state? Client Authorization Server
  9. JWT Secured Response GET /authorize?client_id=abc&scopes=read%20write… HTTP 302 Location: https://example.com/cb?response=eyJhbGciOiJSUzN… decode

    & verify { iss: https://idsvr.example.com , code: “abcdef”, state: “12345”, … } Client Authorization Server
  10. JWT Secured Authorization Response Mode • The code response is

    integrity-protected. • Response parameters strongly coupled (mitigates replay attacks). • Protection from mix-up attacks (ability to verify iss claim).
  11. Key Takeways • Regardless of your industry, have a look

    at the FAPI 2 Security Profile - it’s not a long document! • Protecting the access token is an important part of API security. • Use sender-constrained access tokens. • Protecting the access token means also protecting the flows — think of PAR, PKCE, JARM.