Repository navigation
Lockbox 3 makes biometric credentials prompt on every use and survive a change to the enrolled biometrics, and fixes API and keychain-identity problems found in review. It contains source-breaking changes and requires Swift 6.3. Read Migrating to Lockbox 3 before upgrading.
Biometric credentials
save()andretrieve()prompt on every call. Lockbox 2 reused an authenticated context, so later calls could succeed without a prompt.- After the enrolled biometrics change,
retrieve()throws the newBiometricServiceError.biometricChangedbefore prompting,hasCredentialsisfalse, andsave()replaces the credentials withoutforget(). save()deletes the old item and then adds the new one, so it never updates an item that a biometric change has invalidated.- The biometric state is recorded on the keychain item, replacing the baseline files in Application Support.
retrieve()returnsBiometricService.Credentials, andBiometricServiceResultis removed.hasCredentialsandforget()areasync, and all keychain work runs off the main actor.BiometricService(accessGroup:)replacesgroup:, and thesynchronizableparameter is removed.
Users with credentials saved by Lockbox 2 sign in once more after upgrading.
Keychain fixes
generic(...)andinternet(...)take a singleprotection:, either an accessibility or an access-control policy. Keychain Services rejected items that set both.- Saving with a new access control now applies it to an existing item.
allGenericPasswordhandles are scoped to each item's own access group, soremove()deletes only that item.getString()throwsKeychainError.invalidUTF8for data that isn't UTF-8, instead of returningnil.KeychainErrorequality compares the status only..synchronizable(nil)clears an earlier value, as the "later criterion wins" rule documents.
Internet-password identity
These change which stored item a handle finds; the migration guide shows how to move affected items.
- Hosts are lowercased.
- URLs without a scheme, such as
example.com:8443/login, map to an https host, port, and path. - The
.urlcriterion defaults to the.defaultauthentication type, matchinginternet(url:).
Other changes
- Removed the unused
operationparameter fromevaluate(policy:reason:). - Renamed
KeychainRecord.descriptiontoitemDescription. CONTRIBUTING.mdrecords why Lockbox depends onswift-docc-plugin.
Full Changelog: 2.0.0...3.0.0