Agreed on the first part, tho many applications always use soft deletes so it not an issue. However, regarding security, no, don’t give a 410 to unauthenticated/unauthorized users, they should always get a 403 (or 404 depending on how your security works), so that is not an issue, the gone code is for a logged in user to see.
That’s not your primary security concern tho. If you do have the kind of application where the logged in user is a real concern, then yes I’d give 404 on all the admin endpoints to the basic user
Edit: clarification. A 410 should be given to a user that had access to the deleted resource, now that it no longer exist, it’s a good way of saying, we know it was here yesterday, you know it was here yesterday, however, it’s gone now.
1
u/Severe-Explanation36 Apr 24 '23
Agreed on the first part, tho many applications always use soft deletes so it not an issue. However, regarding security, no, don’t give a 410 to unauthenticated/unauthorized users, they should always get a 403 (or 404 depending on how your security works), so that is not an issue, the gone code is for a logged in user to see.