mirror of
https://github.com/floci-io/floci.git
synced 2026-11-23 22:11:36 -05:00
feat(cognito): enforce app client ExplicitAuthFlows in InitiateAuth and AdminInitiateAuth (#3974)
ExplicitAuthFlows was stored but never checked, so a client that only allowed SRP still accepted USER_PASSWORD_AUTH. When a client lists flows, reject any flow it does not enable with InvalidParameterException. Legacy values (USER_PASSWORD_AUTH, ADMIN_NO_SRP_AUTH, CUSTOM_AUTH_FLOW_ONLY) are honored, and clients created without a list stay ungated. The Java compatibility test signed in with ADMIN_USER_PASSWORD_AUTH on a client that never enabled it; add ALLOW_ADMIN_USER_PASSWORD_AUTH to that client.
This commit is contained in:
1 parent
e14221fe62
commit
a12bf8c96c
4 files changed
+199
-11
No files matched your search
+1
@@ -122,6 +122,7 @@ class CognitoFeaturesTest {
|
||||
.clientName("compat-test-client")
|
||||
.explicitAuthFlows(
|
||||
ExplicitAuthFlowsType.ALLOW_USER_PASSWORD_AUTH,
|
||||
ExplicitAuthFlowsType.ALLOW_ADMIN_USER_PASSWORD_AUTH,
|
||||
ExplicitAuthFlowsType.ALLOW_REFRESH_TOKEN_AUTH));
|
||||
clientId = resp.userPoolClient().clientId();
|
||||
assertThat(clientId).isNotBlank();
|
||||
|
||||
Reference in new issue
Block a user