Skip to content

Commit

Permalink
Recommend against defining custom scopes that conflict with known scopes
Browse files Browse the repository at this point in the history
closes #163
  • Loading branch information
aaronpk committed May 14, 2024
1 parent 41f17b2 commit 4b838e0
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion draft-ietf-oauth-v2-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,9 @@ Access tokens are intended to be issued to clients with less privileges
than the user granting the access has. This is known as a limited "scope"
access token. The authorization server and resource server can use this
scope mechanism to limit what types of resources or level of access a particular client
can have. For example, a client may only need "read" access to a user's
can have.

For example, a client may only need "read" access to a user's
resources, but doesn't need to update resources, so the client can request
the read-only scope defined by the authorization server, and obtain
an access token that cannot be used to update resources. This requires
Expand All @@ -587,6 +589,12 @@ scopes, and associates those scopes with the access token issued to the client.
The resource server is then responsible for enforcing scopes when presented
with a limited-scope access token.

OAuth does not define any scope values, instead scopes are defined by the
authorization server or by extensions or profiles of OAuth. One such extension
that defines scopes is {{OpenID}}, which defines a set of scopes that provide
granular access to a user's profile information. It is recommended to avoid
defining custom scopes that conflict with scopes from known extensions.

To request a limited-scope access token, the client uses the `scope`
request parameter at the authorization or token endpoints, depending on
the grant type used. In turn, the authorization server uses the `scope`
Expand Down Expand Up @@ -3827,6 +3835,7 @@ Discussions around this specification have also occurred at the OAuth Security W
-11

* Explicitly mention that Bearer is case insensitive
* Recommend against defining custom scopes that conflict with known scopes

-10

Expand Down

0 comments on commit 4b838e0

Please sign in to comment.