Must the authorization server authenticate the client of a client credentials request?

Client authenticated for the client credentials grantRFC 6749 §4.4.2MUSTRoles: authorization_server

Requirement as recorded in the ProtocolSoup registry

The authorization server MUST authenticate the client.

Read §4.4.2 in RFC 6749

Self-test verdict

PassCommit 00bac3fEvaluated

This is ProtocolSoup's result against its own implementation at the commit shown. It is not a certification of ProtocolSoup or of any other product.

Captured from production

Captured Commit 00bac3f

Captured from the deployed ProtocolSoup at the commit shown. Every request and response is shown exactly as sent and received.

Passing exchange

Accepted, as requiredConformance client

The conformance client requests a client_credentials token as machine-client with its client password over HTTP Basic. The access token names machine-client in client_id and sub.

Requests from ProtocolSoup’s conformance client, which sends malformed messages on purpose. The hosted wallet never sends these.

  1. 1.POST https://protocolsoup.com/oauth2/token200 OK

    TLS: TLS 1.3 · TLS_AES_128_GCM_SHA256 · h2

    Request

    POST /oauth2/token HTTP/2.0
    Authorization: Basic bWFjaGluZS1jbGllbnQ6TTdCa0JKX2lLOEdwNFJlRjFTdkdDcWx1eE1uMnlTcnU=
    Content-Length: 29
    Content-Type: application/x-www-form-urlencoded
    Host: protocolsoup.com
    User-Agent: ProtocolSoup-Conformance-Client/1
    
    grant_type=client_credentials

    Response

    HTTP/2.0 200 OK
    Cache-Control: no-store
    Cf-Cache-Status: DYNAMIC
    Cf-Ray: a65bab1f1df43cdb-MSP
    Content-Type: application/json
    Date: Sun, 06 Dec 2026 13:34:30 GMT
    Fly-Request-Id: 01M95S0BX3CQFCDHHA7ZZ904DG-ord
    Nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
    Pragma: no-cache
    Referrer-Policy: strict-origin-when-cross-origin
    Report-To: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=bVWo4C7KjP04kxwx2%2BDKMmDoN4nu8qxf77eJmm8C5F2d%2Fb1Cf84AuWolsDs4cgGNtAt0w0oD6y0Fy1u0kvY1MnbgleBcOdHyq1QL%2BFYL4mws3ckBqHFB8mTtvcuJIshC26U%3D"}]}
    Server: cloudflare
    Server-Timing: cfCacheStatus;desc="DYNAMIC"
    Server-Timing: cfEdge;dur=4,cfOrigin;dur=241
    Vary: Origin
    Vary: accept-encoding
    Via: 1.1 fly.io, 1.1 fly.io
    X-Content-Type-Options: nosniff
    X-Frame-Options: DENY
    X-Xss-Protection: 1; mode=block
    
    {"access_token":"eyJhbGciOiJSUzI1NiIsImtpZCI6InJzYS05YTJlNThlYzVjNjk3NGJmIiwidHlwIjoiYXQrand0In0.eyJhdWQiOiJodHRwczovL3Byb3RvY29sc291cC5jb20vb2F1dGgyL3Jlc291cmNlIiwiY2xpZW50X2lkIjoibWFjaGluZS1jbGllbnQiLCJjbGllbnRfbmFtZSI6Ik1hY2hpbmUtdG8tTWFjaGluZSBDbGllbnQiLCJleHAiOjE3OTY1Njc2NzAsImlhdCI6MTc5NjU2NDA3MCwiaXNzIjoiaHR0cHM6Ly9wcm90b2NvbHNvdXAuY29tL29hdXRoMiIsImp0aSI6Imp0aS1kYThhNzE0MmMyMGJkMDdmIiwibmJmIjoxNzk2NTY0MDcwLCJzY29wZSI6ImFwaTpyZWFkIGFwaTp3cml0ZSIsInN1YiI6Im1hY2hpbmUtY2xpZW50In0.bOqk0CmObc_cKYDmOqWtlre2OzK-_iqp_4wWWfQUf_yURHHBiNoTbk8tfh6ylGuhneqCqlgYHOPZz8EmFqpUB9TPA7g4QFdqvRu4Yj2neB67jV3xqGIxWhg90XT2lKW0yLu1YAWXNLxQAk6dLY_ItSzoX_7wJ-bxUWwlsUOqy2aU1LoV0A3v7LZkSi9o0JtdqWFY4RMhnqRAQXO9bCsz5rxfej4MA3BohbTuvufXaDZ6GrCHGOA5COQwd3GvlxWrnXV1iGoXU-MzjJGIn9RqnNPhnkl-czyl8Py4zm1p6eqJu6Qqfq0rpAiTZ8hY8dcNIsO2NiN1_b7tyxlrnbBrJw","token_type":"Bearer","expires_in":3600,"scope":"api:read api:write"}
    

