Skip to content

Security

Keyraft is designed with security in mind, but proper deployment practices are essential.

Built-in Protections

  • Secrets encrypted at rest with AES-256-GCM
  • Token-based authentication with RBAC and scoped access
  • Namespace isolation prevents unauthorized cross-project access
  • Version tracking maintains a full audit trail
  • Audit logging records all API actions

Important Security Notes

DANGER

Follow these practices in production deployments.

  • Always set a strong KEYRAFT_MASTER_KEY (32+ bytes)
  • Store the root token securely (password manager, vault, etc.)
  • Use role-based tokens for applications (principle of least privilege)
  • Prefer RBAC roles over legacy scopes for new tokens
  • Enable TLS when exposing to untrusted networks
  • Rotate tokens regularly and revoke unused ones

Master Key

The master key encrypts all secrets. If lost, secrets cannot be recovered. If compromised, all secrets should be rotated.

bash
export KEYRAFT_MASTER_KEY=$(openssl rand -base64 32)

Never commit the master key to source control or bake it into container images without a secrets manager.

TLS

Keyraft does not terminate TLS natively. Use a reverse proxy (nginx, Caddy, Traefik) for HTTPS in production:

Client ──HTTPS──► Reverse Proxy ──HTTP──► Keyraft :7200

Token Hygiene

PracticeWhy
Short-lived service tokensLimits blast radius if leaked
Scoped namespacesApps only see their own config
Revoke on decommissionPrevents stale access
Audit log reviewDetect unauthorized access

Reporting Vulnerabilities

Report security vulnerabilities to xentixar@gmail.com.

License

Keyraft is licensed under Apache License 2.0.

Apache License 2.0