Skip to content

feat(vault): HashiCorp Vault + AWS Secrets Manager plugins - #261

Open
LiorFink00 wants to merge 1 commit into
feat/vault-plugin-frameworkfrom
feat/vault-plugins
Open

feat(vault): HashiCorp Vault + AWS Secrets Manager plugins#261
LiorFink00 wants to merge 1 commit into
feat/vault-plugin-frameworkfrom
feat/vault-plugins

Conversation

@LiorFink00

Copy link
Copy Markdown
Collaborator

Task 4 of #255 (secret-manager honeytokens) — the two secret-manager plugins. Stacked on #257 (base = feat/vault-plugin-framework), so this diff is just the plugins; it retargets to main once #257 lands.

Changes

  • plugins/vault/hashicorp — AppRole auth (hvac), KV v2 create_or_update/delete, read detection by parsing the file audit device's NDJSON log. poll(paths, since) seeds its cutoff from the connection's last poll.
  • plugins/vault/aws — IAM-key auth (boto3), Secrets Manager create/put/delete, read detection via CloudTrail GetSecretValue lookup (20-min lookback for CloudTrail's delivery lag; the poller dedups by event_id).
  • New runtime deps: hvac>=2.0, boto3>=1.34.

Note on dependencies

This is the flagged dependency expansion — hvac (Vault HTTP client) and boto3 (AWS SDK). Both are the standard clients for their respective services.

Tests

  • tests/test_hashicorp_plugin.py (ported) — connect/plant/delete/poll with a faked hvac client + audit entries.
  • tests/test_aws_vault_plugin.py (new) — connect validation, plant/delete, and CloudTrail→AccessEvent parsing with a faked boto3 session.
  • 16 tests pass; plugin discovery + manifests API unaffected; both plugins load via the loader; ruff clean.

Part of #255.

Task 4 of the secret-manager honeytoken feature (#255): the two secret-manager
plugins, the first pieces that make real external API calls.

- plugins/vault/hashicorp: AppRole auth (hvac), KV v2 plant/delete, and read
  detection by parsing the file audit device's NDJSON log. poll() accepts the
  connection's last-poll `since` to bound the scan.
- plugins/vault/aws: IAM-key auth (boto3), Secrets Manager create/put/delete,
  and read detection via CloudTrail GetSecretValue lookup (with a 20-min
  lookback for CloudTrail delivery lag; the poller dedups by event_id).
- Adds runtime deps: hvac>=2.0, boto3>=1.34.

Stacked on #257 (the VaultPlugin base). Wired into API routes + the poller in
the remaining #255 tasks. Ported from the enterprise implementation; poll() is
aligned to the VaultPlugin ABC's (paths, since) signature.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018DARDAxeg4NM8FKoyGMQZy
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