Skip to content

A lightweight secrets manager with envelope encryption, transit encryption, API auth, and audit logs.

License

Notifications You must be signed in to change notification settings

allisson/secrets

Repository files navigation

🔐 Secrets

A lightweight secrets manager with envelope encryption, transit encryption, API auth, and audit logs.

CI Go Report Card License: MIT

Secrets is inspired by HashiCorp Vault ❤️, but it is intentionally much simpler and was not designed to compete with Vault.

🚀 Quick Start (Docker-first)

The default way to run Secrets is the published Docker image:

docker pull allisson/secrets:v0.6.0

Use pinned tags for reproducible setups. latest is available for dev-only fast iteration.

Docs release/API metadata source: docs/metadata.json.

Then follow the Docker setup guide in docs/getting-started/docker.md.

⚠️ After rotating a master key or KEK, restart API server instances so they load the updated key material.

🧭 Choose Your Path

  1. 🐳 Run with Docker image (recommended): docs/getting-started/docker.md
  2. 💻 Run locally for development: docs/getting-started/local-development.md

🆕 What's New in v0.6.0

  • ☁️ Added KMS integration for master key encryption at rest (KMS_PROVIDER, KMS_KEY_URI)
  • 🔁 Added rotate-master-key CLI command for safer master key lifecycle operations
  • 🧭 Added provider-specific KMS setup and migration runbook documentation
  • ✅ Added KMS migration checklist: docs/operations/kms-migration-checklist.md
  • 📘 Added release notes: docs/releases/v0.6.0.md
  • ⬆️ Added upgrade guide: docs/releases/v0.6.0-upgrade.md
  • 📦 Updated pinned Docker docs/examples to allisson/secrets:v0.6.0

Release history quick links:

📚 Docs Map

Release note location:

All detailed guides include practical use cases and copy/paste-ready examples.

✨ What You Get

  • 🔐 Envelope encryption (Master Key -> KEK -> DEK -> Secret Data)
  • 🔑 KMS Integration for master key encryption at rest (supports Google Cloud KMS, AWS KMS, Azure Key Vault, HashiCorp Vault, and local secrets for testing)
  • 🚄 Transit encryption (/v1/transit/keys/*) for encrypt/decrypt as a service (decrypt input uses <version>:<base64-ciphertext>; see Transit API docs, create vs rotate, and error matrix)
  • 🎫 Tokenization API (/v1/tokenization/*) for token generation, detokenization, validation, and revocation
  • 👤 Token-based authentication and policy-based authorization
  • 📦 Versioned secrets by path (/v1/secrets/*path)
  • 📜 Audit logs with request correlation (request_id) and filtering
  • 📊 OpenTelemetry metrics with Prometheus-compatible /metrics export

🌐 API Overview

  • Health: GET /health
  • Readiness: GET /ready
  • Token issuance: POST /v1/token
  • Clients: GET/POST /v1/clients, GET/PUT/DELETE /v1/clients/:id
  • Secrets: POST/GET/DELETE /v1/secrets/*path
  • Transit: POST /v1/transit/keys, POST /v1/transit/keys/:name/rotate, POST /v1/transit/keys/:name/encrypt, POST /v1/transit/keys/:name/decrypt, DELETE /v1/transit/keys/:id (create vs rotate, error matrix)
  • Tokenization: POST /v1/tokenization/keys, POST /v1/tokenization/keys/:name/rotate, DELETE /v1/tokenization/keys/:id, POST /v1/tokenization/keys/:name/tokenize, POST /v1/tokenization/detokenize, POST /v1/tokenization/validate, POST /v1/tokenization/revoke
  • Audit logs: GET /v1/audit-logs
  • Metrics: GET /metrics (available when METRICS_ENABLED=true)

📄 License

MIT. See LICENSE.

See also

About

A lightweight secrets manager with envelope encryption, transit encryption, API auth, and audit logs.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages