Repository navigation
Conversation
CreateUserPoolClient takes a caller-chosen ClientSecret (ClientSecretType: 24-64 characters of [\w+]) and makes it the client's secret, so the token endpoint and SECRET_HASH checks use it. It is rejected together with GenerateSecret=true, and a value outside the type fails with InvalidParameterException without echoing the sensitive value.
This branch has not been 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.
Summary
Closes #2750.
CreateUserPoolClienttakes a caller-chosenClientSecretand makes it the app client's secret, soDescribeUserPoolClient, the/oauth2/tokenclient authentication andSECRET_HASHchecks all use it. WithoutClientSecretnothing changes.ClientSecretType(24-64 characters matching[\w+]+); a value outside it fails withInvalidParameterExceptionand the standard1 validation error detectedmessage, which leaves the value out because the member is@sensitive.ClientSecrettogether withGenerateSecret: truefails withInvalidParameterException, as the API reference says.docs/services/cognito.md.Not changed here:
AWS::Cognito::UserPoolClienthas noClientSecretproperty ("you can't specify a secret value"), so the provisioner stays as it is.AddUserPoolClientSecretand friends) keep their current behaviour; they are a separate feature./_fakecloudendpoint.Usage, together with the fixed ids from #2703:
aws cognito-idp create-user-pool --pool-name local --user-pool-tags _custom_id_=us-east-1_Local aws cognito-idp create-user-pool-client --user-pool-id us-east-1_Local \ --client-name _custom_id_:localclient --client-secret local_dev_client_secret_0123456789Test plan
fakecloud-cognito, 430 pass): the custom secret is returned and stored as the client's secret; too short, too long, outside the pattern and withGenerateSecret: trueare rejected withInvalidParameterExceptionwithout the value in the message; the 24 and 64 character bounds are accepted.cognito_create_user_pool_client_with_custom_secret(aws-sdk-rust): create withclient_secret,DescribeUserPoolClientreturns it, aclient_credentialsgrant at/oauth2/tokenauthenticates with it, andGenerateSecret+ClientSecretand a short secret fail withInvalidParameterException.cognito,cognito_persistenceandcognito_authorizee2e pass; conformancerun --services cognito-idp4812/4812;cargo fmt --all --checkandcargo clippy -p fakecloud-cognito -p fakecloud-e2e --all-targets -- -D warningsclean.Summary by cubic
Lets
CreateUserPoolClienttake a caller-chosenClientSecretand make it the app client's secret, soDescribeUserPoolClient,/oauth2/tokenclient authentication, andSECRET_HASHchecks all use it. WithoutClientSecret, nothing changes. Closes #2750.[\w+]+; anything else fails withInvalidParameterExceptionwithout echoing the value, since the member is sensitive.ClientSecrettogether withGenerateSecret: trueis rejected withInvalidParameterException, per the API reference.Written for commit 0b380dc. Summary will update on new commits.