Repository navigation
test(e2e): add secret manager lanes for HashiCorp Vault and CyberArk Conjur - #42503
Merged
Merged
Conversation
key_management_system had no end-to-end coverage: the Rust crates and the Python unit tests all run against mocked managers. This adds a secret_manager suite that drives a proxy configured with hashicorp_vault against a real Vault. The tests seed a fresh secret name per test with the runner's OPENAI_API_KEY and register a deployment pointing at os.environ/<name>. The proxy's env never holds that name, so get_secret's os.environ fallback cannot mask a broken manager, and a bogus value in Vault must come back as the provider's 401. Virtual keys are checked written to and removed from Vault under prefix_for_stored_virtual_keys. The setting is global to the proxy, so the lane has its own config and the secret_manager_vault opt-in marker, and stays out of the per-PR selector. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
yujonglee-berri
had a problem deploying
to
e2e-changed
September 22, 2026 17:34 — with
GitHub Actions
Error
yujonglee-berri
had a problem deploying
to
e2e-changed
September 22, 2026 17:34 — with
GitHub Actions
Error
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
One marker and opt-in (secret_manager / E2E_SECRET_MANAGER=<system>) pick the backend from secret_backends.BACKENDS. The tests reach the manager through a SecretStore protocol, and each backend contributes a secret_store_<system>.py module, a registry entry, and gateway/secret_manager_<system>_ci_config.yml. requires_capability deselects tests a backend cannot support (CyberArk does not delete), and test_secret_backends.py checks every lane config against its backend without a live stack. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
yujonglee-berri
had a problem deploying
to
e2e-changed
September 22, 2026 17:53 — with
GitHub Actions
Error
yujonglee-berri
had a problem deploying
to
e2e-changed
September 22, 2026 17:54 — with
GitHub Actions
Error
Adds cyberark as the second secret_manager backend: a Conjur store over its REST API (policy-declared variables, raw-text values, policy-patch teardown), its lane config, and a registry entry without deletes_stored_keys, since the proxy's CyberArk delete answers not_supported and Conjur keeps the key. secret_manager/backend.sh up|down <system> boots any backend in Docker and writes proxy.env and tests.env, so every lane runs the same way; the registry test checks the script boots exactly the registered backends. e2e_http gains send_text_external for APIs that speak raw text rather than JSON. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
yujonglee-berri
had a problem deploying
to
e2e-changed
September 22, 2026 18:02 — with
GitHub Actions
Error
yujonglee-berri
marked this pull request as ready for review
September 22, 2026 18:57
Contributor
There was a problem hiding this comment.
🔍 Devin Review: 2 flags
Not posted on this PR by your GitHub settings — view them in Devin Review. (Configure)
Contributor
|
…ess review The shared resources fixture reads client.proxy, so a bare ProxyClient errored every live test at setup. backend.sh now writes its env under a per-user directory with umask 077, the markerless unit tests are gone per tests/e2e/AGENTS.md, and routine comments are trimmed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
yujonglee-berri
had a problem deploying
to
e2e-changed
September 22, 2026 19:18 — with
GitHub Actions
Error
yujonglee-berri
had a problem deploying
to
e2e-changed
September 22, 2026 19:19 — with
GitHub Actions
Error
yujonglee-berri
enabled auto-merge (squash)
September 22, 2026 19:24
# Conflicts: # .github/e2e-stack/select_tests.py
yujonglee-berri
had a problem deploying
to
e2e-changed
September 22, 2026 19:25 — with
GitHub Actions
Error
yujonglee-berri
had a problem deploying
to
e2e-changed
September 22, 2026 19:26 — with
GitHub Actions
Error
Contributor
Author
|
@greptile-apps wdyt |
7 of 17 tasks
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
7 of 24 tasks
yuneng-berri
approved these changes
Sep 23, 2026
This branch is waiting to be deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
tests/e2e/secret_manager/against the actualhashicorp/vault:1.20andcyberark/conjur:1.24containers. The Vault and Conjur test clients call each manager's HTTP API to write and read secrets.SecretStoreis their shared typing interface, not a mock storeWhat it covers
Four behaviors, none of which mention a backend: a deployment key resolves from the manager, the value the manager holds is the one used, a generated virtual key is written to the manager, and a deleted one is removed from it
The proxy's own environment never holds the seeded secret, so a deployment can only get its key from the manager: the runner holds
OPENAI_API_KEYand the tests copy it in under a fresh name per test, which rules out theos.environfallbackget_secrettakes when the manager errorsShape
key_management_systemis global to a proxy, so each backend is its own lane against its own proxy.E2E_SECRET_MANAGER=<system>both opts the suite in and names the backend; the proxy boots fromgateway/secret_manager_<system>_ci_config.yml, and the tests reach the same manager through that backend'sSecretStoreA backend declares its
capabilities, and a test that needs one carries@pytest.mark.requires_capability(...), so it is deselected rather than failed or skipped where it does not apply. CyberArk's proxy-side delete returnsnot_supportedand Conjur keeps the key, so the delete test runs only on the Vault laneAdding a backend touches no test and no marker: a store module, a registry entry, a lane config, and an
up_<system>insecret_manager/backend.sh, which runs any backend in Docker and writes the proxy's and the tests' env. A half-added backend shows up when its lane runs, since tests/e2e allows no unit testsBuildkite steps for both lanes: BerriAI/project-releaser#263
Testing
Against real containers (
hashicorp/vault:1.20,cyberark/conjur:1.24):make lint-e2e-basedpyrightis clean; ruff, the raw-requests check, the coverage registry tests, the strict collector and the e2e-changed gate tests all passNot run: the full proxy lane. Both managers are enterprise-gated and need
LITELLM_LICENSE, and one test needs a realOPENAI_API_KEY; neither was available locally. The cross-checks above exercise the manager classes in-process instead