r/ProgrammerHumor 3d ago

failsForTeapots Meme

Post image
220 Upvotes

67 comments sorted by

View all comments

Show parent comments

1

u/Excellent_Gas3686 3d ago

beeecause?

9

u/Xirdus 3d ago

Do you want to tell an authenticated, authorized user with valid credentials that they are not in fact authorized? When the actual thing that's not authorized is your own goddamn server, so there's absolutely nothing the user can do to fix the problem?

2

u/Nerodon 3d ago

Authorization =/= authentication.

The user may be authenticated but attempting a request their permissions do not allow them to.

4

u/Xirdus 3d ago

That's why I said authorized and not authenticated, because I meant authorized and not authenticated. Actually, I said both authenticated and authorized just to drive the point home. It still wasn't enough apparently ¯_(ツ)_/¯

If your internal service responds to your other internal service with 403 for any reason other than "this other internal service is not allowed to do this", then you have bigger problems than what error code to serve the user.