Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

refactor(gateway): carry the gateway id in connection details

bernie-g091b08756526
diff --git a/backend/src/ee/services/app-connections/chef/chef-connection-fns.ts b/backend/src/ee/services/app-connections/chef/chef-connection-fns.ts
index 75ca0deecf..f8417814f6 100644
--- a/backend/src/ee/services/app-connections/chef/chef-connection-fns.ts
+++ b/backend/src/ee/services/app-connections/chef/chef-connection-fns.ts
@@ -187,9 +187,7 @@ export const requestWithChefGateway = async <T>(
},
{
protocol: GatewayProxyProtocol.Tcp,
- relayHost: platformConnectionDetails.relayHost,
- gateway: platformConnectionDetails.gateway,
- relay: platformConnectionDetails.relay
+ ...platformConnectionDetails
}
);
}
diff --git a/backend/src/ee/services/dynamic-secret/providers/azure-sql-database.ts b/backend/src/ee/services/dynamic-secret/providers/azure-sql-database.ts
index 4a50ebe13c..b75047e121 100644
--- a/backend/src/ee/services/dynamic-secret/providers/azure-sql-database.ts
+++ b/backend/src/ee/services/dynamic-secret/providers/azure-sql-database.ts
@@ -213,9 +213,7 @@ export const AzureSqlDatabaseProvider = ({
await gatewayCallback("localhost", port);
},
{
- relayHost: gatewayV2ConnectionDetails.relayHost,
- gateway: gatewayV2ConnectionDetails.gateway,
- relay: gatewayV2ConnectionDetails.relay,
+ ...gatewayV2ConnectionDetails,
protocol: GatewayProxyProtocol.Tcp
}
);
diff --git a/backend/src/ee/services/dynamic-secret/providers/clickhouse.ts b/backend/src/ee/services/dynamic-secret/providers/clickhouse.ts
index 42e38690d0..05440eeb4e 100644
--- a/backend/src/ee/services/dynamic-secret/providers/clickhouse.ts
+++ b/backend/src/ee/services/dynamic-secret/providers/clickhouse.ts
@@ -187,9 +187,7 @@ export const ClickhouseProvider = ({
await gatewayCallback("localhost", port);
},
{
- relayHost: gatewayV2ConnectionDetails.relayHost,
- gateway: gatewayV2ConnectionDetails.gateway,
- relay: gatewayV2ConnectionDetails.relay,
+ ...gatewayV2ConnectionDetails,
protocol: GatewayProxyProtocol.Tcp
}
);
diff --git a/backend/src/ee/services/dynamic-secret/providers/kubernetes.ts b/backend/src/ee/services/dynamic-secret/providers/kubernetes.ts
index e2395ac518..92e040c2c7 100644
--- a/backend/src/ee/services/dynamic-secret/providers/kubernetes.ts
+++ b/backend/src/ee/services/dynamic-secret/providers/kubernetes.ts
@@ -76,9 +76,7 @@ export const KubernetesProvider = ({
);
},
{
- relayHost: gatewayV2ConnectionDetails.relayHost,
- gateway: gatewayV2ConnectionDetails.gateway,
- relay: gatewayV2ConnectionDetails.relay,
+ ...gatewayV2ConnectionDetails,
protocol: inputs.reviewTokenThroughGateway ? GatewayProxyProtocol.Http : GatewayProxyProtocol.Tcp,
httpsAgent: inputs.httpsAgent
}
diff --git a/backend/src/ee/services/dynamic-secret/providers/milvus.ts b/backend/src/ee/services/dynamic-secret/providers/milvus.ts
index 4e65e8bf04..3e1121e042 100644
--- a/backend/src/ee/services/dynamic-secret/providers/milvus.ts
+++ b/backend/src/ee/services/dynamic-secret/providers/milvus.ts
@@ -142,9 +142,7 @@ export const MilvusProvider = ({
if (gatewayV2ConnectionDetails) {
return withGatewayV2Proxy(async (port) => gatewayCallback("localhost", port), {
- relayHost: gatewayV2ConnectionDetails.relayHost,
- gateway: gatewayV2ConnectionDetails.gateway,
- relay: gatewayV2ConnectionDetails.relay,
+ ...gatewayV2ConnectionDetails,
protocol: GatewayProxyProtocol.Tcp,
httpsAgent: inputs.httpsAgent
});
diff --git a/backend/src/ee/services/dynamic-secret/providers/sql-database.ts b/backend/src/ee/services/dynamic-secret/providers/sql-database.ts
index 717a9b5d53..ec40109c87 100644
--- a/backend/src/ee/services/dynamic-secret/providers/sql-database.ts
+++ b/backend/src/ee/services/dynamic-secret/providers/sql-database.ts
@@ -229,9 +229,7 @@ export const SqlDatabaseProvider = ({
await gatewayCallback("localhost", port);
},
{
- relayHost: gatewayV2ConnectionDetails.relayHost,
- gateway: gatewayV2ConnectionDetails.gateway,
- relay: gatewayV2ConnectionDetails.relay,
+ ...gatewayV2ConnectionDetails,
protocol: GatewayProxyProtocol.Tcp
}
);
diff --git a/backend/src/ee/services/dynamic-secret/providers/vertica.ts b/backend/src/ee/services/dynamic-secret/providers/vertica.ts
index 759417285c..c478ec9250 100644
--- a/backend/src/ee/services/dynamic-secret/providers/vertica.ts
+++ b/backend/src/ee/services/dynamic-secret/providers/vertica.ts
@@ -216,9 +216,7 @@ export const VerticaProvider = ({
await gatewayCallback("localhost", port);
},
{
- relayHost: gatewayV2ConnectionDetails.relayHost,
- gateway: gatewayV2ConnectionDetails.gateway,
- relay: gatewayV2ConnectionDetails.relay,
+ ...gatewayV2ConnectionDetails,
protocol: GatewayProxyProtocol.Tcp
}
);
diff --git a/backend/src/ee/services/gateway-v2/gateway-v2-fns.ts b/backend/src/ee/services/gateway-v2/gateway-v2-fns.ts
index ddadfdf460..b7f1e3431a 100644
--- a/backend/src/ee/services/gateway-v2/gateway-v2-fns.ts
+++ b/backend/src/ee/services/gateway-v2/gateway-v2-fns.ts
@@ -31,9 +31,7 @@ export const testConnectionWithGateway = async (
(proxyPort) => callTestConnection({ port: proxyPort, body: request, timeoutMs, signal }),
{
protocol: GatewayProxyProtocol.ConnectionTest,
- relayHost: platform.relayHost,
- gateway: platform.gateway,
- relay: platform.relay
+ ...platform
}
);
} catch {
diff --git a/backend/src/ee/services/gateway-v2/gateway-v2-service.ts b/backend/src/ee/services/gateway-v2/gateway-v2-service.ts
index 1672876e7a..a636ff8a97 100644
--- a/backend/src/ee/services/gateway-v2/gateway-v2-service.ts
+++ b/backend/src/ee/services/gateway-v2/gateway-v2-service.ts
@@ -464,6 +464,7 @@ export const gatewayV2ServiceFactory = ({
});
return {
+ gatewayId,
relayHost: relayCredentials.relayHost,
gateway: {
clientCertificate: clientCert.toString("pem"),
@@ -627,6 +628,7 @@ export const gatewayV2ServiceFactory = ({
});
return {
+ gatewayId,
relayHost: relayCredentials.relayHost,
gateway: {
clientCertificate: clientCert.toString("pem"),
@@ -891,9 +893,7 @@ export const gatewayV2ServiceFactory = ({
},
{
protocol: GatewayProxyProtocol.Health,
- relayHost: gatewayV2ConnectionDetails.relayHost,
- gateway: gatewayV2ConnectionDetails.gateway,
- relay: gatewayV2ConnectionDetails.relay
+ ...gatewayV2ConnectionDetails
}
);
} catch (err) {
diff --git a/backend/src/ee/services/gateway-v2/gateway-v2-types.ts b/backend/src/ee/services/gateway-v2/gateway-v2-types.ts
index a7cbb9bdec..351cc24702 100644
--- a/backend/src/ee/services/gateway-v2/gateway-v2-types.ts
+++ b/backend/src/ee/services/gateway-v2/gateway-v2-types.ts
@@ -1,4 +1,5 @@
export type TGatewayV2ConnectionDetails = {
+ gatewayId: string;
relayHost: string;
gateway: {
clientCertificate: string;
diff --git a/backend/src/ee/services/pam-discovery/pam-discovery-fns.ts b/backend/src/ee/services/pam-discovery/pam-discovery-fns.ts
index 47e5f4c39d..2dfe542434 100644
--- a/backend/src/ee/services/pam-discovery/pam-discovery-fns.ts
+++ b/backend/src/ee/services/pam-discovery/pam-discovery-fns.ts
@@ -44,9 +44,7 @@ export const sshExecWithGateway = async (
},
{
protocol: GatewayProxyProtocol.Discovery,
- relayHost: platform.relayHost,
- gateway: platform.gateway,
- relay: platform.relay
+ ...platform
}
);
};
@@ -69,9 +67,7 @@ export const executeWithGateway = async <T>(
return withGatewayV2Proxy((proxyPort) => operation(proxyPort), {
protocol: GatewayProxyProtocol.Tcp,
- relayHost: platform.relayHost,
- gateway: platform.gateway,
- relay: platform.relay
+ ...platform
});
};
@@ -228,9 +224,7 @@ export const winrmRpcWithGateway = async <T>({
}),
{
protocol: GatewayProxyProtocol.WinRm,
- relayHost: platform.relayHost,
- gateway: platform.gateway,
- relay: platform.relay
+ ...platform
}
);
@@ -272,9 +266,7 @@ export const sweepReachableTargets = async (
}),
{
protocol: GatewayProxyProtocol.Discovery,
- relayHost: platform.relayHost,
- gateway: platform.gateway,
- relay: platform.relay,
+ ...platform,
longLived: true
}
);
diff --git a/backend/src/ee/services/pam-web-access/pam-web-access-service.ts b/backend/src/ee/services/pam-web-access/pam-web-access-service.ts
index 924ee76589..6eb001472a 100644
--- a/backend/src/ee/services/pam-web-access/pam-web-access-service.ts
+++ b/backend/src/ee/services/pam-web-access/pam-web-access-service.ts
@@ -535,9 +535,7 @@ export const pamWebAccessServiceFactory = ({
relayServer = await setupRelayServer({
protocol: isRdp ? GatewayProxyProtocol.PamRdpBrowser : GatewayProxyProtocol.Pam,
- relayHost: certs.relayHost,
- relay: certs.relay,
- gateway: certs.gateway,
+ ...certs,
longLived: true
});
diff --git a/backend/src/ee/services/pki-discovery/pki-discovery-scan-fns.ts b/backend/src/ee/services/pki-discovery/pki-discovery-scan-fns.ts
index 4bd62846da..69ca6e8e62 100644
--- a/backend/src/ee/services/pki-discovery/pki-discovery-scan-fns.ts
+++ b/backend/src/ee/services/pki-discovery/pki-discovery-scan-fns.ts
@@ -205,9 +205,7 @@ export const executeScan = async (discoveryId: string, deps: TExecuteScanDeps):
return scanEndpoint("localhost", proxyPort, DEFAULT_SCAN_TIMEOUT, sniHostname);
},
{
- relayHost: targetGatewayDetails.relayHost,
- gateway: targetGatewayDetails.gateway,
- relay: targetGatewayDetails.relay,
+ ...targetGatewayDetails,
protocol: GatewayProxyProtocol.Tcp
}
);
diff --git a/backend/src/lib/gateway-v2/gateway-v2.ts b/backend/src/lib/gateway-v2/gateway-v2.ts
index e98c6ff695..c68c5c8c63 100644
--- a/backend/src/lib/gateway-v2/gateway-v2.ts
+++ b/backend/src/lib/gateway-v2/gateway-v2.ts
@@ -154,6 +154,8 @@ export const setupRelayServer = async ({
httpsAgent,
longLived
}: {
+ // Consumed by the load tracker; accepted here so callers thread it through from the start.
+ gatewayId: string;
protocol: GatewayProxyProtocol;
relayHost: string;
gateway: { clientCertificate: string; clientPrivateKey: string; serverCertificateChain: string };
@@ -279,9 +281,10 @@ export const withGatewayV2Proxy = async <T>(
longLived?: boolean;
} & TGatewayV2ConnectionDetails
): Promise<T> => {
- const { protocol, relayHost, gateway, relay, httpsAgent, longLived } = options;
+ const { gatewayId, protocol, relayHost, gateway, relay, httpsAgent, longLived } = options;
const { port, cleanup, getRelayError } = await setupRelayServer({
+ gatewayId,
protocol,
relayHost,
gateway,
diff --git a/backend/src/services/app-connection/adcs/adcs-connection-fns.ts b/backend/src/services/app-connection/adcs/adcs-connection-fns.ts
index 030e675feb..2e1e8744b2 100644
--- a/backend/src/services/app-connection/adcs/adcs-connection-fns.ts
+++ b/backend/src/services/app-connection/adcs/adcs-connection-fns.ts
@@ -80,9 +80,7 @@ export const executeAdcsGatewayOperation = async <T>(
}),
{
protocol: GatewayProxyProtocol.Adcs,
- relayHost: connectionDetails.relayHost,
- gateway: connectionDetails.gateway,
- relay: connectionDetails.relay
+ ...connectionDetails
}
);
diff --git a/backend/src/services/app-connection/azure-key-vault/azure-key-vault-connection-fns.ts b/backend/src/services/app-connection/azure-key-vault/azure-key-vault-connection-fns.ts
index bc3d551b68..833cde9403 100644
--- a/backend/src/services/app-connection/azure-key-vault/azure-key-vault-connection-fns.ts
+++ b/backend/src/services/app-connection/azure-key-vault/azure-key-vault-connection-fns.ts
@@ -121,9 +121,7 @@ export const requestWithAzureKeyVaultGateway = async <T>(
},
{
protocol: GatewayProxyProtocol.Tcp,
- relayHost: gatewayConnectionDetailsV2.relayHost,
- gateway: gatewayConnectionDetailsV2.gateway,
- relay: gatewayConnectionDetailsV2.relay
+ ...gatewayConnectionDetailsV2
}
);
}
diff --git a/backend/src/services/app-connection/f5-big-ip/f5-big-ip-connection-fns.ts b/backend/src/services/app-connection/f5-big-ip/f5-big-ip-connection-fns.ts
index 0354120322..b8750a0bf3 100644
--- a/backend/src/services/app-connection/f5-big-ip/f5-big-ip-connection-fns.ts
+++ b/backend/src/services/app-connection/f5-big-ip/f5-big-ip-connection-fns.ts
@@ -71,9 +71,7 @@ const requestWithF5BigIpGateway = async <T>(
},
{
protocol: GatewayProxyProtocol.Tcp,
- relayHost: platformConnectionDetails.relayHost,
- gateway: platformConnectionDetails.gateway,
- relay: platformConnectionDetails.relay
+ ...platformConnectionDetails
}
);
}
@@ -218,9 +216,7 @@ export const executeF5BigIpOperationWithGateway = async <T>(
},
{
protocol: GatewayProxyProtocol.Tcp,
- relayHost: platformConnectionDetails.relayHost,
- gateway: platformConnectionDetails.gateway,
- relay: platformConnectionDetails.relay
+ ...platformConnectionDetails
}
);
}
diff --git a/backend/src/services/app-connection/github/github-connection-fns.ts b/backend/src/services/app-connection/github/github-connection-fns.ts
index 968906ee5b..82c2712822 100644
--- a/backend/src/services/app-connection/github/github-connection-fns.ts
+++ b/backend/src/services/app-connection/github/github-connection-fns.ts
@@ -250,9 +250,7 @@ export const requestWithGitHubGateway = async <T>(
},
{
protocol: GatewayProxyProtocol.Tcp,
- relayHost: connectionDetails.relayHost,
- gateway: connectionDetails.gateway,
- relay: connectionDetails.relay
+ ...connectionDetails
}
);
}
diff --git a/backend/src/services/app-connection/hc-vault/hc-vault-connection-fns.ts b/backend/src/services/app-connection/hc-vault/hc-vault-connection-fns.ts
index d1e255b87c..3735b0b5c4 100644
--- a/backend/src/services/app-connection/hc-vault/hc-vault-connection-fns.ts
+++ b/backend/src/services/app-connection/hc-vault/hc-vault-connection-fns.ts
@@ -238,9 +238,7 @@ export const requestWithHCVaultGateway = async <T>(
},
{
protocol: GatewayProxyProtocol.Tcp,
- relayHost: gatewayConnectionDetailsV2.relayHost,
- gateway: gatewayConnectionDetailsV2.gateway,
- relay: gatewayConnectionDetailsV2.relay
+ ...gatewayConnectionDetailsV2
}
);
}
diff --git a/backend/src/services/app-connection/kemp-loadmaster/kemp-loadmaster-connection-fns.ts b/backend/src/services/app-connection/kemp-loadmaster/kemp-loadmaster-connection-fns.ts
index 68edbe02bf..db8878f679 100644
--- a/backend/src/services/app-connection/kemp-loadmaster/kemp-loadmaster-connection-fns.ts
+++ b/backend/src/services/app-connection/kemp-loadmaster/kemp-loadmaster-connection-fns.ts
@@ -116,9 +116,7 @@ export const executeKempLoadMasterOperationWithGateway = async <T>(
},
{
protocol: GatewayProxyProtocol.Tcp,
- relayHost: platformConnectionDetails.relayHost,
- gateway: platformConnectionDetails.gateway,
- relay: platformConnectionDetails.relay
+ ...platformConnectionDetails
}
);
}
diff --git a/backend/src/services/app-connection/ldap/ldap-connection-fns.ts b/backend/src/services/app-connection/ldap/ldap-connection-fns.ts
index 0f131a6514..552548b8f4 100644
--- a/backend/src/services/app-connection/ldap/ldap-connection-fns.ts
+++ b/backend/src/services/app-connection/ldap/ldap-connection-fns.ts
@@ -282,9 +282,7 @@ export const executeWithPotentialGateway = async <T>(
},
{
protocol: GatewayProxyProtocol.Tcp,
- relayHost: platformConnectionDetails.relayHost,
- gateway: platformConnectionDetails.gateway,
- relay: platformConnectionDetails.relay
+ ...platformConnectionDetails
}
);
}
diff --git a/backend/src/services/app-connection/netscaler/netscaler-connection-fns.ts b/backend/src/services/app-connection/netscaler/netscaler-connection-fns.ts
index 54a5c4ee3e..05388c6a2c 100644
--- a/backend/src/services/app-connection/netscaler/netscaler-connection-fns.ts
+++ b/backend/src/services/app-connection/netscaler/netscaler-connection-fns.ts
@@ -77,9 +77,7 @@ const requestWithNetScalerGateway = async <T>(
},
{
protocol: GatewayProxyProtocol.Tcp,
- relayHost: platformConnectionDetails.relayHost,
- gateway: platformConnectionDetails.gateway,
- relay: platformConnectionDetails.relay
+ ...platformConnectionDetails
}
);
}
@@ -201,9 +199,7 @@ export const executeNetScalerOperationWithGateway = async <T>(
},
{
protocol: GatewayProxyProtocol.Tcp,
- relayHost: platformConnectionDetails.relayHost,
- gateway: platformConnectionDetails.gateway,
- relay: platformConnectionDetails.relay
+ ...platformConnectionDetails
}
);
}
diff --git a/backend/src/services/app-connection/nutanix-prism-central/nutanix-prism-central-connection-fns.ts b/backend/src/services/app-connection/nutanix-prism-central/nutanix-prism-central-connection-fns.ts
index 6d83c9c633..2948698ffe 100644
--- a/backend/src/services/app-connection/nutanix-prism-central/nutanix-prism-central-connection-fns.ts
+++ b/backend/src/services/app-connection/nutanix-prism-central/nutanix-prism-central-connection-fns.ts
@@ -111,9 +111,7 @@ export const executeNutanixOperationWithGateway = async <T>(
},
{
protocol: GatewayProxyProtocol.Tcp,
- relayHost: platformConnectionDetails.relayHost,
- gateway: platformConnectionDetails.gateway,
- relay: platformConnectionDetails.relay
+ ...platformConnectionDetails
}
);
}
diff --git a/backend/src/services/app-connection/shared/sql/sql-connection-fns.ts b/backend/src/services/app-connection/shared/sql/sql-connection-fns.ts
index b2522b7944..7835b165d3 100644
--- a/backend/src/services/app-connection/shared/sql/sql-connection-fns.ts
+++ b/backend/src/services/app-connection/shared/sql/sql-connection-fns.ts
@@ -211,9 +211,7 @@ export const executeWithPotentialGateway = async <T>(
},
{
protocol: GatewayProxyProtocol.Tcp,
- relayHost: platformConnectionDetails.relayHost,
- gateway: platformConnectionDetails.gateway,
- relay: platformConnectionDetails.relay
+ ...platformConnectionDetails
}
);
}
diff --git a/backend/src/services/app-connection/smb/smb-connection-fns.ts b/backend/src/services/app-connection/smb/smb-connection-fns.ts
index 4279bf5989..09618e59f8 100644
--- a/backend/src/services/app-connection/smb/smb-connection-fns.ts
+++ b/backend/src/services/app-connection/smb/smb-connection-fns.ts
@@ -56,9 +56,7 @@ export const executeSmbWithPotentialGateway = async <T>(
},
{
protocol: GatewayProxyProtocol.Tcp,
- relayHost: platformConnectionDetails.relayHost,
- gateway: platformConnectionDetails.gateway,
- relay: platformConnectionDetails.relay
+ ...platformConnectionDetails
}
);
}
diff --git a/backend/src/services/app-connection/ssh/ssh-connection-fns.ts b/backend/src/services/app-connection/ssh/ssh-connection-fns.ts
index 800d551b6c..5bd5cd1de2 100644
--- a/backend/src/services/app-connection/ssh/ssh-connection-fns.ts
+++ b/backend/src/services/app-connection/ssh/ssh-connection-fns.ts
@@ -203,9 +203,7 @@ export const executeWithPotentialGateway = async <T>(
},
{
protocol: GatewayProxyProtocol.Tcp,
- relayHost: platformConnectionDetails.relayHost,
- gateway: platformConnectionDetails.gateway,
- relay: platformConnectionDetails.relay
+ ...platformConnectionDetails
}
);
}
@@ -313,9 +311,7 @@ export const executeSshCommandViaGateway = async (
}),
{
protocol: GatewayProxyProtocol.Discovery,
- relayHost: connectionDetails.relayHost,
- gateway: connectionDetails.gateway,
- relay: connectionDetails.relay
+ ...connectionDetails
}
);
diff --git a/backend/src/services/app-connection/venafi-tpp/venafi-tpp-connection-fns.ts b/backend/src/services/app-connection/venafi-tpp/venafi-tpp-connection-fns.ts
index 2ffdfef1b7..e56b9d1916 100644
--- a/backend/src/services/app-connection/venafi-tpp/venafi-tpp-connection-fns.ts
+++ b/backend/src/services/app-connection/venafi-tpp/venafi-tpp-connection-fns.ts
@@ -106,9 +106,7 @@ export const requestWithVenafiTppGateway = async <T>(
},
{
protocol: GatewayProxyProtocol.Tcp,
- relayHost: gatewayConnectionDetails.relayHost,
- gateway: gatewayConnectionDetails.gateway,
- relay: gatewayConnectionDetails.relay
+ ...gatewayConnectionDetails
}
);
};
diff --git a/backend/src/services/app-connection/winrm/winrm-connection-fns.ts b/backend/src/services/app-connection/winrm/winrm-connection-fns.ts
index 16e4de63fe..4cd5046c78 100644
--- a/backend/src/services/app-connection/winrm/winrm-connection-fns.ts
+++ b/backend/src/services/app-connection/winrm/winrm-connection-fns.ts
@@ -100,9 +100,7 @@ export const executeWinRMGatewayOperation = async <T>(
}),
{
protocol: GatewayProxyProtocol.WinRm,
- relayHost: connectionDetails.relayHost,
- gateway: connectionDetails.gateway,
- relay: connectionDetails.relay
+ ...connectionDetails
}
);
diff --git a/backend/src/services/external-migration/external-migration-fns/vault.ts b/backend/src/services/external-migration/external-migration-fns/vault.ts
index fe3d33357e..c5f6bdc464 100644
--- a/backend/src/services/external-migration/external-migration-fns/vault.ts
+++ b/backend/src/services/external-migration/external-migration-fns/vault.ts
@@ -49,9 +49,7 @@ const vaultFactory = (
async (port) => gatewayCallback(`${targetProtocol}://localhost`, port, httpsAgent, targetHostname),
{
protocol: GatewayProxyProtocol.Tcp,
- relayHost: gatewayV2Details.relayHost,
- gateway: gatewayV2Details.gateway,
- relay: gatewayV2Details.relay
+ ...gatewayV2Details
}
);
}
diff --git a/backend/src/services/hsm-connector/hsm-connector-routing.ts b/backend/src/services/hsm-connector/hsm-connector-routing.ts
index 2784924143..4b47ae4118 100644
--- a/backend/src/services/hsm-connector/hsm-connector-routing.ts
+++ b/backend/src/services/hsm-connector/hsm-connector-routing.ts
@@ -96,12 +96,7 @@ export const hsmConnectorRoutingFactory = ({ gatewayV2Service, gatewayPoolServic
params: args.params
}
}),
- {
- protocol: GatewayProxyProtocol.Pkcs11,
- relayHost: conn.relayHost,
- gateway: conn.gateway,
- relay: conn.relay
- }
+ { ...conn, protocol: GatewayProxyProtocol.Pkcs11 }
);
if (response.ok) return response.result;
lastError = { code: response.errorCode, message: response.errorMessage };
@@ -161,12 +156,7 @@ export const hsmConnectorRoutingFactory = ({ gatewayV2Service, gatewayPoolServic
params: {}
}
}),
- {
- protocol: GatewayProxyProtocol.Pkcs11,
- relayHost: conn.relayHost,
- gateway: conn.gateway,
- relay: conn.relay
- }
+ { ...conn, protocol: GatewayProxyProtocol.Pkcs11 }
);
if (response.ok) {
return { gatewayId, ok: true, slotInfo: response.result.slotInfo };
diff --git a/backend/src/services/identity-kubernetes-auth/identity-kubernetes-auth-service.ts b/backend/src/services/identity-kubernetes-auth/identity-kubernetes-auth-service.ts
index 5a44f65a04..122389c673 100644
--- a/backend/src/services/identity-kubernetes-auth/identity-kubernetes-auth-service.ts
+++ b/backend/src/services/identity-kubernetes-auth/identity-kubernetes-auth-service.ts
@@ -177,10 +177,8 @@ export const identityKubernetesAuthServiceFactory = ({
return res;
},
{
+ ...gatewayV2ConnectionDetails,
protocol: inputs.reviewTokenThroughGateway ? GatewayProxyProtocol.Http : GatewayProxyProtocol.Tcp,
- relayHost: gatewayV2ConnectionDetails.relayHost,
- gateway: gatewayV2ConnectionDetails.gateway,
- relay: gatewayV2ConnectionDetails.relay,
httpsAgent
}
);