Skip to content

feat(auth): build a unified identity federation architecture #628

Description

@XiaoSeS

What to build

Introduce a staged identity federation architecture that keeps protocol verification in provider adapters while centralizing trusted-provider resolution, authority pinning, subject resolution, access/provisioning policy, identity binding, account-state guards, profile synchronization, principal construction, audit, and session creation in SkillHub.

The formal design is tracked in docs/21-unified-identity-federation-design.md and will be reviewed separately before the core migration is merged.

Acceptance criteria

  • Existing GitHub, GitLab, OIDC, local password, Device Flow, and API token behavior remains compatible.
  • Every external provider returns protocol facts only and cannot directly create accounts, roles, principals, or sessions.
  • Provider code is pinned to a normalized authority and mismatches fail closed.
  • External subjects are typed; aliases, conflicts, and concurrent first login have explicit rules.
  • Email is not used for implicit account takeover or merge.
  • Profile sync, identity link, and account merge are independent, auditable policies.
  • LDAP/AD, DingTalk, and CAS adapters are implemented only after the shared adapter contract is frozen.
  • Each implementation PR is integrated into big-main and validated on the test environment before maintainers consider merging to main.

Delivery order

  • P0: close current identity safety gaps.
  • P1: unified identity core, Binding V2, profile/provisioning policy, provider registry, identity link, and safe account merge.
  • P2: LDAP/AD, DingTalk, and CAS adapters.
  • P3: broker guidance and trusted gateway assertions.
  • P4: SCIM lifecycle provisioning and explicit entitlement mapping.

Existing requirements remain the source for their protocol slices: #613, #583, #456, and #260. Community PRs #437 and #467 stay open while the shared contract is stabilized.

Blocked by

None - can start immediately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/l大改动或高风险改动,需要 maintainer 负责 / Large or risky change requiring maintainer ownership.enhancementNew feature or requestpriority/p2中优先级 / Medium priority triage bucket.risk/high涉及安全、鉴权、迁移或公共契约 / Touches security, auth, migrations, or public contracts.triage/needs-info需要补充更多信息后才能分流 / Issue needs more detail before it can be routed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions