diff --git a/packages/deploymentUtils/src/specifications/deployApi.ts b/packages/deploymentUtils/src/specifications/deployApi.ts index 8a0d69ca..f36393bb 100644 --- a/packages/deploymentUtils/src/specifications/deployApi.ts +++ b/packages/deploymentUtils/src/specifications/deployApi.ts @@ -13,8 +13,8 @@ export type ApiConfig = { awsEnvironment: string stackName: string mtlsSecretName: string - clientCertExportName: string - clientPrivateKeyExportName: string + clientCert: string + clientPrivateKey: string proxygenPrivateKeyExportName: string proxygenKid: string hiddenPaths: Array @@ -30,8 +30,8 @@ export async function deployApi( awsEnvironment, stackName, mtlsSecretName, - clientCertExportName, - clientPrivateKeyExportName, + clientCert, + clientPrivateKey, proxygenPrivateKeyExportName, proxygenKid, hiddenPaths @@ -53,8 +53,6 @@ export async function deployApi( }) const exports = await getCloudFormationExports() - const clientCertArn = getCFConfigValue(exports, `account-resources:${clientCertExportName}`) - const clientPrivateKeyArn = getCFConfigValue(exports, `account-resources:${clientPrivateKeyExportName}`) const proxygenPrivateKeyArn = getCFConfigValue(exports, `account-resources:${proxygenPrivateKeyExportName}`) let put_secret_lambda = "lambda-resources-ProxygenPTLMTLSSecretPut" @@ -76,8 +74,8 @@ export async function deployApi( apiName, environment: apigeeEnvironment, secretName: mtlsSecretName, - secretKeyName: clientPrivateKeyArn, - secretCertName: clientCertArn, + secretKey: clientPrivateKey, + secretCert: clientCert, kid: proxygenKid, proxygenSecretName: proxygenPrivateKeyArn } diff --git a/packages/deploymentUtils/tests/specifications/deployApi.test.ts b/packages/deploymentUtils/tests/specifications/deployApi.test.ts index d4ddc1a6..5d981396 100644 --- a/packages/deploymentUtils/tests/specifications/deployApi.test.ts +++ b/packages/deploymentUtils/tests/specifications/deployApi.test.ts @@ -65,8 +65,6 @@ function createSpec(overrides: SpecOverrides = {}) { } const defaultExportsMap = { - "account-resources:clientCert": "arn:client-cert", - "account-resources:clientKey": "arn:client-key", "account-resources:proxygenKey": "arn:proxygen-key" } @@ -80,8 +78,8 @@ function buildConfig(overrides: Partial = {}): ApiConfig { awsEnvironment: "nonprod", stackName: "eps-stack-001", mtlsSecretName: "mtls/secret", - clientCertExportName: "clientCert", - clientPrivateKeyExportName: "clientKey", + clientCert: "clientCert", + clientPrivateKey: "clientKey", proxygenPrivateKeyExportName: "proxygenKey", proxygenKid: "kid-123", hiddenPaths: [], @@ -125,8 +123,8 @@ describe("deployApi", () => { apiName: "eps", environment: "internal-dev", secretName: "mtls/secret", - secretKeyName: "arn:client-key", - secretCertName: "arn:client-cert", + secretKey: "clientKey", + secretCert: "clientCert", kid: "kid-123", proxygenSecretName: "arn:proxygen-key" })