GithubHelp home page GithubHelp logo

Validate signature? about jwt-cli HOT 3 CLOSED

troyharvey avatar troyharvey commented on June 22, 2024 1
Validate signature?

from jwt-cli.

Comments (3)

cben avatar cben commented on June 22, 2024 1

Is there a direct relationship between iss field and URL where issuer's jwks can be fetched? 🙏
Apparently not. ☚ī¸

  • with symmetric crypto, the key to verify is secret, it wouldn't be published anywhere.
  • with asymmetric crypto, I found a few conventions but no standard.
    • Some use https://DOMAIN//.well-known/jwks.json but not everyone.
    • I have a Keycloak-issued token with "iss": "https://sso.redhat.com/auth/realms/redhat-external". Hitting that URL actually returns JSON with an apparently unrelated "public_key" field and a hint "token-service": "https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect" but that one is 404, the correct jwks url is https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/certs.
      So possibly protocol/openid-connect/certs is another convention of OIDC? Or maybe it's a sub-convention of specifically Keycloak? 🤷‍♂ī¸

from jwt-cli.

troyharvey avatar troyharvey commented on June 22, 2024

@cben Thanks for raising this issue. What are your thoughts on how we could add support for this?

For symmetric crypto, we could potentially add a --verify flag that would prompt for the secret?

Thanks for the encouragement. I know it's a tiny script, but there have been some great PRs to this little repo and I'm still actively using it.

from jwt-cli.

troyharvey avatar troyharvey commented on June 22, 2024

Shout to @bharkreader for adding this! @cben Now you can just add --secret=yourSigningSecret as an argument.

from jwt-cli.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤ī¸ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.