-
Notifications
You must be signed in to change notification settings - Fork 39
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
Add authentication mechanism for JWT #255
Comments
This was in scope for Jakarta Security 3.0, but we didn't had time to look at this. Note that quite a few servers do actually implement MicroProfile JWT using Jakarta Security. See e.g. https://github.com/omnifaces/jwt I brought up this topic a couple of times, but despite EE & MP alignments, it's still not 100% clear how to go about doing this. There is a vague notion about this in the MP specs already, but I personally feel it's not clear enough. I would like some wording such as the following in the MP JWT spec: "In a Jakarta EE environment, the runtime MUST make the JWT functionality available via an HTTPAuthenticationMechanism, and it MUST use the LoginConfig annotation to make this HTTPAuthenticationMechanism available as an enabled CDI bean" From the reverse side, I'm not yet sure what wording or process to use for EE to "import" the actual MP JWT spec. |
I would like use the OAuth 2 role name to define the spec, it is easy to apply them in different scenes. For example.
|
We should start the discussion and some prototyping of this soon. But as mentioned, if we want/need to directly import the MP spec into EE we probably have to do some cross platform discussion between EE and MP. |
So, the JWT authentication mechanism would simply validate a json web token, did I get it correctly ? Like the OpenIdAuthenticationDefinition without the redirect behaviour ? |
@arjantijms The above discussion already happens, but the question is, would we need anything JWT specific HERE (in the Security Spec / API) or would Soteria be suffient? |
@keilw I believe a @JWTAuthenticationMechanismDefinition would be a good addition to the spec, independently from the already working implementations based on the current API. Similarly to the OpenIdAuthenticationDefinition, it should also have a property for extracting the principal name from the decoded jwt. |
@amoscatelli If we added an annotation like that it would make using MP JWT especially for its |
I am little confused about the annotation naming of I would like add the OAuth2 role to recognize this annotation naming.
|
Thank you, I missed MP JWT. Does MP JWT work for Servlet/SOAP/WebSocket too ? |
It seems so, it should provide an authentication mechanism ! good to know |
I would like move MP JWT to Jakarta Security, and refactor it with Jakarta Security APIs, and deprecated MP JWT at the same time. And in the existing MP JWT, I do not think
|
Combine the effort of Microprofile JWT, and provides a standard JWT authentication mechanism for Http, WebSocket.
Mainly used in a
ResoruceServer
oauth2 role, provides one of the following config to decode JWT.The text was updated successfully, but these errors were encountered: