varlock version
1.7.2
Steps to reproduce
On macOS:
-
Create a secret in Keychain using the secrets CLI.
Example shape:
secrets set <service-or-collection> <account-or-key> <value>
-
Configure Varlock to read the same secret through the native Keychain/enclave-backed resolver path (varlockEnclave / native local encryption / keychain resolver).
-
Run a Varlock command that resolves the value, for example:
varlock load
# or
varlock run -- <command>
What is expected?
A secret created for Varlock's native Keychain/enclave workflow should be readable by Varlock when the service/account/key identifiers match.
What is actually happening?
Varlock's enclave/native Keychain path fails to read the secret when that secret was created by the external secrets CLI.
The underlying problem appears to be macOS Keychain access control: secrets created by the secrets CLI are scoped/authorized for the secrets CLI process, and are not automatically allowed to be read by other processes. This was confirmed by the user.
Possible solutions
- Fix/update the Keychain item access control after creation so Varlock's process/native helper is allowed to read it. This appears to be possible in code already.
- Preferably, avoid creating these Keychain secrets via the external
secrets CLI at all. Instead, create/write them via the varlock CLI through Varlock's own daemon/helper, so the stored Keychain item is created with the correct access controls from the start and this mismatch cannot happen.
System Info
macOS Keychain / Varlock 1.7.2
Any additional comments?
Related but not the same:
Those do not appear to cover the specific case where a secret created by the external secrets CLI cannot be read by Varlock's enclave/native Keychain integration due to Keychain access-control scoping.
varlock version
1.7.2
Steps to reproduce
On macOS:
Create a secret in Keychain using the
secretsCLI.Example shape:
Configure Varlock to read the same secret through the native Keychain/enclave-backed resolver path (
varlockEnclave/ native local encryption / keychain resolver).Run a Varlock command that resolves the value, for example:
What is expected?
A secret created for Varlock's native Keychain/enclave workflow should be readable by Varlock when the service/account/key identifiers match.
What is actually happening?
Varlock's enclave/native Keychain path fails to read the secret when that secret was created by the external
secretsCLI.The underlying problem appears to be macOS Keychain access control: secrets created by the
secretsCLI are scoped/authorized for thesecretsCLI process, and are not automatically allowed to be read by other processes. This was confirmed by the user.Possible solutions
secretsCLI at all. Instead, create/write them via thevarlockCLI through Varlock's own daemon/helper, so the stored Keychain item is created with the correct access controls from the start and this mismatch cannot happen.System Info
macOS Keychain / Varlock 1.7.2
Any additional comments?
Related but not the same:
keychain(...).Those do not appear to cover the specific case where a secret created by the external
secretsCLI cannot be read by Varlock's enclave/native Keychain integration due to Keychain access-control scoping.