We want the developer to be able to be declarative in coarse grained roles-based and feature-based authorization for endpoints.
At this stage, we are not designing for fine-grained permissions or policies.
We already define a small number of Authorization policies using net7.0 minimal API authorization policies but those policies are not easily extendable to be used in declarative ways.
All of our Roles and FeatureLevels are already very discrete and can be turned into enumerations (either in code directly or using source generators)
Once we have that and some declarative syntax to markup service operations (i.e., an extension to the RouteAttribute) or another mechanism, we can make the declarative syntax very easy.
We want the developer to be able to be declarative in coarse grained roles-based and feature-based authorization for endpoints.
We already define a small number of Authorization policies using net7.0 minimal API authorization policies but those policies are not easily extendable to be used in declarative ways.
All of our
Roles
andFeatureLevels
are already very discrete and can be turned into enumerations (either in code directly or using source generators)Once we have that and some declarative syntax to markup service operations (i.e., an extension to the
RouteAttribute
) or another mechanism, we can make the declarative syntax very easy.One such approach is outlined here: https://www.linkedin.com/pulse/permission-based-authorization-aspnet-7-minimal-apis-yago-vicent/