- Go 89%
- Python 6.9%
- Shell 3.7%
- Lua 0.4%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
Preserve the verified four-commit repair series. Both roots remain in progress; R01-R16 and the five V1 contract families remain unresolved. |
||
| cmd/agent-keyring | ||
| docs | ||
| internal | ||
| pkg/keyringclient | ||
| public | ||
| scripts | ||
| templates | ||
| tool-skills | ||
| workflow | ||
| .gitignore | ||
| go.mod | ||
| go.sum | ||
| README.md | ||
| workflow.events.jsonl | ||
| workflow.toml | ||
agent-keyring
Long-lived agent credential authority with a supervised lifecycle socket and a separate framed keyring service socket.
Purpose
This repository is for keyring structure, metadata, templates, tooling, and operational documentation. It is not for committing raw secrets, private keys, tokens, or live credential material.
Intended layout
docs/for procedures and operating notestemplates/for non-secret example filesscripts/for safe helper toolingpkg/keyringclientfor the public Go client used by applications that need the agent-keyring service boundarypublic/for public material onlylocal/for ignored machine-local state
Public Go client
Applications must not import agent-keyring/internal/.... Use pkg/keyringclient for direct Go wiring.
pkg/keyringclient speaks the framed JSON-RPC service contract over the configured Unix socket and hides secure-file staging for credential enrollment. It keeps secret material out of argv, env, stdin, logs, and application databases.
Minimal shape:
client, err := keyringclient.NewFromEnv("financial-site")
resp, err := client.EnrollCredential(ctx, keyringclient.EnrollCredentialRequest{
CredentialType: "api_key",
CredentialUsage: "api_auth",
ProviderService: "schwab",
AccountPrincipal: "financial-site/schwab/client_secret",
AudienceHash: "sha256:...",
RedactionPolicy: "redacted_label_only",
}, []byte(secret))
Client runtime environment (development compatibility path):
AGENT_KEYRING_SOCKET=/path/to/agent-keyring.sock, or$XDG_RUNTIME_DIR/agent-keyring.sockAGENT_KEYRING_OPERATOR_TOKEN=..., preferredAGENT_KEYRING_ADMIN_TOKEN=..., fallback
NewFromEnv keeps the legacy environment-token client path for compatibility. Production callers should construct keyringclient.Client with auth material obtained from a supervisor-controlled secure source; live auth tokens in ambient environment variables are forbidden by the V1 deployment contract.
Executable configuration
The executable requires the normal rpc-plugin-system lifecycle variables plus:
AGENT_KEYRING_SOCKET: framed keyring service socket; must differ from the substrate lifecycle socket.AGENT_KEYRING_DATA_DIR: private state root formetadata/metadata.sqliteand age-encryptedpayloads/.AGENT_KEYRING_AGE_RECIPIENT: public age X25519 recipient.AGENT_KEYRING_UNLOCK_FILE: owner-only, non-symlink age X25519 identity file that must match the configured public recipient.AGENT_KEYRING_ADMIN_TOKEN_FILEwithAGENT_KEYRING_ADMIN_CALLER_ID, and/orAGENT_KEYRING_OPERATOR_TOKEN_FILEwithAGENT_KEYRING_OPERATOR_CALLER_ID.
Startup fails closed if storage, unlock, auth binding, recipient, socket, or restore verification is invalid. Auth token contents are read descriptor-bound from owner-only files; they are not accepted from executable environment values. The substrate socket remains lifecycle-only. Credential operations use the separate framed service socket.
Safety rules
- Never commit live secrets
- Never commit private keys
- Never commit
.envfiles with real values - Keep real credential material outside git and outside this repo's tracked history