Vectrune Vault

Cross-platform OS-native local secrets vault for Vectrune apps: macOS Keychain, Windows Credential Manager, and Linux keyring — with a pluggable backend design.

Install and approve

Use Vectrune v0.3.14 or newer with native package support. Replace LIBRARY with the matching shared library from the release archive.

vectrune deps add vaultvectrune native approve vault LIBRARY

Rune import

import "pkg:vault"

Enables @Vault sections and vault.* actions in native REST apps.

Section

@Vault/<instance>
Configures a scoped secrets vault. Set type to local (default) or memory (for tests), service for the OS keychain namespace, and allow_keys to explicitly allowlist accessible secret keys.
@Vault/localtype = "local"service = "vectrune"allow_keys = ["cloudflare-account-id", "cloudflare-api-token"]

Package commands

secret = vault.get local request
Reads an allowlisted secret key from the OS keychain and returns key and value.
saved = vault.set local request
Stores or updates an allowlisted secret key unless read_only is true.
status = vault.has local request
Checks whether an allowlisted secret exists without returning its value.
removed = vault.delete local request
Deletes an allowlisted secret key from the OS keychain.

Security and platform notes

Bind local apps exposing vault routes to host = 127.0.0.1 and require an explicit auth header (such as Authorization: Bearer) on mutating routes so websites cannot trigger them via cross-site requests. Set read_only = true when routes only read secrets.

macOS Keychain, Windows Credential Manager, and Linux Freedesktop Secret Service (GNOME Keyring / KWallet) persist secrets across reboots. On headless Linux without a D-Bus Secret Service daemon, Vectrune Vault falls back to the in-memory Linux kernel keyring (keyutils).