Skip to Content
AgentShield
Security

Credential Management

Every credential in an AgentShield deployment, where it lives, how it is protected, and how to rotate it.

An AgentShield deployment involves several kinds of credentials. This page inventories them and describes how each should be handled.

Inventory

CredentialHeld byStored by AgentShield asRotation
Agent Ed25519 seedAgent processPublic key + SHA-256 fingerprint onlyPOST /api/v1/agents/{id}/credentials/rotate
Human passwordMemberArgon2id hashPOST /api/v1/sessions/current/password
Session tokenBrowser (via dashboard cookie) or API clientSHA-256Expires in 12 h; sign-out revokes
Invitation tokenInvitee's emailSHA-256Single use, 72 h; resend closes the previous link
Tool API credentialsGateway environmentNot stored; injected per hostUpdate the environment variable and restart the gateway
INTELLIGENCE_TOKENGateway and analyzer environmentNot storedSet the new value on both and restart
DATABASE_URLEach service—Rotate the database role password
Redis, NATS, MinIO credentialsServices—Rotate at the store; update services
SMTP credentialsControl plane (SMTP_URL)—Update and restart
Bootstrap passwordBootstrap command onlyArgon2id hash of the ownerChange after first sign-in

Agent seeds

  • Generated by the agent operator. AgentShield never generates, receives, or stores them.
  • Store them in a secret manager or a file readable only by the agent's service account.
  • Use one seed per agent; never share a seed between workloads with different permissions.
  • After a suspected leak, rotate immediately. Rotation takes effect on commit; the old key stops authenticating.
  • To stop an agent without changing keys, suspend it.

Tool credentials stay in the gateway

The http.request tools file references environment variables by name:

{ "host": "api.github.com", "headers": { "Authorization": { "env": "AGENTSHIELD_GITHUB_AUTHORIZATION" } } }
  • The gateway reads the value at startup and refuses to start if it is empty or contains line breaks.
  • The agent cannot read it, set it, or override it.
  • Host, Content-Length, Transfer-Encoding, and Connection cannot be injected.
  • Responses never echo it: only a fixed set of response headers is returned.

On Kubernetes, provide these variables from a Secret, never from the ConfigMap that holds the tools file.

Human credentials

  • There is no public registration route. The first owner comes from the bootstrap command, which refuses production mode.
  • Passwords must be 12–128 characters and are stored as Argon2id.
  • Changing a password ends the user's other sessions; disabling a member ends all of theirs.
  • Temporary passwords, used when mail is not configured, are shown once and limit their session to changing the password.

Service credentials

SettingProduction requirement
DATABASE_URLMust connect as agentshield_app for the gateway, control plane, and relay
INTELLIGENCE_TOKENRequired on the analyzer and the gateway; at least 32 characters
INTELLIGENCE_URLHTTPS unless the analyzer is on loopback
NATS_URLtls:// for a non-loopback server
MINIO_USE_SSLtrue for a non-loopback endpoint
SMTP_URLsmtps:// or require_tls=true, with an HTTPS DASHBOARD_URL

The services refuse to start when these requirements are not met.

Development defaults

.env.example and docker-compose.yml contain known development values: agentshield/agentshield for PostgreSQL, agentshield-dev-only for MinIO and Grafana, change-me-local-only for the bootstrap owner. Compose binds every port to 127.0.0.1. These are not credentials for any other environment.

Secrets in logs and errors

  • Services never log request bodies or tool content.
  • Error messages never include stack traces, SQL, or secret values.
  • Redaction removes credential-like keys from stored arguments, results, and events.
  • The intelligence engine never logs content and never quotes matched secrets.

Was this page helpful?

On this page