Context
Follow-up to #628, #640, and the Binding V2 rollout. External login needs explicit ownership for profile fields and a provider-scoped provisioning decision instead of overwriting local/admin-maintained data.
Authoritative design: docs/21-unified-identity-federation-design.md, PR 3.
Scope
- Persist profile field source and assurance metadata.
- Add
AUTO, APPROVAL, and EXISTING_BINDING_ONLY provisioning modes.
- Add per-field synchronization policies.
- Return a non-enumerating
LINK_REQUIRED reason on verified-email collision without auto-binding.
- Keep PENDING approval idempotent and add
@global membership on approval.
- Add audit records and bounded-cardinality login metrics.
Acceptance
- User/admin-maintained profile values are not overwritten by default.
- PENDING approve/reject/repeat-login behavior is transactional and deterministic.
- Email collision creates neither an account nor a binding and returns no account identifier or link token.
- Transaction failure leaves no orphan account, binding, subject, or profile source.
- Real PostgreSQL integration tests and full backend regression pass.
- Validate through
big-main; do not merge directly to main.
Context
Follow-up to #628, #640, and the Binding V2 rollout. External login needs explicit ownership for profile fields and a provider-scoped provisioning decision instead of overwriting local/admin-maintained data.
Authoritative design:
docs/21-unified-identity-federation-design.md, PR 3.Scope
AUTO,APPROVAL, andEXISTING_BINDING_ONLYprovisioning modes.LINK_REQUIREDreason on verified-email collision without auto-binding.@globalmembership on approval.Acceptance
big-main; do not merge directly tomain.