Lux Docs

Security

Security best practices and audit logging

Security is the foundation of KMS. Every operation is authenticated, authorized, and audited.

Rules

  1. ALL passwords MUST come from KMS -- Never store plaintext passwords anywhere
  2. Rotate keys regularly -- Use KMS automatic key rotation
  3. Audit all access -- KMS logs every read, write, and admin operation
  4. Use the K8s operator -- Automated secret sync to Kubernetes
  5. Enable MFA -- Required for administrative access
  6. IP allowlisting -- Restrict production access by source IP

Encryption Hierarchy

LayerAlgorithmProtected By
Root KeyAES-256-GCMHSM (hardware-bound)
Organization KEKAES-256-GCMRoot Key
Project KEKAES-256-GCMOrganization KEK
Data KeysAES-256-GCMProject KEK
SecretsAES-256-GCMData Keys

Access Control

KMS supports multiple access control models:

ModelDescription
RBACRole-based access: admin, member, viewer
ABACAttribute-based policies for fine-grained control
Machine IdentityService account auth via OIDC, K8s, AWS IAM
Temporary AccessTime-limited access grants with auto-revocation
Approval WorkflowsRequire human approval for sensitive operations

Audit Logging

Every operation produces an audit log entry:

{
  "event": "secret.read",
  "actor": "user:alice@example.com",
  "resource": "/production/database/password",
  "timestamp": "2026-03-22T10:15:30Z",
  "sourceIp": "10.0.1.50",
  "result": "success"
}

Secret Scanning

KMS includes a CLI scanner to prevent secrets from leaking to git:

# Scan current directory
lux kms scan .

# Pre-commit hook
lux kms scan --hook

Compliance

StandardSupport
SOC 2 Type IIAudit log export
PCI-DSSKey rotation, access control
HIPAAEncryption at rest and in transit
GDPRData isolation, audit trail

On this page