Skip to content

Commit 149502d

Browse files
jeswrCopilotlangsamuelf-pavlikuvdsl
authored
feat: add client credentials as a MUST (#245)
* feat: add client credentials as a MUST * fix: Use `Access` token rather than `OIDC ID` token Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix: Refer to `Authorization Server` over `OpenID Providers` * Extract changes to separate section * Update index.bs Co-authored-by: Jesse Wright <63333554+jeswr@users.noreply.github.com> * Add reference to refresh token flow * Make Client Credentials authentication example non-normative and add RFC7523 reference * Generalize client authentication validation in Client Credentials grant * Clarify WebID binding requirement for Client Credentials Grant * Update index.bs Co-authored-by: elf Pavlik <elf-pavlik@hackers4peace.net> * Update index.bs Co-authored-by: Christoph Braun <christoph.braun@protonmail.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Samu Lang <langsamu@hotmail.com> Co-authored-by: Samu Lang <langsamu@users.noreply.github.com> Co-authored-by: elf Pavlik <elf-pavlik@hackers4peace.net> Co-authored-by: Christoph Braun <christoph.braun@protonmail.com>
1 parent c32d177 commit 149502d

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

index.bs

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,51 @@ Discovery 1.0 [[!OIDC-DISCOVERY]] resource by including `webid` in its `scopes_s
438438
</pre>
439439
</div>
440440

441+
# Client Credentials Grant # {#client-credentials}
442+
443+
NOTE: This sections borrows concepts from OAuth 2.0 [[!RFC6749]], while the rest of Solid-OIDC builds on top of OpenID
444+
Connect Core 1.0 [[!OIDC-CORE]]. The section is likely to be extracted into a separate specification in the future.
445+
446+
Authorization Servers MUST support the OAuth 2.0 Client Credentials Grant [[!RFC6749]] (Section 4.4) to enable
447+
non-interactive authentication for scripts, automated agents, and server-to-server communication.
448+
449+
NOTE: Scripts and bots can also use Solid-OIDC without Client Credentials via the [refresh token
450+
flow](https://www.rfc-editor.org/rfc/rfc6749#section-1.5), when supported by the server.
451+
452+
When using the Client Credentials Grant, the Authorization Server must bind the `client_id` to the user who registered it and use that
453+
user's WebID for the value of `webid` claim in the ID token.
454+
455+
*This section is non-normative*
456+
457+
<div class='example'>
458+
When using the Client Credentials Grant, a Client could authenticate with the OP using a `client_id`
459+
and `client_secret` pair, which was previously obtained through client registration (either static or dynamic) by and bound to an authenticated user. The Client
460+
sends a token request to the OP's token endpoint with `grant_type=client_credentials` and the `webid` scope.
461+
</div>
462+
463+
NOTE: [[!RFC7523]] (Section 2.2) presents another way to handle authentication using JWTs.
464+
465+
## Token Instantiation ## {#client-credentials-token-instantiation}
466+
467+
During Token Instantiation [[#tokens]], if the [Client Credentials
468+
Grant](https://www.rfc-editor.org/rfc/rfc6749#section-4.4) is used, the OP MUST validate the client's authentication
469+
credentials.
470+
471+
## Solid-OIDC Conformance Discovery ## {#client-credentials-discovery}
472+
473+
For non-interactive use cases such as scripts, automated agents, and server-to-server communication, this specification
474+
also requires that an OpenID Provider that conforms to the Solid-OIDC specification MUST advertise its support for the
475+
[Client Credentials Grant](https://www.rfc-editor.org/rfc/rfc6749#section-4.4) in the OpenID Connect Discovery 1.0
476+
[OIDC.Discovery] resource by including `client_credentials` in its `grant_types_supported` metadata property.
477+
478+
<div class="example">
479+
<pre highlight="json">
480+
{
481+
"grant_types_supported": ["authorization_code", "refresh_token", "client_credentials"]
482+
}
483+
</pre>
484+
</div>
485+
441486
# Security Considerations # {#security}
442487

443488
*This section is non-normative*

0 commit comments

Comments
 (0)