Failing exchange

Rejected, as requiredConformance client

The conformance client sends three client_credentials token requests naming machine-client: with client_id and no client password, with a wrong client_secret in the body, and with a wrong password over HTTP Basic.

Requests from ProtocolSoup’s conformance client, which sends malformed messages on purpose. The hosted wallet never sends these.

  1. 1.POST https://protocolsoup.com/oauth2/token400 Bad Request

    TLS: TLS 1.3 · TLS_AES_128_GCM_SHA256 · h2

    Request

    POST /oauth2/token HTTP/2.0
    Content-Length: 54
    Content-Type: application/x-www-form-urlencoded
    Host: protocolsoup.com
    User-Agent: ProtocolSoup-Conformance-Client/1
    
    client_id=machine-client&grant_type=client_credentials

    Response

    HTTP/2.0 400 Bad Request
    Cache-Control: no-store
    Cf-Cache-Status: DYNAMIC
    Cf-Ray: a65bab2b9a153cdb-MSP
    Content-Type: application/json
    Date: Sun, 06 Dec 2026 13:34:32 GMT
    Fly-Request-Id: 01M95S0DTDHW0H79TD4YA0TB7R-ord
    Nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
    Pragma: no-cache
    Referrer-Policy: strict-origin-when-cross-origin
    Report-To: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=6i6CvGS9xwh1%2ByGRUVw2TGiAiTL6%2BK0dFl5nQSDx3wKjX37HTyCNIio%2FKYyHkchzgZahx1DIFph3dGbdYWwm6hUq0GuXJmZzcaLBA6TTPDQ8ecMbktSpsz8w2Q3i0YakS%2BI%3D"}]}
    Server: cloudflare
    Server-Timing: cfCacheStatus;desc="DYNAMIC"
    Server-Timing: cfEdge;dur=3,cfOrigin;dur=200
    Vary: Origin
    Vary: accept-encoding
    Via: 1.1 fly.io, 1.1 fly.io
    X-Content-Type-Options: nosniff
    X-Frame-Options: DENY
    X-Xss-Protection: 1; mode=block
    
    {"error":"invalid_client","error_description":"Client authentication failed","error_uri":"https://datatracker.ietf.org/doc/html/rfc6749#section-5.2"}
    
  2. 2.POST https://protocolsoup.com/oauth2/token400 Bad Request

    TLS: TLS 1.3 · TLS_AES_128_GCM_SHA256 · h2

    Request

    POST /oauth2/token HTTP/2.0
    Content-Length: 90
    Content-Type: application/x-www-form-urlencoded
    Host: protocolsoup.com
    User-Agent: ProtocolSoup-Conformance-Client/1
    
    client_id=machine-client&client_secret=not-the-client-secret&grant_type=client_credentials

    Response

    HTTP/2.0 400 Bad Request
    Cache-Control: no-store
    Cf-Cache-Status: DYNAMIC
    Cf-Ray: a65bab31e82b3cdb-MSP
    Content-Type: application/json
    Date: Sun, 06 Dec 2026 13:34:33 GMT
    Fly-Request-Id: 01M95S0ETKFPPRK4QPMWQN8WXK-ord
    Nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
    Pragma: no-cache
    Referrer-Policy: strict-origin-when-cross-origin
    Report-To: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=kGhImoReGeglo86Okjb%2BvPZCqZ%2Bn%2FqQcyvlvz7UF2ruF2YdzljKzR07Ik%2BBC1EzpgUSUHrN%2F39gMAU%2FYsZj62pfEZyzC1Vvf2fGiTss96VEKqdQapktfgqiyYjPZjH5Ggc4%3D"}]}
    Server: cloudflare
    Server-Timing: cfCacheStatus;desc="DYNAMIC"
    Server-Timing: cfEdge;dur=4,cfOrigin;dur=228
    Vary: Origin
    Vary: accept-encoding
    Via: 1.1 fly.io, 1.1 fly.io
    X-Content-Type-Options: nosniff
    X-Frame-Options: DENY
    X-Xss-Protection: 1; mode=block
    
    {"error":"invalid_client","error_description":"Client authentication failed","error_uri":"https://datatracker.ietf.org/doc/html/rfc6749#section-5.2"}
    
  3. 3.POST https://protocolsoup.com/oauth2/token401 Unauthorized

    TLS: TLS 1.3 · TLS_AES_128_GCM_SHA256 · h2

    Request

    POST /oauth2/token HTTP/2.0
    Authorization: Basic bWFjaGluZS1jbGllbnQ6bm90LXRoZS1jbGllbnQtc2VjcmV0
    Content-Length: 29
    Content-Type: application/x-www-form-urlencoded
    Host: protocolsoup.com
    User-Agent: ProtocolSoup-Conformance-Client/1
    
    grant_type=client_credentials

    Response

    HTTP/2.0 401 Unauthorized
    Cache-Control: no-store
    Cf-Cache-Status: DYNAMIC
    Cf-Ray: a65bab381d2e3cdb-MSP
    Content-Type: application/json
    Date: Sun, 06 Dec 2026 13:34:34 GMT
    Fly-Request-Id: 01M95S0FRX9FP0XWFCH007D46S-ord
    Nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
    Pragma: no-cache
    Referrer-Policy: strict-origin-when-cross-origin
    Report-To: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=lBrbcYGgfhkH3eB0Mvi03CRcU5nFSLSFwAoaqp9XyXXFwD8bxSQuxeRf5zXGsbT4i7T9aF9lzaUO1oPJKLfrjrZZ2l9YqOcbQN7weqLQz6qYGBbxE%2FwqIWXlp5ofNIeGSQg%3D"}]}
    Server: cloudflare
    Server-Timing: cfCacheStatus;desc="DYNAMIC"
    Server-Timing: cfEdge;dur=3,cfOrigin;dur=197
    Vary: Origin
    Vary: accept-encoding
    Via: 1.1 fly.io, 1.1 fly.io
    Www-Authenticate: Basic realm="oauth2"
    X-Content-Type-Options: nosniff
    X-Frame-Options: DENY
    X-Xss-Protection: 1; mode=block
    
    {"error":"invalid_client","error_description":"Client authentication failed","error_uri":"https://datatracker.ietf.org/doc/html/rfc6749#section-5.2"}
    

