-
Notifications
You must be signed in to change notification settings - Fork 927
[PM-26315] Register/unregister for CXP export based on feature flag #5948
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
Conversation
|
Great job! No new security vulnerabilities introduced in this pull request |
da9db77 to
29c2740
Compare
7e06490 to
262e214
Compare
| credentialExchangeRegistry | ||
| .unregister() | ||
| .onSuccess { | ||
| settingsDiskSource.storeAppRegisteredForExport(isRegistered = false) |
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.
Won't this be cleared on logout anyways?
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.
No. It's not part of clearData() because it's a global setting. We only want to unregister when the last account logs out.
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.
Nevermind, this is a global setting, not tied to the user.
app/src/main/kotlin/com/x8bit/bitwarden/data/auth/manager/UserLogoutManagerImpl.kt
Outdated
Show resolved
Hide resolved
262e214 to
8da7529
Compare
| dispatcherManager: DispatcherManager, | ||
| ) : UserLogoutManager { | ||
| private val scope = CoroutineScope(dispatcherManager.unconfined) | ||
| private val unconfinedScope = CoroutineScope(dispatcherManager.unconfined) |
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.
👍
| val appName: String, | ||
| val credentialTypes: Set<String>, | ||
| @field:StringRes | ||
| val appName: Int, |
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.
Can we rename this to appNameRes
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
e96c2f1 to
0b8fde7
Compare
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.
0b8fde7 to
b377f29
Compare

🎟️ Tracking
N/A
📔 Objective
This commit updates the Credential Exchange Protocol (CXP) export registration to be app-scoped rather than per-user.
Key changes:
CredentialExchangeRegistryManagerto handle CXP registration and unregistration logic.isVaultRegisteredForExporttoisAppRegisteredForExportto reflect the app-wide scope.⏰ Reminders before review
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 confirmedissue 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