Repository navigation
feat(cognito): support SecretValue for OIDC identity provider client secret - #39564
Open
Tharaka-Chathuranga wants to merge 1 commit into
Open
Tharaka-Chathuranga wants to merge 1 commit into
Tharaka-Chathuranga wants to merge 1 commit into
Conversation
…secret UserPoolIdentityProviderOidc only took the client secret as a plain string, so it always ended up in the synthesized template. Add a clientSecretValue prop that accepts a SecretValue (for example a Secrets Manager secret) and deprecate clientSecret, the same way it was done for the Google provider. Closes aws#29851
Tharaka-Chathuranga
had a problem deploying
to
automation
October 29, 2026 23:26 — with
GitHub Actions
Failure
This branch was successfully deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Issue # (if applicable)
Closes #29851.
Reason for this change
UserPoolIdentityProviderOidconly accepts the client secret as a plainstring, so there's no way to pass it in as aSecretValue(e.g. from Secrets Manager) like you can with the Google and Apple providers.Description of changes
clientSecretValue?: SecretValuetoUserPoolIdentityProviderOidcProps.clientSecretoptional and deprecated it in favour ofclientSecretValue. Existing code that passesclientSecretkeeps working and produces the same template.clientSecret/clientSecretValuehas to be set, otherwise aValidationErroris thrown. I reused theExactlyOneClientSecretClienterror code from the Google provider since it's the same problem.This follows the same approach as #22885 (Google) and #31409 (Apple). Two small differences from those:
=== undefinedinstead of truthiness so token values aren't treated as missing.Describe any new or updated permissions being added
None.
Description of how you validated changes
clientSecretValue(Secrets Manager reference ends up inProviderDetails.client_secret), for setting both props, and for setting neither. Moved the existing tests over toclientSecretValueand kept atestDeprecatedtest for the oldclientSecretprop.integ.user-pool-idp.oidcthat reads its client secret from aSecretcreated in the stack. The existing provider's resources are unchanged. Snapshot was updated with--dry-run, I haven't deployed it.Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license