mirror of
https://github.com/floci-io/floci.git
synced 2026-11-22 21:50:46 -05:00
chore(cognito): drop the em-dashes this branch introduced
AGENTS.md asks for none in any content. Seven had leaked into the MFA prose: the docs table row, two service comments, the handler javadoc and two in the test class. Replaced with colons and commas, no wording change beyond the punctuation. Pre-existing em-dashes elsewhere in these files are left alone.
This commit is contained in:
1 parent
63086a30f5
commit
d7a0ad1068
4 files changed
+6
-6
No files matched your search
@@ -29,7 +29,7 @@ Standalone `TagResource` rejects reserved `floci:*` keys. `ListTagsForResource`
|
||||
| UpdateUserPool | Updates mutable user pool settings and persisted user-pool tags. |
|
||||
| DeleteUserPool | Deletes a local user pool and its related state. |
|
||||
| GetUserPoolMfaConfig | Returns the pool's MFA mode and, once configured, its software-token setting. |
|
||||
| SetUserPoolMfaConfig | Sets `MfaConfiguration` (`OFF`/`ON`/`OPTIONAL`) and `SoftwareTokenMfaConfiguration`. An absent `MfaConfiguration` means `OFF`, and turning MFA off drops the factor configuration with it. Validation follows the live service: `OFF` alongside a software-token, email or SMS factor is rejected, and `ON`/`OPTIONAL` with none of those three is rejected — in both cases on the member being present, not on its `Enabled` value. `WebAuthnConfiguration` sits outside both rules, as it does in AWS. SMS, email and WebAuthn configurations are validated and not stored — Floci cannot deliver those factors, so keeping the config would imply a capability it does not have. |
|
||||
| SetUserPoolMfaConfig | Sets `MfaConfiguration` (`OFF`/`ON`/`OPTIONAL`) and `SoftwareTokenMfaConfiguration`. An absent `MfaConfiguration` means `OFF`, and turning MFA off drops the factor configuration with it. Validation follows the live service: `OFF` alongside a software-token, email or SMS factor is rejected, and `ON`/`OPTIONAL` with none of those three is rejected, in both cases on the member being present, not on its `Enabled` value. `WebAuthnConfiguration` sits outside both rules, as it does in AWS. SMS, email and WebAuthn configurations are validated and not stored: Floci cannot deliver those factors, so keeping the config would imply a capability it does not have. |
|
||||
|
||||
### User Pool Tags
|
||||
|
||||
|
||||
@@ -197,7 +197,7 @@ public class CognitoJsonHandler {
|
||||
|
||||
/**
|
||||
* Shared by Get and Set, which answer with the same members. SoftwareTokenMfaConfiguration
|
||||
* is omitted while unset, matching the live service — it returns only the factors that
|
||||
* is omitted while unset, matching the live service, which returns only the factors that
|
||||
* have been configured.
|
||||
*/
|
||||
private ObjectNode buildMfaConfigResponse(UserPool pool) {
|
||||
|
||||
@@ -353,7 +353,7 @@ public class CognitoService implements ResourceProvider {
|
||||
}
|
||||
// Presence, not value: the live service rejects OFF alongside
|
||||
// SoftwareTokenMfaConfiguration{Enabled:false} just as it does Enabled:true, and
|
||||
// conversely accepts ON alongside Enabled:false — so the member being there is what
|
||||
// conversely accepts ON alongside Enabled:false, so the member being there is what
|
||||
// counts, despite the "must be enabled" wording of the second message.
|
||||
boolean anyFactorConfigured = softwareTokenMfaEnabled != null || otherFactorConfigured;
|
||||
if ("OFF".equals(mode) && anyFactorConfigured) {
|
||||
@@ -368,7 +368,7 @@ public class CognitoService implements ResourceProvider {
|
||||
}
|
||||
pool.setMfaConfiguration(mode);
|
||||
if ("OFF".equals(mode)) {
|
||||
// Turning MFA off drops the factor configuration with it — the live service
|
||||
// Turning MFA off drops the factor configuration with it: the live service
|
||||
// answers OFF alone afterwards, with no SoftwareTokenMfaConfiguration member.
|
||||
pool.setSoftwareTokenMfaEnabled(null);
|
||||
} else if (softwareTokenMfaEnabled != null) {
|
||||
|
||||
+2
-2
@@ -18,7 +18,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
* SetUserPoolMfaConfig, and the round trip through GetUserPoolMfaConfig.
|
||||
*
|
||||
* <p>The response shape was measured against the live service, which returns only the
|
||||
* factors that have been configured — a pool with software-token MFA answers
|
||||
* factors that have been configured: a pool with software-token MFA answers
|
||||
* {@code {"SoftwareTokenMfaConfiguration":{"Enabled":true},"MfaConfiguration":"OPTIONAL"}}
|
||||
* and omits the SMS, email and WebAuthn members entirely.
|
||||
*/
|
||||
@@ -174,7 +174,7 @@ class CognitoSetUserPoolMfaConfigIntegrationTest {
|
||||
@Order(10)
|
||||
void webAuthnIsOutsideTheFactorRulesInBothDirections() throws Exception {
|
||||
// Measured: WebAuthnConfiguration is accepted alongside OFF, where every other
|
||||
// factor is rejected, and it does not satisfy the "must be enabled" rule either —
|
||||
// factor is rejected, and it does not satisfy the "must be enabled" rule either:
|
||||
// OPTIONAL with WebAuthn alone is refused.
|
||||
JsonNode off = cognitoJson("SetUserPoolMfaConfig", """
|
||||
{"UserPoolId":"%s","MfaConfiguration":"OFF",
|
||||
|
||||
Reference in new issue
Block a user