Skip to content

Commit 9504297

Browse files
committed
remove setSecret
1 parent cf28a72 commit 9504297

1 file changed

Lines changed: 4 additions & 12 deletions

File tree

packages/constructs/entra-id-application/src/lambdas/key-rotation.ts

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ export const onEvent = async (event: SecretsManagerRotationEvent) => {
4141
case 'createSecret':
4242
return createSecret(client, SecretId, ClientRequestToken)
4343
case 'setSecret':
44-
return setSecret(client, SecretId, ClientRequestToken)
44+
// not needed
45+
return
4546
case 'testSecret':
4647
return testSecret(client, SecretId, ClientRequestToken)
4748
case 'finishSecret':
@@ -127,17 +128,6 @@ export const getNewSecretString = async (client: SecretsManagerClient, secretId:
127128
return JSON.stringify(newObj)
128129
}
129130

130-
const setSecret = async (client: SecretsManagerClient, secretId: string, token: string) => {
131-
await client.send(
132-
new PutSecretValueCommand({
133-
SecretId: secretId,
134-
ClientRequestToken: token,
135-
SecretString: await getNewSecretString(client, secretId),
136-
VersionStages: ['AWSPENDING'],
137-
}),
138-
)
139-
}
140-
141131
const testSecret = async (client: SecretsManagerClient, secretId: string, token: string) => {
142132
// test the pending secret version
143133
const version = await client.send(
@@ -154,6 +144,8 @@ const testSecret = async (client: SecretsManagerClient, secretId: string, token:
154144
if (!appId) {
155145
throw new Error('secret is missing appId')
156146
}
147+
// If we had a tenant we knew had the app installed we could test the token
148+
// but at time of writing you can't programmatically install an app so we can't be sure of that
157149
}
158150

159151
const finishSecret = async (client: SecretsManagerClient, secretId: string, token: string) => {

0 commit comments

Comments
 (0)