On this page
The core idea
Authentication establishes an identity; authorization evaluates whether that identity can perform a particular action on a particular resource. Both must be handled at trusted boundaries. A signed-in user may still be outside the relevant organisation, course or role. Check the resource relationship, not only whether a session exists.
A practical approach
Step 1
Name the actions your feature supports and the resource each action affects. Define the required ownership or role relationship.
Step 2
Enforce checks on the server for every protected read and write. Treat hidden buttons as usability choices, not security controls.
Step 3
Test access with two ordinary users and different resource ownership. Include direct requests that bypass the interface.
Worked example
A learner can view their own progress but should not see another learner’s progress by changing an ID in the URL. The server must compare the authenticated identity with the requested record’s permitted scope.
A mistake to avoid
An administrator role can become an overly broad shortcut. Prefer permissions that match actual responsibilities and review whether privileged actions need additional logging or confirmation.
Try it yourself
Create an action-resource matrix for one feature. Test an owner, another signed-in user and an unauthenticated request against each protected operation.
Your implementation checklist
- Identity and permission are separate checks.
- Resource ownership is verified.
- Protected operations enforce rules server-side.
- Direct requests receive the same protection as the UI.
Share or cite this guide
Innovate with Ajay Editorial (2026-10-04). Separate Authentication from Authorization. https://innovatewithajay.com/blogs/separate-authentication-and-authorization
