Skip to content

W-23195012: Android DP per-user feature flag for DPoP sessions - #2962

Merged
wmathurin merged 6 commits into
forcedotcom:dpopfrom
wmathurin:dpop-phase6
Jul 10, 2026
Merged

W-23195012: Android DP per-user feature flag for DPoP sessions#2962
wmathurin merged 6 commits into
forcedotcom:dpopfrom
wmathurin:dpop-phase6

Conversation

@wmathurin

@wmathurin wmathurin commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds FEATURE_DPOP = "DP" constant to Features.java
  • Registers/unregisters the DP per-user flag at auth completion in LoginActivity.onAuthFlowSuccess() based on tokenType == "DPoP"; persists via W-23159744 infrastructure
  • Extends validateUserAgent() in AuthFlowTesterPageObject with isDpop assertion; threaded through AuthFlowTest and DPoPLoginTests
  • Adds unit test: isDpop derived from useDPoP
  • Addresses dpop-phase5 PR review: reverts unnecessary named args in MultiUserLoginTests; restores useHybridAuthToken = false with TODO W-20524841 in RefreshTokenMigrationTests
  • Removes dead nonce harvest+retry loop from OAuth2.callIdentityService() — Salesforce only issues DPoP-Nonce at the token endpoint, so the inline retry could never fire. Identity 401s already recover via OAuthRefreshInterceptor → token endpoint. Aligns Android with iOS behaviour.

Test plan

  • DPoPLoginTests — all pass with DP flag assertions
  • Non-DPoP test suite (e.g. RegularLoginTests) — DP flag absent
  • DP flag survives app restart
  • DP cleared on migration to non-DPoP session
  • Lint clean

wmathurin added 4 commits July 9, 2026 16:53
- Add FEATURE_DPOP = "DP" constant to Features.java
- Register/unregister FEATURE_DPOP per-user in LoginActivity.onAuthFlowSuccess() based on tokenType
- Extend validateUserAgent() in AuthFlowTesterPageObject with isDpop parameter; assert DP flag present/absent
- Thread isDpop through loginAndValidate() and assertRevokeAndRefreshWorks() in AuthFlowTest
- Update all DPoP test call sites in DPoPLoginTests, RefreshTokenMigrationTests with isDpop=true
- Remove redundant isDpop parameter from loginAndValidate() — derive
  val isDpop = useDPoP internally instead
- Remove isDpop from RefreshTokenMigrationTests loginAndValidate override
- Remove isDpop = true from all DPoPLoginTests loginAndValidate call sites
- Add test_givenDPoPSession_whenRegisterDPFeature_thenDPFlagAppearsInUserAgentForUser
  to SalesforceSDKManagerTests covering per-user isolation of DP flag
@github-actions

github-actions Bot commented Jul 10, 2026

Copy link
Copy Markdown
1 Warning
⚠️ libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/LoginActivity.kt#L715 - Switch statement on an int with known associated constant missing case BiometricManager.BIOMETRIC_ERROR_IDENTITY_CHECK_NOT_ACTIVE

Generated by 🚫 Danger

…s only issued at token endpoint

Salesforce confirmed DPoP-Nonce is only returned by the token endpoint.
The inline harvest+retry in callIdentityService() could never fire.
Identity 401s already recover via OAuthRefreshInterceptor, which
re-enters the token endpoint where nonce handling lives. Aligns Android
with iOS behaviour.
@wmathurin
wmathurin merged commit be1c90d into forcedotcom:dpop Jul 10, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants