You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added gateway v2 support for hashicorp vault migration / app connection.
Steps to verify the change
Type
Fix
Feature
Improvement
Breaking
Docs
Chore
Checklist
Title follows the conventional commit format: type(scope): short description (scope is optional, e.g., fix: prevent crash on sync or fix(api): handle null response).
This PR threads gatewayV2Service through the HashiCorp Vault app-connection, secret-sync, and external-migration code paths so Vault requests can be proxied via the newer Gateway v2 when connection details are available, falling back to the existing gateway v1 proxy otherwise.
The main behavioral changes are in backend/src/services/app-connection/hc-vault/hc-vault-connection-fns.ts, where requestWithHCVaultGateway now checks gatewayV2Service.getPlatformConnectionDetailsByGatewayId(...) and uses withGatewayV2Proxy(...) when present. Service factories and callers (app-connection-service, external-migration-service, secret-sync-fns) are updated accordingly to pass the new dependency.
Blocking issues found:
Gateway v2 HTTPS requests currently disable TLS verification (rejectUnauthorized: false), which weakens transport security for Vault connections.
HC Vault secret sync’s disableSecretDeletion option currently prevents all updates because it returns early before writing changes back to Vault.
Confidence Score: 2/5
This PR should not merge until the TLS verification and secret-sync logic issues are fixed.
Most changes are dependency-wiring for gateway v2 support, but two concrete regressions were introduced: (1) gateway v2 Vault requests disable TLS certificate verification, enabling MITM, and (2) HC Vault secret sync’s disableSecretDeletion option now skips all writes, preventing updates/additions when users enable that option.
Threads gatewayV2Service through sync calls; current disableSecretDeletion behavior returns before writes, preventing updates when deletion is disabled (logic bug).
disableSecretDeletion currently returns early before the Vault write, so any updates/additions in secretMap never get persisted when deletion is disabled. This is a functional regression for users who set this flag to “don’t delete”, not “don’t write”. The early return likely needs to move to only skip the deletion loop (i.e., still perform the POST when tainted is true).
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
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.
Context
Added gateway v2 support for hashicorp vault migration / app connection.
Steps to verify the change
Type
Checklist
type(scope): short description(scope is optional, e.g.,fix: prevent crash on syncorfix(api): handle null response).