Skip to content

Commit 81f327f

Browse files
Fix: [AEA-6028] - Switched deployApi to accept resolved values for client cert / key (#530)
## Summary - Routine Change
1 parent 9df6249 commit 81f327f

2 files changed

Lines changed: 10 additions & 14 deletions

File tree

packages/deploymentUtils/src/specifications/deployApi.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ export type ApiConfig = {
1313
awsEnvironment: string
1414
stackName: string
1515
mtlsSecretName: string
16-
clientCertExportName: string
17-
clientPrivateKeyExportName: string
16+
clientCert: string
17+
clientPrivateKey: string
1818
proxygenPrivateKeyExportName: string
1919
proxygenKid: string
2020
hiddenPaths: Array<string>
@@ -30,8 +30,8 @@ export async function deployApi(
3030
awsEnvironment,
3131
stackName,
3232
mtlsSecretName,
33-
clientCertExportName,
34-
clientPrivateKeyExportName,
33+
clientCert,
34+
clientPrivateKey,
3535
proxygenPrivateKeyExportName,
3636
proxygenKid,
3737
hiddenPaths
@@ -53,8 +53,6 @@ export async function deployApi(
5353
})
5454

5555
const exports = await getCloudFormationExports()
56-
const clientCertArn = getCFConfigValue(exports, `account-resources:${clientCertExportName}`)
57-
const clientPrivateKeyArn = getCFConfigValue(exports, `account-resources:${clientPrivateKeyExportName}`)
5856
const proxygenPrivateKeyArn = getCFConfigValue(exports, `account-resources:${proxygenPrivateKeyExportName}`)
5957

6058
let put_secret_lambda = "lambda-resources-ProxygenPTLMTLSSecretPut"
@@ -76,8 +74,8 @@ export async function deployApi(
7674
apiName,
7775
environment: apigeeEnvironment,
7876
secretName: mtlsSecretName,
79-
secretKeyName: clientPrivateKeyArn,
80-
secretCertName: clientCertArn,
77+
secretKey: clientPrivateKey,
78+
secretCert: clientCert,
8179
kid: proxygenKid,
8280
proxygenSecretName: proxygenPrivateKeyArn
8381
}

packages/deploymentUtils/tests/specifications/deployApi.test.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@ function createSpec(overrides: SpecOverrides = {}) {
6565
}
6666

6767
const defaultExportsMap = {
68-
"account-resources:clientCert": "arn:client-cert",
69-
"account-resources:clientKey": "arn:client-key",
7068
"account-resources:proxygenKey": "arn:proxygen-key"
7169
}
7270

@@ -80,8 +78,8 @@ function buildConfig(overrides: Partial<ApiConfig> = {}): ApiConfig {
8078
awsEnvironment: "nonprod",
8179
stackName: "eps-stack-001",
8280
mtlsSecretName: "mtls/secret",
83-
clientCertExportName: "clientCert",
84-
clientPrivateKeyExportName: "clientKey",
81+
clientCert: "clientCert",
82+
clientPrivateKey: "clientKey",
8583
proxygenPrivateKeyExportName: "proxygenKey",
8684
proxygenKid: "kid-123",
8785
hiddenPaths: [],
@@ -125,8 +123,8 @@ describe("deployApi", () => {
125123
apiName: "eps",
126124
environment: "internal-dev",
127125
secretName: "mtls/secret",
128-
secretKeyName: "arn:client-key",
129-
secretCertName: "arn:client-cert",
126+
secretKey: "clientKey",
127+
secretCert: "clientCert",
130128
kid: "kid-123",
131129
proxygenSecretName: "arn:proxygen-key"
132130
})

0 commit comments

Comments
 (0)