mirror of
https://github.com/floci-io/floci.git
synced 2026-11-23 22:11:36 -05:00
fix(cognito): default ExplicitAuthFlows to refresh, SRP and custom auth (#4081)
A user pool client created without ExplicitAuthFlows was treated as allowing every auth flow, where AWS defaults such a client to ALLOW_REFRESH_TOKEN_AUTH, ALLOW_USER_SRP_AUTH and ALLOW_CUSTOM_AUTH. USER_PASSWORD_AUTH against a no-list client succeeded on Floci and is refused on AWS. Apply that default at auth time, in the existing gate added by #3974. CreateUserPoolClient, UpdateUserPoolClient and DescribeUserPoolClient keep storing and returning exactly what was normalized, empty when unset, matching AWS: Terraform's Cognito acceptance tests confirm the empty read-back for both an omitted list and an explicit empty one, and materialising the default into storage would fail Terraform apply with an inconsistent-result error. Tests and compatibility fixtures that created a no-list client and then signed in with a flow outside the default now enable that flow on their client.
This commit is contained in:
1 parent
eca5a1bb14
commit
06007deea8
13 files changed
+219
-103
No files matched your search
+4
@@ -171,6 +171,10 @@ class CognitoFeaturesTest {
|
||||
assertThat(client.refreshTokenRotation())
|
||||
.as("refreshTokenRotation must be null when not set")
|
||||
.isNull();
|
||||
assertThat(client.explicitAuthFlows())
|
||||
.as("ExplicitAuthFlows must be empty when not set, matching AWS; the default"
|
||||
+ " (refresh, SRP and custom auth) is enforced at auth time, not stored")
|
||||
.isEmpty();
|
||||
}
|
||||
|
||||
// ── Issue #229 — InitiateAuth rejects when no password hash is set ────────
|
||||
|
||||
Reference in new issue
Block a user