steep-greece-67535
03/10/2025, 5:15 PMmagnificent-energy-493
steep-greece-67535
03/10/2025, 7:57 PMmagnificent-energy-493
read:user
or profile:write
. The OAuth2 scope doesn't say what a user can and cannot do.
> An access token represents that the client application has been authorized by the user. It states what a user said (consent!) a third party application can do in their name. Let's take a quick look at the OAuth2 flow:
> 1. The client application asks the user if they can access a protected resource on their behalf (by redirecting the user to the authorization server’s authorization endpoint, specifying exactly what they would like to access (scopes)).
> 2. The user identifies themselves to the authorization server (but remember, OAuth isn't authentication; you’ll need OpenID Connect to help you with that).
> 3. The user authorizes the client application to access the protected resource on their behalf (using the OAuth consent process).
> 4. The client application is issued an access token.
> For example:
> 1. Alice allows myphotoapp to access her Facebook photos.
> 2. Bob allows mytodolist to access his Google Calendar.
> Let's make a counterexample:
> If Alice would allow myphotoapp to act as an administrator of the system and delete the production database, it would not matter unless Alice is actually a system administrator. Similarly, Alice can not allow myphotoapp access to Bob's pictures, because she isn't Bob.
> I have lost count of the number of times developers have gotten this wrong. And again, it's not because people aren't skilled. it's because complex protocols have steep learning curves and ain't nobody got time to learn everything. As said before complexity kills security.
See also this blogpost: https://www.scottbrady91.com/oauth/oauth-is-not-user-authorizationsteep-greece-67535
03/10/2025, 8:30 PM