-
Notifications
You must be signed in to change notification settings - Fork 59
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
MP JWT to produce Json Web Token #109
Comments
Talked this on today's hangout. MP JWT can create a factory to abstract the Token creation layer and then microservice developer can just call the factory to get a JSON web token. This is a great abstract layer to hide the internal differences among different vendors to make microservices portable. |
Hi, but tokens are issued by the authorization servers ? |
I do need to create token out of an httt request, see OpenLiberty/open-liberty#6087 |
@hrstoyanov but it is not about issuing the tokens. The token is either available in the HTTP request or not, if yes - it was either issued by the OIDC provider or self-issued by the client. I'd say your issue is more related to #120. |
Though having a builder style API for generating the self-issued tokens as I believe implied by @Emily-Jiang may be a nice enhancement. I might give it a go and do a PR a bit later on |
A bit of a challenge there is that JsonWebToken is, in case of MP JWT, an instance of JWS, and may also become an instance of JWE. That said this would be API should be as simple as possible, as opposed to becoming a complete JOSE builder API...have claim setters plus either the signing or encrypting (keys) |
@sberyozkin
because the presence of JWT is optional in the request headers. We can inject Optional config properties with MP-CONFIG, so why not the same for JWT? |
@hrstoyanov I'm not disagreeing with you :-), just saying IMHO this is not relevant to this specific issue |
@sberyozkin |
Hi All |
It is in progress. Note both signing and encrypting the tokens will be part of the PR |
I've asked our users to stress a bit the smallrye-jwt API, I'll start preparing a PR for MP JWT for the colleagues to review |
Hi Emily @Emily-Jiang, basically the API I'll be submitting is structured around your idea, thank you :-). I hope it will be accepted well. It is not going as far as making MP JWT a fully fledged issuer as it will move it into a possibly out of scope territory. But what we can do is that when no issuer claim is set by the user code, then the builder will default to something like |
Thank you @sberyozkin for your update! I'm looking forward to seeing the PR! |
I'll be working soon on repackaging and documenting the design goals of this API and SPI code, https://github.com/smallrye/smallrye-jwt/tree/master/implementation/src/main/java/io/smallrye/jwt/build.
|
Hello, @sberyozkin, how can i help you to test this api? |
Hi All, please see #149. |
At the moment, different vendors choose different ways to produce Json Web Tokens,. It does not help with app's portability (contradicts with MP's portability mission). Should we define a common way to generate Json Web Token and maybe make MP as a token issuer?
The text was updated successfully, but these errors were encountered: