You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add support for multiple Valets within the same access group (#297)
* Fix warning about missing global source in Gemfile
* Commit Xcode-generated changes
These changes happened automatically as a result of using a newer Xcode version
* Add support for multiple Valets within the same access group
Previously, the shared access group identifier was used for both the access group itself, as well as the uniqueness identifier for the given Valet. This adds an optional additional `identifier` parameter that can be specified when creating a shared access group Valet. The identifier adds an additional element of uniqueness, so two Valets with the same shared access group can exist, and their data will not overlap, so long as they have different identifiers.
The default for this value is `nil`, which keeps the existing behavior for full backward compatibility.
* Bump version to 4.2.0
---------
Co-authored-by: Dan Federman <[email protected]>
This instance can be used to store and retrieve data securely across any app written by the same developer that has `group.Druidia` set as a value for the `com.apple.security.application-groups` key in the app’s `Entitlements`. This Valet is accessible when the device is unlocked. Note that `myValet` and `mySharedValet` cannot read or modify one another’s values because the two Valets were created with different initializers. All Valet types can share secrets across applications written by the same developer by using the `sharedGroupValet` initializer. Note that on macOS, the `groupPrefix` [must be the App ID prefix](https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_application-groups#discussion).
171
171
172
+
As with Valets, shared iCloud Valets can be created with an additional identifier, allowing multiple independently sandboxed keychains to exist within the same shared group.
This instance can be used to store and retrieve data that can be retrieved by this app on other devices logged into the same iCloud account with iCloud Keychain enabled. If iCloud Keychain is not enabled on this device, secrets can still be read and written, but will not sync to other devices. Note that `myCloudValet` can not read or modify values in either `myValet` or `mySharedValet` because `myCloudValet` was created a different initializer.
183
185
186
+
Shared iCloud Valets can be created with an additional identifier, allowing multiple independently sandboxed keychains to exist within the same iCloud shared group.
187
+
184
188
### Protecting Secrets with Face ID, Touch ID, or device Passcode
Copy file name to clipboardExpand all lines: Sources/Valet/SinglePromptSecureEnclaveValet.swift
+6-6
Original file line number
Diff line number
Diff line change
@@ -49,13 +49,13 @@ public final class SinglePromptSecureEnclaveValet: NSObject {
49
49
/// - identifier: A non-empty identifier that must correspond with the value for keychain-access-groups in your Entitlements file.
50
50
/// - accessControl: The desired access control for the SinglePromptSecureEnclaveValet.
51
51
/// - Returns: A SinglePromptSecureEnclaveValet that reads/writes keychain elements that can be shared across applications written by the same development team.
Copy file name to clipboardExpand all lines: Sources/Valet/Valet.swift
+19-17
Original file line number
Diff line number
Diff line change
@@ -40,19 +40,21 @@ public final class Valet: NSObject {
40
40
}
41
41
42
42
/// - Parameters:
43
-
/// - identifier: The identifier for the Valet's shared access group. Must correspond with the value for keychain-access-groups in your Entitlements file.
43
+
/// - groupIdentifier: The identifier for the Valet's shared access group. Must correspond with the value for keychain-access-groups in your Entitlements file.
44
+
/// - identifier: An optional additional uniqueness identifier. Using this identifier allows for the creation of separate, sandboxed Valets within the same shared access group.
44
45
/// - accessibility: The desired accessibility for the Valet.
45
46
/// - Returns: A Valet that reads/writes keychain elements that can be shared across applications written by the same development team.
/// - identifier: The identifier for the Valet's shared access group. Must correspond with the value for keychain-access-groups in your Entitlements file.
52
54
/// - accessibility: The desired accessibility for the Valet.
53
55
/// - Returns: A Valet (synchronized with iCloud) that reads/writes keychain elements that can be shared across applications written by the same development team.
0 commit comments