revert: "chore(cognito): drop the em-dashes this branch introduced"

This reverts commit d7a0ad10. The rule it cited does not exist: AGENTS.md
says nothing about em-dashes, and the repo uses them throughout, including
in CONTRIBUTING.md's own commit-type table and in the pull request template.
I asserted a house style that is not the house style, so the prose goes back
to how it read when you reviewed it.

Nothing in this PR's behaviour was affected either way. The @Order fix in
63086a30 is unrelated and stands.
This commit is contained in:
Brian Taylor committed 2026-09-02 16:20:35 +00:00
1 parent d7a0ad1068
commit b4a283e301
4 files changed
+6 -6

No files matched your search

+1 -1
View File
@@ -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, which returns only the factors that
* is omitted while unset, matching the live service — it 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) {
@@ -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",