Authorization as a service for your ASP.NET apps
Fine-grained authorization in ASP.NET
Authorization in ASP.NET
.NET is a developer platform made up of tools, programming languages, and libraries for building web, console, and other types of applications. ASP.NET extends the .NET platform with tools and libraries specifically for building web apps. Aserto is an application authorization platform that brings secure, distributed, auditable access management to ASP.NET apps.
Built on trusted open-source CNCF projects like Open Policy Agent (OPA) and Open Container Initiative (OCIv2), Aserto brings role-based access control (RBAC), attribute-based access control (ABAC), and access control lists (ACL) to ASP.NET applications.
Why use Aserto over Microsoft.AspNetCore.Authorization?
There are a few key differences that set Aserto apart from the AspNetCore authorization library:
Authorize locally, manage centrally
Libraries in ASP.NET are embedded directly into the application. When implementing authorization in a web application, this means each backend-microservice has to define its own authorization policy as well as manage that data independently. It also needs to capture, and handle decision logs, meaning we need to custom build a centralized management plane if we need a unified audit trail of authorization decisions.
If your application consists of multiple services and runs multiple instances of these services, central management of all the authorization artifacts and decision logs creates a streamlined path to operating a distributed and/or modern microservices architecture.
Separation of concerns
Aserto also extracts authorization policy out of the application logic and stores/versions policy as its own code artifact. This is called separation of concerns. Separation of concerns enables security engineers to evolve the authorization policy separate from software developers evolving the application code. Policy-as-code removes the need to flip rows in a database or hardwire permission logic into application code. Rego, a declarative and flexible open source policy language, is used to author and store policies.
Users as first-class citizens
Additionally, Aserto treats users and roles as first-class citizens. The user/role directory is continuously synchronized with the Aserto authorizer instance(s) so that Aserto can reason about users and roles as a part of the policy without requiring role resolution as an additional external step.
Having user and role information come from the Aserto directory mitigates the risks of coding errors feeding incorrect data into the decision engine.
Setting things up
To get started, you’ll want to leverage the ASP.Net SDK to add authorization middleware. This package allows ASP.NET applications to use Aserto as the Authorization provider.
Deployment options
The Authorizer is an authorization engine built on top of the open source Open Policy Agent (OPA) decision engine. Creating a tenant in Aserto will automatically create a corresponding Authorizer instance with which you can develop and test. The ASP.Net SDK uses the gRPC API bindings to make it easy to integrate the Aserto authorizer into ASP.Net apps.
For production workloads, the Aserto Authorizer(s) can be deployed as a sidecar, or local service right next to your application instance(s) to provide minimal latency and 100% availability tied to your application’s uptime.
Decision logging
Out-of-box decision logging enables transparent auditing for security and compliance. All decisions made by the Aserto authorizer can be easily viewed and tracked via the Aserto control plane.
The Edge Authorizer
The Edge Authorizer(s) make authorization decisions based on three important inputs:
1. Policies from your policy registry
2. Users, attributes, and roles from your identity provider (e.g. Okta, Auth0, etc.) supplemented with application-specific information stored in the Aserto directory
3. Resource context passed by in your application
Any changes made to your hosted directory (i.e. in your IDP or enterprise directory) are automatically synchronized into the Aserto directory. Aserto pushes updates to the edge authorizer in near real-time, ensuring your decisions are based on up-to-date information.
Aserto comes with the following benefits:
- Out-of-the-box support for audit trails, custom roles, RBAC, ABAC, and ACL
- Use a policy-as-code workflow to build, tag, push, version, and pull policy images just like docker images
- Quick onboarding via first-class citizen integrations with Auth0 and your artifact registry, logging system, backend programming language, and frontend framework.
- Built on top of a trusted open source policy engine, the Open Policy Agent (OPA)
Resources
