-
Notifications
You must be signed in to change notification settings - Fork 827
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
fix: publish an external group auth event only with registered IDPs #2941
fix: publish an external group auth event only with registered IDPs #2941
Conversation
When authenticating a user with oauth, only publish the external group event for registered IDPs, thereby skipping the event if authentication is through uaa itself, such as when using the JWT bearer token grant. Change-Id: Ie62720a4f0d8933e35fe4d46921fd9b5b1293d58
We have created an issue in Pivotal Tracker to manage this: https://www.pivotaltracker.com/story/show/187837610 The labels on this github issue will be updated when the story is started. |
Hi @mikeroda, correct me if I'm wrong: After this PR, when the JWT bearer grant is invoked when the request param |
@@ -908,6 +909,37 @@ void updateShadowUser_IfAlreadyExists() { | |||
assertEquals(OriginKeys.UAA, uaaUser.getZoneId()); | |||
} | |||
|
|||
@Test | |||
void publishExternalGroupAuthorizationEvent_skippedIf_isRegisteredIdpAuthentication() { |
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.
publishExternalGroupAuthorizationEvent_skippedIf_isRegisteredIdpAuthentication
I thought this PR skips if it's not a "registered Idp Authentication"?
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.
Yes you're right. The method name is backwards. I'll fix it.
@peterhaochen47, that's correct. |
Change-Id: I19f435d622afc3858d72500ca89b5ad9a3c84aee
When authenticating a user with external OAuth, only publish the ExternalGroupAuthorizationEvent for registered IDPs, thereby skipping the event if authentication is through UAA itself, such as when using the JWT bearer token grant. Without this fix, the event is published every time you use the JWT bearer token grant.