Skip to content

feat(auth): add DingTalk OAuth2 adapter to unified identity core #675

Description

@XiaoSeS

Goal

Implement DingTalk OAuth2 as a native Browser Adapter behind the unified identity core.

Scope

  • Official DingTalk authorization-code, token, and userinfo transport with bounded timeouts and fail-closed response parsing.
  • Stable Provider Instance and authority configuration; authority is never taken from upstream claims.
  • Produce ProviderAuthenticationResult with dingtalk_union_id as primary subject and only verified same-response aliases (openId/userId) as typed alternates.
  • Map display name, avatar, and email as asserted attributes; ordinary DingTalk email is never verified/authoritative.
  • Reuse the existing ExternalIdentityLoginService, Provider Registry, Identity Link, Account Merge, session, audit, and error mapping.
  • Add protocol fixtures, conformance tests, callback integration coverage, deployment configuration, docs, and a minimal operator smoke path.

Non-goals

  • No direct PlatformPrincipal creation in the adapter.
  • No automatic email-based account binding or role mapping.
  • No changes to external contributor PR feat(auth): add DingTalk OAuth2 login support #467.
  • No main merge until big-main and Hong Kong test-server validation pass.

Acceptance

  • Provider disabled or incomplete configuration is hidden and makes no network call.
  • Token/userinfo errors, expiry, malformed JSON, missing stable subject, and oversized responses fail closed without secrets in logs.
  • Repeated login and username/profile changes resolve the same platform binding.
  • Identity Link and Account Merge browser flows use the same provider route and one-time state.
  • Exact SHA image is validated on big-main and in an isolated remote deployment.

Metadata

Metadata

Assignees

No one assigned

    Labels

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