GithubHelp home page GithubHelp logo

Pedantic stuff about go-jwt-middleware HOT 3 CLOSED

auth0 avatar auth0 commented on July 30, 2024
Pedantic stuff

from go-jwt-middleware.

Comments (3)

mgonto avatar mgonto commented on July 30, 2024

I've implemented the first and the last in #3. However, I note that RFC 6750 specifically talks about some header manipulations that SHOULD be performed in the case of query string parameters. That isn't currently done by this middleware but we should probably consider adding it. The main issue here is "leaking" tokens via caching.

I don't see anywhere that it says anything about header manipulation when using Query String params. Where did you read about that?

I was reading RFC 6750. In researching #2, I wanted to look at the formal specification for how OAuth tokens should be handled. It mentions three schemes: Authorization header, form fields and query string parameters.

Almost nobody is using the Form Fields for authentication. Mostly all do Request Parameter or Header, so I think we're OK with those 2 at first :). What do you think?

Although RFC 6750 is for OAuth, I think almost all of the practical details (especially around security) apply for JWTs as well.

I agree that using the OAuth spec makes sense :)

from go-jwt-middleware.

xogeny avatar xogeny commented on July 30, 2024

The issue is with caching headers:

Clients using the URI Query Parameter method SHOULD also send a Cache-Control header containing the "no-store" option. Server success (2XX status) responses to these requests SHOULD contain a Cache-Control header with the "private" option.

I'm not worried about the form field stuff because, with the new approach, someone could implement that pretty easily. We don't need to implement everything. We just need to implement the hooks to allow everything.

from go-jwt-middleware.

mgonto avatar mgonto commented on July 30, 2024

Agreed on the second one.

I don't think the cache-control will be a problem by the way.

Thanks for the PR. Closing this one then !

from go-jwt-middleware.

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.