test(auth): add DPoP RTR pool-server safety-net test (W-23991713) - #4147
Merged
Merged
Conversation
Login via pool server with DPoP + RTR and verify the refresh token survives the identity fetch. Tests that SFIdentityCoordinator does not consume the refresh token (via a credential refresh) when resolving the pool-server-to-My-Domain identity URL routing on login. Mirrors the equivalent Android test added for the same story.
|
||||||||||||||||
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #4147 +/- ##
==========================================
+ Coverage 71.58% 71.76% +0.18%
==========================================
Files 254 254
Lines 22837 22827 -10
==========================================
+ Hits 16347 16382 +35
+ Misses 6490 6445 -45
🚀 New features to boost your workflow:
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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.
Summary
test_givenDPoPRtr_whenLoginViaPoolServer_thenRefreshTokenSurvivesIdentityFetchtoDPoPLoginTests— mirrors the equivalent test on Android (PR Sign In with Apple requirements #3005)SFIdentityCoordinator: if the identity fetch were to trigger a credential refresh (consuming the RTR refresh token),assertRevokeAndRefreshWorks(isRtr: true, ...)would fail because the refresh token would already be spentcredentials.identityUrlalready holds the raw pool-server URL —SFIdentityCoordinatorroutes the identity call correctly without needing a credential refreshRelated
/id/endpoint returnsBad_OAuth_Tokenfor pool-server-issued DPoP tokens instead of401 use_dpop_nonceTest plan
test_givenDPoPRtr_whenLoginViaPoolServer_thenRefreshTokenSurvivesIdentityFetch— passes (129 s)test_givenDPoP_whenLoginViaPoolServer_thenTokenTypeIsDPoP— passes, no regression (163 s)