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

Problemy z JSON Web Tokens ... i garść rozwiązań

Problemy z JSON Web Tokens ... i garść rozwiązań

Marcin Hoppe

October 14, 2018
Tweet

More Decks by Marcin Hoppe

Other Decks in Technology

Transcript

  1. JSON Object Signing and Encryption JSON Web Signature JSON Web

    Encryption JSON Web Keys JSON Web Algorithms JSON Web Tokens @marcin_hoppe
  2. @marcin_hoppe FORMAT {"alg": "HS256", "typ": "JWT" } {"sub": "1234567890", "iss":

    "https://issuer.com", "aud": "https://myapi.com", "exp": 1516239022 } + podpis (HMAC)
  3. @marcin_hoppe PROBLEM 2 {"alg": ”RS256", "typ": "JWT" } {"sub": "1234567890",

    "iss": "https://issuer.com", "aud": "https://myapi.com", "exp": 1516239022 } + podpis RSA (klucz publiczny)
  4. @marcin_hoppe PROBLEM 2 {"alg": ”HS256", "typ": "JWT" } {"sub": "1234567890",

    "iss": "https://issuer.com", "aud": "https://myapi.com", "exp": 1516239022 } + podpis HMAC (klucz publiczny)
  5. @marcin_hoppe PROBLEM 2 {"alg": ”HS256", "typ": "JWT" } {"sub": ”0000000001",

    "iss": "https://issuer.com", "aud": "https://myapi.com", "exp": 1516239022 } + podpis HMAC (klucz publiczny)
  6. Klucze HMAC H4sł4 to nie klucze hashcat i słowniki Ten

    sam klucz dla wszystkich Brak KDFów @marcin_hoppe PROBLEM 3
  7. @marcin_hoppe PROBLEM 4 {"alg": ”RS256", "typ": "JWT" } {"sub": "1234567890",

    "exp": 1516239022 } + podpis RSA (klucz publiczny)
  8. @marcin_hoppe PROBLEM 4 {"alg": ”RS256", "typ": "JWT" } {"sub": "1234567890",

    "iss": "https://idp1.com", "aud": "https://api1.com", "exp": 1516239022 } + podpis RSA (klucz publiczny)
  9. Platofrm Agnostic SEcurity TOkens Ciastka i tokeny Local: poufność i

    integralność z kluczem symetrycznym Public: integralność z kluczem publicznym @marcin_hoppe
  10. @marcin_hoppe FORMAT {"alg” : ”XChaCha20-Poly1305", ”nonce": 0000...0} {”data": ”this is

    a signed message", ”exp” : "2019-01-01T00:00:00+00:00”} Stopka (AEAD): (pusty)
  11. Marcin Hoppe Engineering Manager Product Security Auth0 Security Working Group

    Node.js Foundation marcin.hoppe @ acm.org twitter.com/Marcin_Hoppe