Skip to content

Auth scenarios use token_endpoint_auth_method "none" even when a client secret is provided #601

Backlog

Description

@dbauthplane

Summary

In the authorization-code-grant and dpop authorization-server scenarios, the suite chooses none as the token endpoint authentication method whenever the server's metadata lists none in token_endpoint_auth_methods_supported. It does this even when a client secret is configured for the run.

As a result, servers that support public and confidential clients side by side cannot be tested on the confidential-client path. The code exchange is sent without credentials, and the server correctly answers invalid_client. authorization-code-grant reports this as a server failure, and dpop skips its token-binding check as inconclusive.

Steps to reproduce

  1. Use an authorization server whose metadata advertises both none and client_secret_basic (or client_secret_post) in token_endpoint_auth_methods_supported.
  2. Register a confidential client and run the authorization-code-grant or dpop scenario with its client ID and secret.
  3. Complete the authorization step.

Expected

The token request authenticates with the provided secret (client_secret_basic or client_secret_post, whichever the server supports), and the exchange succeeds.

Actual

The token request is sent with none and no client credentials. The server rejects it with invalid_client, as RFC 6749 section 3.2.1 requires for a confidential client. authorization-code-grant then fails, and dpop marks its token-binding check as skipped (inconclusive), so that check never runs.

Suggested fix

When a client secret is provided, prefer client_secret_basic or client_secret_post from the server's supported list. Fall back to none only when no secret is configured.

Runs with a public client pass on the same server, so the issue is limited to method selection. We're happy to send a PR if that helps.

Found while testing AuthPlane.

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