17 releases
0.7.1 | Dec 3, 2023 |
---|---|
0.7.0 | Nov 16, 2023 |
0.6.2 | Nov 4, 2023 |
0.5.14 | Oct 23, 2023 |
0.5.0 | Jul 20, 2023 |
#871 in Authentication
300 downloads per month
1MB
26K
SLoC
Keychain Access
Copy the sos-mock.keychain-db
keychain database from the fixtures
directory to ~/Library/Keychains
, the password is mock-password
.
Keychain Dump
To create a dump of a keychain run:
security dump-keychain ~/Library/Keychains/sos-mock.keychain-db
If you include the -d
option you will be prompted to enter the password for each secret so that the dump includes the secret data:
security dump-keychain -d ~/Library/Keychains/sos-mock.keychain-db
To update the standard fixtures for the parser just redirect the output:
security dump-keychain ~/Library/Keychains/sos-mock.keychain-db > fixtures/sos-mock.keychain-db.txt
Interactive Autofill Tests
The interactive keychain access tests are behind a feature flag and require a keychain database in the standard location (see above).
Then you can run the interactive tests for keychain access with:
cargo test --features=interactive-keychain-tests
This will attempt to run some applescript to automatically fill the password prompt to access the keychain; you will need to allow your terminal application to execute the script, you should be prompted to allow this.
Navigate to System Preferences > Security & Privacy > Privacy > Accessibility
and allow access for your terminal program to execute the Applescript in order to autofill the keychain access prompt(s).
Dependencies
~37–52MB
~756K SLoC