GeezerVison is showing github.com — Complete the focused identity email-address mutation boundary · Issue #797 · OpenResilienceInitiative/ORISO-UserService
Complete the focused identity email-address mutation boundary #797DescriptionParent: #335
Why
Account email changes still cross the broad IdentityClient even though email ownership and second-factor behavior already have focused boundaries. The broad client mixes the current-account email mutation, verified-email completion and unrelated provisioning/role/session commands. It also exposes the adapter-internal updateEmail helper as an application port method although no application consumer calls it.
What to build
- Introduce one provider-neutral output port for account email-address mutations.
- Route current-account email changes and deletion through that focused port.
- Route the post-verification username/email update through the same focused port.
- Remove both
changeEmailAddress overloads, deleteEmailAddress and adapter-internal updateEmail from IdentityClient.
- Keep Keycloak validation, authenticated-user resolution, lowercase normalization and dummy-email persistence inside the Keycloak adapter.
- Add executable boundary and interaction contracts for the focused consumers.
- Reconcile all Spring test contexts and test doubles with the new boundary.
Acceptance
-
IdentityManager and UserAccountService depend on the focused email-mutation port for these writes.
-
IdentityClient exposes no email-address mutation methods.
- A changed current-account set/delete operation makes exactly one Keycloak user update.
- An unchanged current-account email stops after one representation read with no availability search or update.
- A completed email verification makes exactly one username lookup and at most one Keycloak user update.
- Unchanged verified email remains a no-op after the single username lookup.
- Focused and complete Java 21 unit/integration/CI-contract suites remain green with zero quarantine.
- Stability documentation records the completed boundary and its exact call bounds.
Current implementation
Ready-for-review direct PR #885, commit 35a90786, based on current pre-dev commit be15d12f.
- Local Java 21: 3,428 unit tests and 850 integration tests green; 9 conditional environment skips.
- Contracts: 51 architecture/CI tests plus 8 OpenAPI tests green.
- Spotless, package build and diff check are green.
- All 11 GitHub Actions checks are green; CodeRabbit reports that automatic reviews are disabled for the
pre-dev base branch; this is not a content approval.
- PR is clean and mergeable; review requested from shazia-k, Hassan9215 and shanzaeimran.
- Local database reset was not required.
- Nothing is merged, deployed or runtime-verified on PreDev.
- Obsolete stacked PR [Stability] Focus identity email address mutations #798 is closed and superseded by the direct replay.
This remains modular-monolith boundary cleanup, not a microservice extraction. The architecture target is Matrix-only chat through the ORISO-owned frontend, an ORISO-controlled Element Call/MatrixRTC fork and LiveKit. Rocket.Chat and Jitsi are complete removal targets, never fallbacks. Activitycoderabbitai commented on Jul 27, 2026
🔗 Related PRs
#389 - fix: finalize persisted consultant agency relation [merged]
#420 - fix: create anonymous live chat in Matrix-only mode [merged]
#439 - feat(auth): self-service password reset (mirrors Magic Link) [merged]
#508 - Fix own-email rejection during consultant 2FA setup [merged]
#728 - Fix email 2FA completion for encoded Admin usernames [merged]
📝 Issue Planner
Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.
🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your .coderabbit.yaml:
issue_enrichment:
auto_enrich:
enabled: false
💬 Have feedback or questions? Drop into our discord! Storypapst commented on Aug 13, 2026 CollaboratorAuthor More actions Release classification: assigned to v2.0.3 because the implementing PR #885 is contained in the v2.0.3 release tag.
Storypapst commented on Aug 24, 2026 CollaboratorAuthor More actions Verified as delivered: PR #885 (merged into pre-dev on 2026-08-07, explicitly closing #797) introduces the focused IdentityEmailAddressUpdater output port, removes email-mutation methods from the broad IdentityClient, and satisfies every measured call-bound acceptance criterion — a single Keycloak update on a changed email, a no-op after one read on an unchanged email, and at most one update after a single username lookup on email verification — verified by 3,428 unit tests, 850 integration tests, 51 architecture/CI contracts and 8 OpenAPI contract tests, all green.
Moving to QA external Dev for external review. cc @BjoernLudwig
MetadataMetadataStatusShow more project fields
DevelopmentNo branches or pull requestsIssue actions
|