Authorisation: resource permissions and trusted enforcement
Design understandable access rules, enforce object-level permissions and account for service boundaries, caching and revocation.

On this page
Authorisation decides whether a principal may perform an operation on a resource. Authentication establishes an identity; it does not establish every permission that identity should have. An application must enforce access to the specific resource and action being requested.
Models and permissions
Discretionary access control allows an authorized owner to manage access. Mandatory access control enforces centrally defined policy, often involving labels and clearances. Role-based access control groups permissions around roles; attribute- and relationship-based approaches can express contextual or resource-specific rules.
These models are tools, not guarantees. A role such as “manager” may be too broad when access depends on tenant, department or ownership of a particular record. Define the permitted read, change, execute, delete or administration operation explicitly.
An access-control list associates permissions with a resource. Policies may combine roles, attributes and relationships; keep the decision understandable and testable rather than introducing a more elaborate model without a real requirement.
Enforce decisions at the trusted boundary
Default to denial when no policy grants access. Check permissions on every request, including object-level access. Hiding a button in the interface is not an authorization control, and an unguessable identifier does not replace checking whether the caller may access that object.
Enforce equivalent protections on downloads, background operations and service APIs. A client-supplied tenant, owner ID or role cannot become trusted merely because it appears in a signed-in request.
Service and API authorization
Microservices distribute the enforcement problem. An edge or gateway check does not automatically establish permissions for every downstream operation. Decide how identities and scopes propagate and where each resource-level decision is made.
OAuth provides delegated authorization, usually through access tokens. OpenID Connect adds authentication information for a client. An ID token is not a general-purpose substitute for an API access token. Validate token purpose, audience and the permissions required by the resource.
Performance and changing permissions
Caching can reduce policy-evaluation cost, but cached grants can remain stale after a role change or revocation. Specify expiry and invalidation behavior, including what happens when a policy service is unavailable. Distribution adds consistency and operational costs; it should solve a demonstrated need.
Keep permissions sufficiently precise without making the policy impossible to audit. Grouping common responsibilities is useful, but resource ownership and tenant boundaries often need checks beyond membership of a broad role.
Testing and operations
Test both permitted and denied actions. Include attempts to access another user's or tenant's record, missing claims, changed permissions and alternate endpoints. Review changes to policy alongside the application behavior they protect.
Audit logs can help investigate decisions, but collecting them does not prove compliance. Avoid unnecessary sensitive data, protect the logs and make sure denied operations do not leak the protected resource through error messages.
Evolving policy
Policy as code can make changes reviewable and testable; it does not make a mistaken policy correct. Adaptive or risk-based decisions need clear limits, useful signals and a defensible fallback. Treat machine-learning-based assessments as design choices rather than promises of automatic security.
The practical goal is a small, explicit set of rules enforced consistently at the resource boundary, with a clear explanation of who may do what and why.
References
Written by Alex Hovy.
← Back to BlogsContinue reading
Replacing an identity server: ASP.NET Core Identity and OpenIddict
Migration considerations for user management, OAuth/OpenID Connect contracts, credentials and operations, with clear distinctions between identity products.
Authentication: passwords, MFA, sessions and tokens
Separate identity verification from permissions, and understand the responsibilities around passwords, MFA, sessions, JWT validation and account recovery.
Encryption: confidentiality, integrity and key management
How encryption differs from hashing and signatures, where it protects data, and why key management and authenticated protocols matter.