Git Product home page Git Product logo

Comments (3)

owen-c avatar owen-c commented on June 8, 2024

Was just reading up on the jwx package that is used to interact with JWTs and it seems like this is probably expected behavior due to the following:

https://github.com/lestrrat-go/jwx/blob/develop/v2/docs/01-jwt.md#terminology

Verification
We use the terms "verify" and "verification" to describe the process of ensuring the integrity of the JWT, namely the signature verification.

Validation
We use the terms "validate" and "validation" to describe the process of checking the contents of a JWT, for example if the values in fields such as "iss", "sub", "aud" match our expected values, and/or if the token has expired.

So either providing a way to disable Verification and Validation or a way to control the behavior of what is considered expired would be useful.

from cerbos.

charithe avatar charithe commented on June 8, 2024

Yes, this is the expected behaviour. Disabling verification only disables the cryptographic validation and we don't recommend doing that for production deployments. Regardless of the value of disableVerification config, the exp claim of the JWT is still checked to make sure that the token is valid and Cerbos is not operating on stale data. What's your use case for handling expired tokens?

from cerbos.

owen-c avatar owen-c commented on June 8, 2024

Our existing system allows for a leeway of a certain number of seconds for some reason, so we are seeing some differing behavior b/c Cerbos rejects some requests that our legacy system lets through due to a JWT being expired by a handful of seconds.

The legacy system is still in charge of doing the verification and validation of the JWT but Cerbos is using some of the claims in the JWT as input for the policies. So any JWT we hand off to Cerbos should be considered good already but we occasionally see these errors b/c of the difference in the allowed leeway.

from cerbos.

Related Issues (20)

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.