Giter Site home page Giter Site logo

Comments (10)

a-ilango avatar a-ilango commented on June 1, 2024 2

@maxkwallace Sorry, I'm not working on this. It's been busy for a while now but I'm hoping to contribute to this project again when I get some time in the future.

Thanks @wittejm for taking this up!

from recordexpungpdx.

a-ilango avatar a-ilango commented on June 1, 2024 1

Yes, I was working on this. Let me assign it to myself.

Maybe next meeting we can discuss what the authentication API will look like on the frontend

Sounds good. It is captured in the design document. We can add missing details if there are any.

from recordexpungpdx.

wittejm avatar wittejm commented on June 1, 2024 1

@maxkwallace the /auth_token endpoint code is about finished with python tests passing, though I've just discovered that it's broken on the wsgi server (returns 400) and am looking into this.

from recordexpungpdx.

wittejm avatar wittejm commented on June 1, 2024 1

@erikjasso The only feature listed here that is missing from the app is to use persistent RSA keys in the prod environment, whereas the dev configuration works as intended (generating a random rsa key on app start).

I suppose we could write a more specific issue and toss it into the project backlog, to unclutter the project board a bit. The feature is blocked on having the app use any prod configuration at all, since the wsgi.py launcher is hard-coded to use only the dev configuration

from recordexpungpdx.

kyeotic avatar kyeotic commented on June 1, 2024

The conversation from slack was "use JWTs, handle login on the backend". Erik asked me to add some background, so here we go.

JWTs (JSON Web Tokens, pronounced "jot" for some reason) are generally used with oAuth2/OIDC. They are stateless authentication tokens that include user data and a "signature" to prevent tampering. Token signing requires RSA keys that will have to be stored and managed on the server.

  • store salted & hashed user password 🎉
  • store RSA keys (must be able to handle 2 at a time for rotation)
  • rotate RSA keys every 30-90 days
  • login endpoint.
    • take in user credentials
    • load user record from DB
    • use salt with user-supplied password to create hash, compare
    • load relevant user attributes (groups, roles)
    • create token payload (user ID, expiration, groups, etc..)
    • sign token (standard RSA signature creation tools/lib exist in every language)
    • return to user
  • verify token.
    • extract token from the AUTHORIZATION header
    • load KEY ID from token header
    • load matching key
    • compare token signature (standard RSA signature verification tools/lib exist in every language)

from recordexpungpdx.

maxkwallace avatar maxkwallace commented on June 1, 2024

@a-ilango you are working on this, right? Would be good to assign this issue to yourself if yes. Maybe next meeting we can discuss what the authentication API will look like on the frontend.

from recordexpungpdx.

maxkwallace avatar maxkwallace commented on June 1, 2024

@a-ilango ah, great! I forgot about the design document, thank you. I'll take a look again.

from recordexpungpdx.

maxkwallace avatar maxkwallace commented on June 1, 2024

@a-ilango Hey Arun! Are you still working on this? Just wanted to check in.

from recordexpungpdx.

erikjasso avatar erikjasso commented on June 1, 2024

@wittejm Can we close this?

from recordexpungpdx.

wittejm avatar wittejm commented on June 1, 2024

The only remaining feature here has been moved to #581

from recordexpungpdx.

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.