Skip to content

feat: add AWS Secrets Manager backend and TracingAuditLog#3

Merged
ceejbot merged 1 commit intolatestfrom
feature/aws-sm-backend
Mar 28, 2026
Merged

feat: add AWS Secrets Manager backend and TracingAuditLog#3
ceejbot merged 1 commit intolatestfrom
feature/aws-sm-backend

Conversation

@ceejbot
Copy link
Copy Markdown
Owner

@ceejbot ceejbot commented Mar 28, 2026

Summary

Supersedes #1 — extracts and improves the AWS Secrets Manager backend into the workspace structure from #2.

Architecture: decouple SecretStore from AuditLog

The Vault<K, S, A> type parameters already support independent backend selection. This PR makes that explicit — store crates no longer need to bundle both traits.

Use case SecretStore AuditLog
zeroclaw rusqlite RusqliteAuditLog
Cloud VM aws-sm TracingAuditLog
Shared infra postgres PostgresAuditLog or TracingAuditLog

New crate: zerolease-store-aws-sm

  • SecretStore backed by AWS Secrets Manager
  • Metadata in AWS tags (zerolease:kind, zerolease:version, etc.) so list() avoids N+1 GetSecretValue calls
  • delete() defaults to AWS's 30-day recovery window; opt-in with_force_delete()
  • Handles "marked for deletion" secrets as not-found
  • batch_update() documents non-transactional behavior (acceptable for DEK rotation)
  • MetadataTag enum for type-safe tag key management

New in core crate

  • TracingAuditLog: emit-only audit backend via tracing::info!(), query methods return Error::NotSupported
  • Error::NotSupported variant
  • Softened batch_update trait doc for backends without transaction support

CI improvements

  • OIDC auth for AWS (replaces static IAM keys)
  • Configurable test prefix (ZEROLEASE_SM_TEST_PREFIX) scoped to IAM policy
  • --no-fail-fast on SM tests for better diagnostics
  • Debug formatting on AWS SDK errors

Closes #1

Test plan

  • cargo clippy --workspace --all-targets clean
  • cargo test --workspace — 66 tests pass, 8 AWS integration tests ignored locally
  • All 7 AWS SM integration tests pass in CI via OIDC
  • CI workflow green

Decouples SecretStore from AuditLog — backends no longer need to
bundle both. Users pick each independently via Vault<K, S, A>.

New crate: zerolease-store-aws-sm
- SecretStore implementation backed by AWS Secrets Manager
- Stores metadata in AWS tags so list() avoids N+1 GetSecretValue calls
- delete() defaults to AWS's 30-day recovery window (configurable)
- Handles "marked for deletion" secrets as not-found
- batch_update() documents non-transactional behavior

New in core crate:
- TracingAuditLog: emit-only audit backend using tracing::info!()
- Error::NotSupported variant for unsupported operations
- Softened batch_update trait doc for non-transactional backends

CI: OIDC auth for AWS, configurable test prefix, --no-fail-fast
@ceejbot ceejbot force-pushed the feature/aws-sm-backend branch from a6fa132 to f6803aa Compare March 28, 2026 20:22
@ceejbot ceejbot merged commit 7b10caa into latest Mar 28, 2026
3 checks passed
@ceejbot ceejbot deleted the feature/aws-sm-backend branch March 28, 2026 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant