Skip to content

Conversation

@SaintPatrck
Copy link
Contributor

@SaintPatrck SaintPatrck commented Sep 26, 2025

🎟️ Tracking

N/A

📔 Objective

This commit updates the Credential Exchange Protocol (CXP) export registration to be app-scoped rather than per-user.

Key changes:

  • Unregister the app for CXP export on logout if it's the last remaining account.
  • Unregister for CXP export when the feature flag is disabled, and register when it's enabled.
  • Introduce CredentialExchangeRegistryManager to handle CXP registration and unregistration logic.
  • Update isVaultRegisteredForExport to isAppRegisteredForExport to reflect the app-wide scope.

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation
    team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed
    issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

@SaintPatrck SaintPatrck added the hold do not merge yet label Sep 26, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Sep 26, 2025

Logo
Checkmarx One – Scan Summary & Details097d3f6e-a8ae-4e89-be5d-66b6e2d92f86

Great job! No new security vulnerabilities introduced in this pull request

@SaintPatrck SaintPatrck force-pushed the cxf/app/export-registration branch 4 times, most recently from da9db77 to 29c2740 Compare October 7, 2025 20:15
@SaintPatrck SaintPatrck changed the title Enable CXP via debug menu Register/unregister for CXP export based on feature flag Oct 7, 2025
@SaintPatrck SaintPatrck changed the title Register/unregister for CXP export based on feature flag [PM-26315] Register/unregister for CXP export based on feature flag Oct 7, 2025
@SaintPatrck SaintPatrck marked this pull request as ready for review October 7, 2025 20:17
@SaintPatrck SaintPatrck force-pushed the cxf/app/export-registration branch 3 times, most recently from 7e06490 to 262e214 Compare October 7, 2025 20:25
credentialExchangeRegistry
.unregister()
.onSuccess {
settingsDiskSource.storeAppRegisteredForExport(isRegistered = false)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't this be cleared on logout anyways?

Copy link
Contributor Author

@SaintPatrck SaintPatrck Oct 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. It's not part of clearData() because it's a global setting. We only want to unregister when the last account logs out.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind, this is a global setting, not tied to the user.

@SaintPatrck SaintPatrck force-pushed the cxf/app/export-registration branch from 262e214 to 8da7529 Compare October 7, 2025 20:37
dispatcherManager: DispatcherManager,
) : UserLogoutManager {
private val scope = CoroutineScope(dispatcherManager.unconfined)
private val unconfinedScope = CoroutineScope(dispatcherManager.unconfined)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

val appName: String,
val credentialTypes: Set<String>,
@field:StringRes
val appName: Int,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we rename this to appNameRes

@codecov
Copy link

codecov bot commented Oct 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.60%. Comparing base (9fee973) to head (b377f29).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5948      +/-   ##
==========================================
+ Coverage   84.59%   84.60%   +0.01%     
==========================================
  Files         717      719       +2     
  Lines       54603    54660      +57     
  Branches     7519     7525       +6     
==========================================
+ Hits        46191    46246      +55     
- Misses       5781     5782       +1     
- Partials     2631     2632       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@SaintPatrck SaintPatrck force-pushed the cxf/app/export-registration branch 2 times, most recently from e96c2f1 to 0b8fde7 Compare October 7, 2025 21:40
This commit updates the Credential Exchange Protocol (CXP) export registration to be app-scoped rather than per-user.

Key changes:
- Unregister the app for CXP export on logout if it's the last remaining account.
- Unregister for CXP export when the feature flag is disabled, and register when it's enabled.
- Introduce `CredentialExchangeRegistryManager` to handle CXP registration and unregistration logic.
- Update `isVaultRegisteredForExport` to `isAppRegisteredForExport` to reflect the app-wide scope.
@SaintPatrck SaintPatrck force-pushed the cxf/app/export-registration branch from 0b8fde7 to b377f29 Compare October 7, 2025 21:42
@SaintPatrck SaintPatrck removed the hold do not merge yet label Oct 8, 2025
@SaintPatrck SaintPatrck enabled auto-merge October 8, 2025 15:25
@SaintPatrck SaintPatrck added this pull request to the merge queue Oct 8, 2025
Merged via the queue into main with commit 3a4f1d7 Oct 8, 2025
9 checks passed
@SaintPatrck SaintPatrck deleted the cxf/app/export-registration branch October 8, 2025 18:44
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.

3 participants