Run it live

Looking Glass runs the flow that sends the message this requirement governs, against the same server, and decodes each exchange as it happens.

Open the flow in Looking Glass

Tests

Implementation

Explainer

What this requires

Yes: the authorization server must authenticate the client on every client credentials request. Section 4.4.2 has two sentences, one for each side: "The client MUST authenticate with the authorization server as described in Section 3.2.1." and "The authorization server MUST authenticate the client." The second is this row. It leaves no optional path. A client_credentials request without verified client credentials has nothing else in it that could justify a token.

Authentication here covers any method the server has established for the client. This server accepts a client password over HTTP Basic or in the body, and a signed private_key_jwt assertion for a client that registered a key.

Why it exists

In the other grants a code or refresh token is evidence of a user's approval, and client authentication is a second check on top of it. Here it is the only check. The requirement is stated separately from the general rule in Section 3.2.1 so that no reading of the grant can make it conditional.

What non-compliance looks like

A token endpoint that looks up the client, confirms the grant type is allowed, and issues a token without comparing a secret. Or one that authenticates but then issues the token to the client_id from the body instead of the client it authenticated.

At /oauth2/token: no client at all, client_id alone, and a wrong client_secret in the body are each 400 invalid_client with Client authentication failed. A wrong password over HTTP Basic, or an unknown client over HTTP Basic, is 401 with WWW-Authenticate: Basic realm="oauth2".

How ProtocolSoup tests it

TestClientCredentialsGrantAuthenticatesTheClient sends those five requests and expects those five refusals. It then authenticates correctly and reads the access token: its client_id and sub claims must both name the authenticated client.

The captured passing exchange, client-authenticated, is machine-client over HTTP Basic, with the same check that the token's client_id and sub are machine-client. The failing one, client-not-authenticated, records three requests: client_id alone, a wrong client_secret, and a wrong Basic password.

Related requirements

All RFC 6749 requirements · OAuth 2.0 protocol page