-
Notifications
You must be signed in to change notification settings - Fork 829
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
Refactor: remove spring security jwt and use nimbus jose #2624
Conversation
nimbus already in use
We have created an issue in Pivotal Tracker to manage this: https://www.pivotaltracker.com/story/show/186569273 The labels on this github issue will be updated when the story is started. |
main issue. audience is empty in same cases tests correct where HS256 can be used to create RS256 signature HMAC key length corrected
# Conflicts: # uaa/src/test/java/org/cloudfoundry/identity/uaa/mock/token/TokenMvcMockTests.java
Add a legacy signature check for HMAC
Will this be updated soon to address the merge conflicts? |
Do you see a merge conflict in this PR? |
server/src/main/java/org/cloudfoundry/identity/uaa/oauth/InvalidSignatureException.java
Outdated
Show resolved
Hide resolved
...ava/org/cloudfoundry/identity/uaa/provider/oauth/ExternalOAuthAuthenticationManagerTest.java
Outdated
Show resolved
Hide resolved
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.
This is quite the PR, In the future if possible to reduce this to smaller segments, that would be fantastic. Though I spent a considerable amount of time, I could have easily spent three times as much to deeply scrutinize, I left comments, and are more for refactoring options following this PR than required as part of this PR.
Overall this is approved, It was good a large majority was duplicated updates and changes and many removals, though the additions require significant deep dives, which I do not feel I completely dove all the way through, but trust based on what I saw and the tests, it was meeting desired objectives.
@@ -49,6 +49,8 @@ public final class UaaStringUtils { | |||
|
|||
public static final String EMPTY_STRING = ""; | |||
|
|||
public static final String DEFAULT_UAA_URL = "http://localhost:8080/uaa"; |
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.
Nice, that is a step in the right direction. Following this PR, the port should be defaulted to 8080 with the capability to override.
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.
Looks good
@strehle The PR is indicating "This branch cannot be rebased due to conflicts" Are you planning to rebase to address whatever conflicts github is referring to? |
yes, I would like to release soon (after our meeting) whithout this PR and then I merge and work on further refactorings . .... because of our pipeline hickups I waited here |
Intro:
UAA uses https://github.com/spring-attic/spring-security-oauth
See #2560 , we need to replace it
Replacement with library com.nimbusds:nimbus-jose-jwt see https://github.com/cloudfoundry/uaa/blob/develop/dependencies.gradle#L125
Nimbus in use already for some fixes in past...
Details :
https://connect2id.com/products/nimbus-jose-jwt
There are some incompatibilities with this replacement
HMAC signature
RSA signature
JWS header processing
Good news.
UAA allows now ESxxx signature family. The spring library had only support for validation of ES, now we can sign and verify all specified JWS signing algorithms!!!