feat(cognito): implement remaining 20 operations for 100% conformance#306
Merged
vieiralucas merged 1 commit intomainfrom Apr 12, 2026
Merged
feat(cognito): implement remaining 20 operations for 100% conformance#306vieiralucas merged 1 commit intomainfrom
vieiralucas merged 1 commit intomainfrom
Conversation
UI Customization & Configuration: - GetUICustomization / SetUICustomization: hosted UI CSS/logo - GetLogDeliveryConfiguration / SetLogDeliveryConfiguration: logging config - DescribeRiskConfiguration / SetRiskConfiguration: advanced security Managed Login Branding: - CreateManagedLoginBranding / DeleteManagedLoginBranding - DescribeManagedLoginBranding / DescribeManagedLoginBrandingByClient - UpdateManagedLoginBranding Terms of Service: - CreateTerms / DeleteTerms / DescribeTerms / ListTerms / UpdateTerms WebAuthn: - StartWebAuthnRegistration / CompleteWebAuthnRegistration - DeleteWebAuthnCredential / ListWebAuthnCredentials Cognito conformance: 122/122 operations (100%), 4479/4479 variants (100%).
There was a problem hiding this comment.
3 issues found across 5 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="crates/fakecloud-cognito/src/service/config.rs">
<violation number="1" location="crates/fakecloud-cognito/src/service/config.rs:100">
P2: Normalize pool-level `ClientId` (`"ALL"`) before storing UI customizations; otherwise writes and reads use different keys and default `GetUICustomization` can miss updates.</violation>
</file>
<file name="crates/fakecloud-cognito/src/service/branding.rs">
<violation number="1" location="crates/fakecloud-cognito/src/service/branding.rs:33">
P2: Validate that the provided ClientId belongs to UserPoolId before creating branding; currently cross-pool client IDs are accepted.</violation>
<violation number="2" location="crates/fakecloud-cognito/src/service/branding.rs:570">
P2: Do not generate a random CredentialId when `Credential.id` is missing; reject the request as invalid.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| customization["ImageFile"] = json!(img); | ||
| } | ||
|
|
||
| state.ui_customizations.insert(key, customization.clone()); |
There was a problem hiding this comment.
P2: Normalize pool-level ClientId ("ALL") before storing UI customizations; otherwise writes and reads use different keys and default GetUICustomization can miss updates.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At crates/fakecloud-cognito/src/service/config.rs, line 100:
<comment>Normalize pool-level `ClientId` (`"ALL"`) before storing UI customizations; otherwise writes and reads use different keys and default `GetUICustomization` can miss updates.</comment>
<file context>
@@ -0,0 +1,269 @@
+ customization["ImageFile"] = json!(img);
+ }
+
+ state.ui_customizations.insert(key, customization.clone());
+
+ Ok(AwsResponse::ok_json(json!({
</file context>
Comment on lines
+570
to
+573
| let credential_id = credential["id"] | ||
| .as_str() | ||
| .unwrap_or(&Uuid::new_v4().to_string()) | ||
| .to_string(); |
There was a problem hiding this comment.
P2: Do not generate a random CredentialId when Credential.id is missing; reject the request as invalid.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At crates/fakecloud-cognito/src/service/branding.rs, line 570:
<comment>Do not generate a random CredentialId when `Credential.id` is missing; reject the request as invalid.</comment>
<file context>
@@ -0,0 +1,726 @@
+ ));
+ }
+
+ let credential_id = credential["id"]
+ .as_str()
+ .unwrap_or(&Uuid::new_v4().to_string())
</file context>
Suggested change
| let credential_id = credential["id"] | |
| .as_str() | |
| .unwrap_or(&Uuid::new_v4().to_string()) | |
| .to_string(); | |
| let credential_id = credential["id"].as_str().ok_or_else(|| { | |
| AwsServiceError::aws_error( | |
| StatusCode::BAD_REQUEST, | |
| "InvalidParameterException", | |
| "Credential.id is required", | |
| ) | |
| })? | |
| .to_string(); |
| )); | ||
| } | ||
|
|
||
| if !state.user_pool_clients.contains_key(client_id) { |
There was a problem hiding this comment.
P2: Validate that the provided ClientId belongs to UserPoolId before creating branding; currently cross-pool client IDs are accepted.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At crates/fakecloud-cognito/src/service/branding.rs, line 33:
<comment>Validate that the provided ClientId belongs to UserPoolId before creating branding; currently cross-pool client IDs are accepted.</comment>
<file context>
@@ -0,0 +1,726 @@
+ ));
+ }
+
+ if !state.user_pool_clients.contains_key(client_id) {
+ return Err(AwsServiceError::aws_error(
+ StatusCode::BAD_REQUEST,
</file context>
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
Implements all remaining Cognito User Pools operations to achieve 100% conformance:
Cognito conformance: 122/122 operations (100%), 4479/4479 variants (100%)
Test plan
Summary by cubic
Implements the remaining Cognito User Pools operations in
fakecloud-cognito, completing feature coverage. Conformance is now 122/122 operations and 4479/4479 variants (100%).Written for commit 986ba68. Summary will update on new commits.