Rotation and restarts
Route definitions are still loaded at startup. Restart Cordon after adding, removing, or editing routes or listeners.
1Password
Fetches secrets from 1Password vaults using the 1Password CLI (op).
If
account is omitted, Cordon preserves legacy behavior and lets op use its active/default account. Cordon warns about omitted accounts because that behavior is ambiguous in multi-account and background service environments.
Prerequisites
Theop CLI must be installed and authenticated before starting Cordon. For installation, sign-in options, service accounts, and troubleshooting, see the 1Password guide.
Provider configuration (optional)
Ifop is not on PATH (common for background services), specify the binary path explicitly in the provider config:
OS Keyring
Reads credentials from the operating system’s built-in credential store.
By default, cordon uses
cordon as the keyring service name. If you inspect the OS keychain directly (e.g., macOS Keychain Access, security find-generic-password -s cordon), entries appear under the service cordon.
Reading third-party keychain entries
You can useservice to read credentials stored by other tools under their own keychain entries, avoiding token duplication. For example, the GitHub CLI (gh) stores its token under service gh:github.com:
gh’s token directly — no need to copy it into cordon’s keyring. When gh auth refresh updates the token, cordon picks up the new value automatically.
The decode field
Some tools encode values before storing them in the keychain. The decode field tells cordon how to decode the raw keychain value before using it.
decode is only needed when the tool that stored the credential uses an encoding wrapper. Most tools (Python, Rust, native CLI tools) store raw values and don’t need it. The go-keyring encoding is used by Go CLI tools including gh.
Storing keyring credentials
Usecordon secret set to store credentials under the default cordon service. The account name is independent of route names — cordon secret set/cordon secret delete take an account name directly and never read cordon.toml or look up routes. Use cordon route show <name> to see which account a route’s source: keyring entry references:
security CLI:
cordon secret set always stores under the cordon service. When using a custom service to read from a third-party keychain entry, the credential is managed by that tool — you don’t need to store it via cordon.Platform differences
macOS Keychain
macOS Keychain
macOS Keychain enforces per-application access control. The binary that creates a keychain entry owns it and can read it without prompting. Any other binary triggers a system authorization dialog.Use
cordon secret set to create entries owned by cordon. Entries created by other tools (e.g., security CLI) will prompt on every request that needs the secret.Upgrading cordon, doing a fresh cargo build during development, or changing the install path changes the binary identity. macOS will prompt for keychain access the first time the new binary reads the secret. When this prompt appears, click Always Allow (not just Allow) to permanently grant the new binary access. Because cordon resolves keyring secrets just-in-time on each request, clicking “Allow” (one-time) means the prompt reappears on the very next request — which can be milliseconds later.In SSH, headless, or detached screen/tmux sessions, the keychain is locked and cannot display a prompt. Run security unlock-keychain ~/Library/Keychains/login.keychain-db first, or run the command from a terminal in a desktop session (directly or via screen sharing) where the login keychain is already unlocked. See Troubleshooting (macOS) for details.Linux Secret Service
Linux Secret Service
On Linux, cordon uses the D-Bus Secret Service API, typically provided by GNOME Keyring or KDE Wallet. Secrets are encrypted on disk and unlocked with the user’s login session. There are no per-application ACLs — any process running as the user can read entries. Security relies on standard Unix user isolation.A Secret Service provider must be installed and running:After installing, log out and log back in to initialize the default “login” collection. Without this step, A running D-Bus session bus is required — the keyring source does not work in containers, CI, or headless environments.
cordon secret set will fail with:Troubleshooting (macOS)
Platform secure storage failure: User interaction is not allowed.
Platform secure storage failure: User interaction is not allowed.
The macOS login keychain is locked. This happens in SSH sessions, headless CI,
and detached screen/tmux sessions where Keychain cannot display its
authorization dialog.Unlock the login keychain before running This prompts for your macOS login password. Once unlocked, keychain operations
work for the remainder of the session. If you have access to the Mac directly
or via screen sharing, run
cordon secret set:cordon secret set from a terminal in the desktop
session instead — the login keychain is already unlocked there.Troubleshooting (Linux)
DBus error: Object does not exist at path "/org/freedesktop/secrets/collection/login"
DBus error: Object does not exist at path "/org/freedesktop/secrets/collection/login"
A Secret Service provider is not running or has not initialized its default collection. Fix:Then log out and log back in so the keyring daemon starts and creates the “login” collection.
Platform secure storage failure
Platform secure storage failure
The D-Bus session bus is not available. Verify it’s reachable:If neither is available, you’re not in a desktop session (e.g., SSH, container, or headless server). The keyring source requires a desktop session.
Keyring access timed out
Keyring access timed out
The Secret Service provider is not responding. Check that gnome-keyring-daemon (or your provider) is running:If not running, log out and back in, or start it manually: