Repository navigation
Conversation
There was a problem hiding this comment.
@mkheck Thanks for the PR! I left a couple of comments for you. Also, can you please rebase off master and squash commits to one and than force push. Please ensure you do fast-forward merges as we use this git process. Thanks!
|
@mkheck I've been thinking about whether the
which is not ideal since we would have to create a new The other solution is to implement the validation check in Makes sense? |
โฆest, also added comparison+verification in IdToken
โฆssue to be discussed w/team
| String nonceHash = createHash(nonce); | ||
| additionalParameters.put(IdTokenClaimNames.NONCE, nonceHash); | ||
| } catch (NoSuchAlgorithmException e) { | ||
| // MAH: TODO...but what? |
There was a problem hiding this comment.
If the nonce hash could not be created because of JCE crypto lib missing than we should not add the nonce to attributes, effectively creating an Authentication Request without a nonce as is the current impl.
Implements nonce functionality for OpenID Connect authentication request in OAuth2 Authorization Code flow. This includes the following capabilities: * Generate nonce * Generate hash of nonce * Add nonce to attributes and hash to additional parameters of authentication request * Propagate hash to authentication response * Verify hash upon receipt of response by hashing original nonce * Complete all relevant tests Fixes/implements spring-projectsgh-4442
|
Hi @jgrandja, Good catches one and all. I've reworked per your recommendations and all build tests pass. LDAP integration tests are failing, but I suppose those are resolved by Travis? I've also formatted the commit message per the guidelines you provided. ๐ Please let me know of any additional changes required or desired. Thanks! |
|
Missed 4 unit tests in Still getting local failures with various LDAP tests under |
Made changes requested by Joe Grandja to PR, including addition of test when nonce isn't present in request. Fixes spring-projectsgh-4442 and addresses changes requested to PR
mkheck
left a comment
There was a problem hiding this comment.
Please let me know Joe, thanks!
This is a PR for gh-4442: Consider adding nonce to OAuth2 Authentication Request (#4442).
I've coded the implementation & tests for creating+passing+verifying the nonce in the ID token, and all tests pass (with the exception of the one that wasn't passing in the codebase before).
I would like to open a follow-on request to push some optimizing changes out a bit further.
I'm getting everything I need within the
OidcIdTokenValidatorby retrieving the nonce via claims, but it would be cleaner to change from dealing withJwtto dealing withOIdcIdTokens instead. But that would necessitate reaching into & reworkingDefaultOidcIdTokenValidatorFactory(& of course tests associated, etc.) and everything that touches. And it touches quite a lot.In short, this all works, so I believe the issue to be feature complete. But I would like to extend further changes to present a more specific solution throughout.