Skip to content

Custom OIDC discovery override blocked by canonical issuer DNS; cold native ID-token flow does not pass override #2899

Open

Description

@wccheung11011001

Supabase Auth version: v2.197.0 (hosted UAT, freshly checked). No project identifiers, credentials, client secrets, user claims or tokens are included.

Huawei's public discovery endpoint is https://oauth-login.cloud.huawei.com/.well-known/openid-configuration . Its canonical issuer is https://accounts.huawei.com, while its authorization/token/JWKS endpoints use resolvable official service hosts. Public DNS currently returns NXDOMAIN for the canonical issuer hostname. Huawei's published verification guidance requires the canonical issuer string: https://developer.huawei.com/consumer/es/doc/HMSCore-Guides/harmonyos-java-scenario-id-token-0000001162579519 .

Observed failure: creating an OIDC custom provider with the correct canonical issuer, explicit official discovery URL, nonce checking retained and enabled=false is rejected with HTTP400 / validation_failed / Unable to resolve hostname. This is consistent with validateProviderURLs in the pinned administrative source resolving the issuer separately from the actual discovery URL. No provider was created or enabled.

Primary source: https://github.com/supabase/auth/blob/v2.197.0/internal/api/custom_oauth_admin.go

A separate cold-cache source-inspection concern: the custom provider branch in the native id_token grant reads the configured issuer, then the flow calls the provider cache by issuer without supplying that provider's configured discovery_url. The normal browser custom OIDC flow does use the explicit discovery override, and a previously warmed issuer-keyed cache can mask this difference until a cold start. This second concern has not been demonstrated against a successfully created hosted provider because creation is blocked first.

Sources:
https://github.com/supabase/auth/blob/v2.197.0/internal/api/token_oidc.go
https://github.com/supabase/auth/blob/v2.197.0/internal/api/provider/oidc_cache.go
https://github.com/supabase/auth/blob/v2.197.0/internal/api/provider/custom_oauth.go

Could you confirm a supported hosted configuration, or fix both custom-provider validation and native ID-token discovery lookup, while preserving exact issuer/audience/nonce/signature verification and SSRF protection for every requested network endpoint? We have not changed the issuer, skipped validation, inserted auth-schema records manually or activated a substitute provider.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions