Limit token privileges
05A token should carry only the audience, resources, and actions the app actually needs.
The payments server rejects this calendar token.
Key idea: Restrict the audience and the action.
Rules & examples
Restrict the audience and the action.
- Access-token privileges SHOULD be the minimum needed for the use case.
- Tokens SHOULD be limited to a specific resource server, or a small set. Servers MUST reject a token intended for a different audience.
- Restrict resources and actions as well. scope, resource, and authorization_details can express the intended bounds.
Audience restriction answers “where?” Scope and detailed authorization answer “what?” A token for reading a calendar should not become a general-purpose account key.
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.
Privilege restriction now explicitly includes audience, resources, and actions, with server-side checks on each request.
Read the updated RFC section ↗