Client as resource owner
23An API can confuse a client identity with a user identity when both occupy the same identifier namespace.
A client identity does not become a user identity through a matching string.
Key idea: Keep application and user identities distinct.
Rules & examples
Keep application and user identities distinct.
- Where client IDs and user identifiers share a namespace, servers SHOULD NOT let clients choose claims that collide with real users.
- If that influence cannot be avoided, the authorization server MUST provide other means to distinguish client-only tokens from user-involved tokens.
- Resource authorization must respect which kind of principal a token represents.
In a client-credentials grant, sub can represent the application. In a user-involved grant, sub can represent the resource owner. The same raw string must not accidentally confer the same authority.
Sources
New to this? Start hereA quick picture + helpful background
A key is different from permission.
An app, a person, and a server have different roles. Follow who asks, who grants permission, and who checks the credential. A key in the drawing is an analogy, not a literal protocol field.
Helpful first, if these ideas are unfamiliar
These pictures are analogies to help you learn. The linked RFC explains the actual rules.
Related RFCs and changes
“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.
The BCP adds defenses against confusing client-only token subjects with resource-owner identities.
Read the updated RFC section ↗