keyring: a library for uniformly accessing secrets
The keyring library is a library to access various password stores in a uniform way. It is based loosely on the Python keyring library.
keyring-secret-service-lib - Freedesktop Secret Service, used on Linux desktop
keyring-credential-locker-lib - Windows Credential Locker backend (TBD)
keyring-get-pass-lib - backend that prompts the user on the console for a password using the get-pass library documentation.
1 Front End Interface
(require keyring) | package: keyring-lib |
procedure
v : any/c
procedure
(get-password service-name username [ #:keyring keyring]) → (or/c #f bytes?) service-name : string? username : string? keyring : keyring? = (default-keyring)
procedure
(set-password! service-name username password [ #:keyring keyring]) → void? service-name : string? username : string? password : bytes? keyring : keyring? = (default-keyring)
procedure
(remove-password! service-name username [ #:keyring keyring]) → void? service-name : string? username : string? keyring : keyring? = (default-keyring)
procedure
(make-keyring-from-string keyring-spec) → keyring?
keyring-spec : string?
parameter
(default-keyring) → (or/c #f keyring?)
(default-keyring keyring) → void? keyring : (or/c #f keyring?)
1.1 Exceptions
procedure
(keyring-error? v) → boolean?
v : any/c
procedure
v : any/c
procedure
(keyring-backend-error-name e) → (or/c #f string?)
e : keyring-backend-error?
procedure
v : any/c
procedure
(keyring-backend-load-error-name e) → (or/c #f string?)
e : keyring-backend-load-error?
2 Back End Interface
(require keyring/interface) | package: keyring-lib |
2.1 Struct Type Property Keyring Interface
value
prop:keyring : struct-type-property?
2.2 Struct Generic Keyring Interface
syntax
procedure
(get-password-proc keyring service-name username) → (or/c #f bytes?) keyring : keyring? service-name : string? username : string?
procedure
(set-password-proc! keyring service-name username password) → void? keyring : keyring? service-name : string? username : string? password : bytes?
procedure
(remove-password-proc! keyring service-name username) → void? keyring : keyring? service-name : string? username : string?
2.3 Class Keyring Interface
|
method
(send a-keyring get-password service-name username) → (or/c #f bytes?) service-name : string? username : string?
3 Changelog
3.1 0.11
Move tests into separate packages.
Reorganize the backends around prop:keyring
Clean up error message formatting.
Log errors from raise procedures.
Add null backend as default when the KEYRING environment variable is not set.
3.2 0.10.1
Add license metadata to packages.
Regular Github Actions testing setup.
Logging changes.
3.3 0.10.0
Code cleanups.
Logging improvements.