-
Notifications
You must be signed in to change notification settings - Fork 280
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
Switch JWT library implementations #3267
Comments
[Triage] This issue seems to have clearly outlined closure criteria and is the result of guidance around how to improve our overall security posture. We will need this to be backwards compatible so that the a token made with the CXF implementation can then go into the Nimbus version. Given the prototype Peter made, this seems like something we can mark good first issue. |
Started looking into it |
Thanks @MaciejMierzwa for looking into this, I've marked this issue assigned to you. Please comment on this issue as you make progress or alternatively discussion can occur in a pull request. |
Hi, here's the branch and draft PR I'm pushing my changes to: #3421 |
Hi, for visibility I'll write here instead of PR.
|
@cwperks I'd like to ask for input from your side?
EDIT. it was probably flakiness, seems to work better now |
@MaciejMierzwa I've checked off a number of items from the issues description - there is only 1 outstanding item which is making sure that previous configurations are compatible with this change. I believe the changes you made around how padding is handled should verify this - but I'd ask that we add a new tests that generates a token with CXF - save it into a string, then read it with the new system to ensure backwards compability - that should close out this issue, Feel free to do that as part of your current PR [1] or open a new one afterward. |
Hi @peternied, please take a look at this: https://github.com/MaciejMierzwa/security/tree/nimbus-jose-jwt-cxf-test Basically I tested 2 scenarios: Create jwt using cxf, encode it, parse it using nimbus or do it other way around. Only challenge is the padding that's added for case of too short secret - nimbus library wouldn't accept it, cxf would. |
@MaciejMierzwa In my mind, the test is to create a JWT with a key using the old system, then use the new system with the same key can still be able to process read + validate the contents of that JWT - is that possible? |
You wouldn't save the generation system, but the encrypted token would be checked in with the key in the test case - so the libraries are unneeded. |
Resolve by the merge of #3421 |
After reviewing the different libraries for constructing JWT authentication tokens, for the OnBehalfOf feature should use Nimbus JOSE + JWT
Exit Criteria
org.apache.cxf.rs.security.jose
org.apache.cxf.rs.security.jose
[15] files impactedcom.nimbusds.jose.*
componentsAdditional Context
The text was updated successfully, but these errors were encountered: