Skip to content

feat(auth): add LDAP/AD adapter to the unified identity core #671

Description

@XiaoSeS

Parent

Problem

SkillHub still has no LDAP/AD credential adapter that enters the frozen unified identity boundary. PR #437 authenticates through a local-login fallback and can reuse an existing platform account by email, so it cannot be merged safely.

Scope

Implement PR 7 from docs/21-unified-identity-federation-design.md:

  • A dedicated Credential Provider adapter; do not modify local-password semantics.
  • Service bind/search, exactly-one match, user-DN bind, and attribute read outside the platform database transaction.
  • OpenLDAP entryUUID and Active Directory objectGUID stable subjects.
  • Configurable subject and profile attribute mapping; username, DN, and email are not default identity keys.
  • Typed subject/alias output through ProviderAuthenticationResult and the shared ExternalIdentityLoginService.
  • No email-based implicit link or account takeover; collisions return the shared link-required outcome.
  • LDAPS and StartTLS support; no production trust-all escape hatch.
  • Escaped search filters, bounded response sizes, explicit connection/read/pool timeouts, and stable safe error codes.
  • Disabled or incomplete providers do not initialize a client, make network calls, or appear in /api/v1/auth/methods.
  • Default-off Compose, Helm, and Kustomize configuration plus operator documentation.
  • Audit, low-cardinality metrics, and secret/log redaction.

Acceptance

  • Provider Conformance Kit passes.
  • Real OpenLDAP tests cover plain LDAP, LDAPS, StartTLS, first/repeat login, username change, profile policy, email collision, missing entryUUID, multiple results, injection input, invalid password, unavailable directory, and timeouts.
  • Fixed AD objectGUID byte-order fixtures pass.
  • Existing GitHub/GitLab/OIDC, CAS, local password, Device Flow, API token, link, and account-merge behavior remains compatible.
  • Upgrade from the current big-main database/session state is additive and rollback-safe.
  • The exact feature commit is merged only to big-main, built into a revision-labelled image, and validated on the Hong Kong test machine without rebooting the host.
  • Test resources, images, and caches created by this run are cleaned without touching Multica or existing runtime resources.

Delivery

Target a dedicated PR at big-main. Do not merge to main without explicit maintainer confirmation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/m中等改动,存在一定协同成本 / Medium change with noticeable coordination cost.priority/p1高优先级 / High 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