-
Notifications
You must be signed in to change notification settings - Fork 1k
Update SDK to 3.0.0-8379-cc7daf10 #7267
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
Merged
Merged
Changes from 8 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
6d95b62
SDK Update - com.bitwarden:sdk-android 3.0.0-8316-37817253
bw-ghapp[bot] a5ffcb1
SDK Update - com.bitwarden:sdk-android 3.0.0-8344-5b5e8573
bw-ghapp[bot] f1ea7fa
SDK Update - com.bitwarden:sdk-android 3.0.0-8360-6d511f8c
bw-ghapp[bot] d9514ae
SDK Update - com.bitwarden:sdk-android 3.0.0-8362-24c62898
bw-ghapp[bot] a6eee0d
SDK Update - com.bitwarden:sdk-android 3.0.0-8368-7fdc273e
bw-ghapp[bot] f24d6d7
Implement new user key id slot on SdkStateBridge
bw-ghapp[bot] 02961d1
SDK Update - com.bitwarden:sdk-android 3.0.0-8371-b15ab941
bw-ghapp[bot] 616afd6
SDK Update - com.bitwarden:sdk-android 3.0.0-8379-cc7daf10
bw-ghapp[bot] 8b27a1a
Persist the SDK user key id to disk
github-actions[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Oops, something went wrong.
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.
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.
This should not be volatile, but persisted to disk.
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.
@claude Please persist the user key id to disk instead of making it volatile. The key id should be persisted.
Uh oh!
There was an error while loading. Please reload this page.
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.
Claude finished @quexten's task in 5m 24s —— View job
User key id is now persisted
SdkStateBridgeand theAuthDiskSourcepersistence patternsuserKeyIdslot toAuthDiskSource/AuthDiskSourceImplSdkStateBridgeset/get/clear through the disk sourceFakeAuthDiskSourceand testsBuild + run tests— gradle is not in this run's allowed tools (see note below)8b27a1aWhat changed
AuthDiskSource/AuthDiskSourceImpl— new per-user slot alongside the other cryptographic state:SdkStateBridge(app/.../sdk/statebridge/SdkStateBridge.kt:42-51) — the@Volatile inMemoryUserKeyIdfield and the "not persisted" comment are gone; the three callbacks now delegate to the disk source, matching howsetEncryptedPin/setV2UpgradeToken/setPersistentPinEnvelopealready behave:clearData(userId)now clears the key id too (AuthDiskSourceImpl.kt:205), so it is wiped along with the rest of the user's data on logout viaUserLogoutManager. TheinMemoryUserKeyslot is deliberately left volatile — that one is actual key material and must not touch disk.Tests —
SdkStateBridgeTestnow asserts against the disk source rather than a round-trip through the bridge,FakeAuthDiskSourcegained the backing map plus anassertUserKeyIdhelper and clears the slot inclearData, andAuthDiskSourceTestgainedgetUserKeyId/storeUserKeyIdSharedPreferences tests plus aclearDataassertion.Two things worth your call
putString/getString(plainbwPreferencesStorage), notputEncryptedString. The key id is an identifier the server already knows, not key material, and this matches howv2UpgradeTokenand the persistent PIN envelope are stored. Say the word if you'd rather it live in the encrypted store.clearUserKeyIdnow erases the persisted value. That is the literal bridge contract, but note the SDK calls it whenever it tears down the user's crypto state — so if it fires on lock rather than only on logout, the id won't survive a lock/unlock cycle. Worth a look from the SDK side; I didn't add any Android-side special-casing.Verification
I could not run
./gradlewin this job — every gradle invocation was rejected with "This command requires approval", unlike the earlier run on this PR. So the changes are not compile- or test-verified locally; the change is small and mechanical (interface method + impl + fake + delegation), but CI on this push is the actual check. If you want me to verify locally on a future run, gradle needs to be added to--allowedTools.· branch
sdlc/sdk-update