liveBook · Manning

Access control list

As explained in Building Web APIs with ASP.NET Core

An access control list is a collection of rules specifying which principals are allowed or denied particular access types for a resource.

An access control list (ACL) is a set of rules that matches principals—users, groups, computers, or software—with allowed or denied access types for a resource. Access types can include reading, writing, and deleting, while resources can include filesystem folders, databases, website areas, or web API endpoints. section 9.1.2

Authorization evaluates these rules after authentication identifies the caller. Anonymous users receive the lowest possible permissions, authenticated users are matched against their ACLs, and restricted operations are allowed or denied according to the resulting permissions. section 9.1.2

Protecting board-game API endpoints

A practical API policy can organize authenticated users into permission groups: basic users get read-only endpoints, moderators get read and update endpoints but not delete or database-seeding endpoints, and administrators can read, update, delete, and seed. In ASP.NET Core, roles provide the group structure; role information is placed in JWT claims so authorization middleware can apply the appropriate rules. section 9.4

Implement the policy by following these practical steps:

  • Register representative moderator and administrator users. section 9.4
  • Create Moderator and Administrator roles; basic users can retain the permissions already provided to anonymous users. section 9.4
  • Assign users to roles and include those roles in JWT claims so ASP.NET Core can recognize them. section 9.4
Figure 9.1 Authentication and authorization flow
09-01

Trace how authentication identifies a caller before authorization checks permissions and decides whether a resource is available. section 9.1.2

How Building Web APIs with ASP.NET Core covers it

How deep it goes
Explains permission matching, authentication order, anonymous access, and role-based implementation steps without detailing policy internals.
Examples
Uses read-only, update, delete, and database-seeding endpoints with basic-user, moderator, and administrator permissions.
What it assumes
Builds from the distinction between identifying users through authentication and granting permissions through authorization.
What you can do after
Configure ASP.NET Core role permissions and JWT claims to authorize API operations for different user groups.
How it connects
Connects authentication, authorization, role-based access control, roles, JWT, claims, and authorization middleware.

Also explained in

Compare how 8 books explain access control list →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Building Web APIs with ASP.NET Core. The section links point to the parts of the book it draws on.