-
Notifications
You must be signed in to change notification settings - Fork 384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Basic JWT-based authentication and authorization #8627
base: main
Are you sure you want to change the base?
Conversation
Web viewer built successfully. If applicable, you should also test it:
Note: This comment is updated whenever you push a commit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have all the context on what was discussed, but this is really easy to follow code and having a notion of "provider" that can later be switched with some other components makes sense to me.
@jleibs it would be awesome if you could also have another look. 🙏 |
What
This adds a new
re_auth
crate with the following features:jwt-simple
so that we can swap it out.SecretKey
from/tobase64
to be used withredap-cli
.tonic::Interceptor
s for both client and server side middleware with anauthorization: Bearer <token>
header.Here is what a
SecretKey
(HS256
) looks like inbase64
:We can use that to generate a basic token:
Which you can verify yourself via www.jwt.io.