[Bug fix] Use hub app's FRT to get nested app's AT#2379
Closed
somalaya wants to merge 4 commits into
Closed
Conversation
mohitc1
reviewed
Apr 12, 2024
mohitc1
reviewed
Apr 12, 2024
mohitc1
reviewed
Apr 12, 2024
| /** | ||
| * Renewing AT of nested app. | ||
| */ | ||
| protected synchronized void renewAccessTokenForNestedApp(@NonNull final SilentTokenCommandParameters parameters, |
Contributor
There was a problem hiding this comment.
Why in BaseController? would non broker controller need this?
This method by itself has no check around NAA or FOCI, so can be called erroneously.
I think Foci RT request logic can be directly inside a BrokerLocalController private method. Then you can call renewAccessToken()
Contributor
Author
There was a problem hiding this comment.
Agreed. This is not required in any other cases. Moved it to BrokerLocalController.
mohitc1
approved these changes
Apr 17, 2024
rpdome
approved these changes
Apr 18, 2024
Contributor
Author
|
Closing this PR as this won't be required once Mohit implements the long term fix. He will be working on this in next sprint. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem : In cross cloud requests, we fallback to BrokerLocallController. This is applicable for NAA requests as well.
Let's say the user performs below steps
The above problem is observed in OneAuth and iOS as well. We have checked with eSTS team is they can fix this on their side to let any FRT mint an RT for a nested app and they replied that this is not acceptable by design.
Fix : When a silent request is made from a nested app in cross cloud scenario, it reaches renewAT step (OneAuth only forwards silent calls to broker when AT is expired). I have modified renewAT for nested app to follow below steps
NOTE : There is another bug on eSTS side where if an RT of a hub app is retrieved in a nested app's context and it is an FRT, we are unable to use that FRT for other apps in FOCI family. This PR does not address that issue. We are waiting for eSTS to send a fix for this.
Related broker PR : https://github.com/AzureAD/ad-accounts-for-android/pull/2772
UI tests added in : AzureAD/microsoft-authentication-library-for-android#2075