Permissions
Every command has an allow-* and a deny-* permission with the prefix keyring-store:. The full
list is on the generated permissions page.
Default set
keyring-store:default allows every command:
{
"identifier": "default",
"windows": ["main"],
"permissions": ["core:default", "keyring-store:default"]
}
A window with allow-get-passwords can read every password account under your service; the export
commands add nothing beyond that. Give the plugin only to windows that load your own code, never remote
content.
Narrow sets
Pick only the commands a window calls. A window that only signs with a vault key:
{
"identifier": "signer",
"windows": ["signer"],
"permissions": [
"keyring-store:allow-initialize",
"keyring-store:allow-load-client",
"keyring-store:allow-execute-procedure"
]
}
A window that only reads and writes its own tokens:
{
"identifier": "tokens",
"windows": ["main"],
"permissions": [
"keyring-store:allow-get-passwords",
"keyring-store:allow-set-passwords",
"keyring-store:allow-delete-passwords",
"keyring-store:allow-password-exists"
]
}
Permissions select commands, not accounts: allow-get-passwords reads any account (except the
reserved kp: accounts). If windows must not see each other's
secrets, give only one of them the password commands and route the rest through your own Rust commands.
Which method needs which command
| JavaScript | Command |
|---|---|
KeyringSession.load | initialize |
session.unload | destroy |
session.save | save |
session.createClient / loadClient | create_client / load_client |
store.get / insert / remove | get_store_record / save_store_record / remove_store_record |
vault.insert / remove | save_secret / remove_secret |
| vault procedures | execute_procedure |
getPasswords / setPasswords / deletePasswords / passwordExists | get_passwords / set_passwords / delete_passwords / password_exists |
exportPasswordsPlain / importPasswordsPlain | export_passwords_plain / import_passwords_plain |
exportPasswordsEncrypted / importPasswordsEncrypted | export_passwords_encrypted / import_passwords_encrypted |
ping | ping |
Permission identifiers use dashes: command get_store_record is keyring-store:allow-get-store-record.