[Keystore] Named Keys & Certificates
This section declares named SSH private keys and PKCS#12 (P12) certificate credentials. The private-key option in Proxy and ca-keystore-name in MITM reference these entries by name to retrieve credentials.
Syntax Declaration
Entries are declared using standard INI configuration lines:
[Keystore]
name = kind, base64=<SECRET>, password=<SECRET>Component breakdown:
name: Unique identifier for the credential, referenced by[Proxy]or[MITM].kind: Credential type (positional parameter, required):private-ssh-key(oropenssh-private-key),p12.base64: Base64-encoded key or certificate archive content.password: Optional key-value parameter specifying the decryption password for protected private keys or certificate archives.
Field Reference
name(Non-empty string, configuration key name, required) Unique reference name for the credential. Must not contain null characters (NUL), up to 255 bytes in UTF-8. Referenced byprivate-keyin Proxy orca-keystore-namein MITM.inissh-key = private-ssh-key, base64=<SECRET>kind(Enum, positional argument, required) Credential usage type (first positional argument). Available values:private-ssh-key(aliasopenssh-private-key): SSH private key material, referenced byprivate-keyin Proxyp12: PKCS#12 certificate and private key archive, referenced byca-keystore-namein MITM
inissh-key = private-ssh-key, base64=<SECRET> ca-cert = p12, base64=<SECRET>base64(Base64-encoded string, required) Encoded private key file or PKCS#12 archive payload. Base64 validity is verified during profile parsing.inibase64=<SECRET>password(String, unset) Decryption password required to unlock protected SSH private keys or PKCS#12 archives. Enclose in double quotes if it contains delimiters such as commas or equals signs.inipassword="<SECRET>"
Configuration Constraints & Merging Rules
- Unique Names: Declaring duplicate names within the same configuration layer is forbidden.
- Reference Scope: Only supported via named references in Proxy
private-keyand MITMca-keystore-name; no global variable or text substitution is performed. - Plugin Overrides: When a plugin declares an entry with an existing name, it replaces the base configuration entry wholesale; options and materials are not merged field-by-field. Supports
%INSERT%or%APPEND%directives on the first line of the section.
Keychain-Based Credentials
On Apple platforms, sensitive credentials can be imported into the system Keychain via the application UI for encrypted, persistent storage:
- System Encrypted Storage: Private keys and certificate archives are protected by the system Keychain, avoiding exposure of sensitive credentials in plain text or Base64 within configuration files.
- Named References: Entries imported into Keychain use their assigned name as the identifier. The
private-keyoption in Proxy andca-keystore-namein MITM can reference thisnamedirectly without declaring a[Keystore]section in the profile. - Resolution Priority Over Profile: When resolving named credentials, the system prioritizes querying the Keychain by name; it falls back to the profile's
[Keystore]section only if the entry does not exist in Keychain. - No Downgrade on Failure: If an entry exists in Keychain but fails validation (e.g., corrupted data, usage mismatch like using an SSH key for MITM, or wrong password), the system returns an error immediately and will not fall back to the
[Keystore]section.
Configuration Examples
1. In-Profile Declared Credentials
[Keystore]
# SSH private key (unencrypted)
ssh-key = private-ssh-key, base64=<SECRET>
# PKCS#12 certificate and private key archive (password protected)
ca-cert = p12, base64=<SECRET>, password="<SECRET>"
[Proxy]
# SSH outbound referencing named private key
SSH = ssh, proxy.example.com, 22, username=user, private-key=ssh-key
[MITM]
# HTTPS decryption referencing named CA certificate
ca-keystore-name = ca-cert2. Referencing Keychain Credentials
If credentials named my-ssh-key and my-ca-cert have already been imported into the Keychain via the application UI, you do not need to declare a [Keystore] section in the profile; reference them directly by name (Keychain entries always take precedence even if an identical name exists in [Keystore]):
[Proxy]
SSH = ssh, proxy.example.com, 22, username=user, private-key=my-ssh-key
[MITM]
ca-keystore-name = my-ca-cert