Authlink.Policy.Client.Core
1.7.0
See the version list below for details.
dotnet add package Authlink.Policy.Client.Core --version 1.7.0
NuGet\Install-Package Authlink.Policy.Client.Core -Version 1.7.0
<PackageReference Include="Authlink.Policy.Client.Core" Version="1.7.0" />
<PackageVersion Include="Authlink.Policy.Client.Core" Version="1.7.0" />
<PackageReference Include="Authlink.Policy.Client.Core" />
paket add Authlink.Policy.Client.Core --version 1.7.0
#r "nuget: Authlink.Policy.Client.Core, 1.7.0"
#:package Authlink.Policy.Client.Core@1.7.0
#addin nuget:?package=Authlink.Policy.Client.Core&version=1.7.0
#tool nuget:?package=Authlink.Policy.Client.Core&version=1.7.0
📦 Package Overview
Authlink.Policy.Client.Core is a low-level, dependency-free library that defines interfaces, data contracts, and shared models used by client SDKs integrating with the Authlink Policy Decision Point (PDP).
It is intended to be consumed by higher-level packages such as:
Authlink.Policy.Client.HttpAuthlink.Policy.Client.ServiceStack
🚀 Install
dotnet add package Authlink.Policy.Client.Core
Or via Package Manager:
PM> Install-Package Authlink.Policy.Client.Core
🔧 Purpose
This package serves as a foundation layer, enabling:
- Abstraction of policy‐decision flows (Allow/Deny)
- Typed obligation contracts (
ObligationDto,ObligationType) returned with allow decisions - Decoupled, testable client implementations
- Plug-and-play support across .NET environments (console, web, serverless)
- Zero runtime dependencies beyond .NET Standard
⚖️ Obligations (since 1.3.0)
An allow decision may carry obligations the consumer (PEP) must honour before completing the operation. Each obligation is a kind plus a flat bag of string attributes:
| Kind | Attributes | Meaning |
|---|---|---|
RowFilter |
expression, version |
Restrict the result set to rows satisfying the expression |
MaskProperties |
properties, version |
Mask every property matched by the selector list |
RequireAudit |
(none) | Record an audit entry for the operation |
RequireReason |
(none) | Capture a caller-supplied reason |
RequireApprovals |
count, distinct_from_requester, principal_types, groups? |
Collect the stated approvals before completing the operation (since 1.6.0) |
RequireHealthStrategy |
min_ramp_steps |
Use a rollout with at least this many ramp steps (since 1.6.0) |
RequireReviewAfter |
within_hours |
Schedule a review within this many hours (since 1.6.0) |
Expression payloads follow the normative obligation expression grammar (versioned via the
version attribute; currently "1"). PolicyDecisionResponse.ObligationsGrammarVersion carries the
grammar version the PDP serves whenever a decision has obligations, so consumers can detect a
contract they do not support up front.
Since 1.6.0 a decision also carries DeterminingPolicies (Id, Key, Version of each policy that
determined it) and Reasons. Both default to empty when the server does not supply them. A consumer that
does not understand a kind must still deny: the three kinds above are new, so a PEP built against 1.5.0 or
earlier fails closed on them.
Fail closed: a consumer that cannot fully enforce an obligation — unknown kind, unsupported
grammar version, or an unparseable expression — must deny the request. Partial enforcement is not
permitted. Since 1.7.0, PolicyDecisionResponse.HasUnenforceableObligations(enforced) applies this rule:
it returns true when the decision carries a kind outside enforced or declares an unsupported grammar
version. PolicyAuthorizationOptions.EnforcedObligations lists the kinds an SDK consumer enforces. The
AspNetCore and ServiceStack SDKs use both. The normative grammar reference lives in the Authlink repository at
docs/specifications/obligation-expression-grammar-v1.md.
📚 Documentation
Coming soon at: https://docs.authlink.co.za
📄 License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- ErrorOr (>= 2.0.1)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Authlink.Policy.Client.Core:
| Package | Downloads |
|---|---|
|
Authlink.Policy.Client.Http
Implements the IPolicyClient abstraction over HTTP, allowing .NET applications to call Authlink’s Policy Decision Point (PDP) via a lightweight, HttpClientFactory-powered client. Includes PolicyHttpClient, option-based configuration (base URI, default client-ID, timeout), JSON (de)serialization of decision requests, and fail-closed error handling. Designed to plug into ASP.NET Core, ServiceStack, worker services, or any .NET runtime in combination with Authlink.Policy.Client.Core. |
|
|
Authlink.Policy.AspNetCore
ASP.NET Core integration for Authlink policy-based authorization. Provides attributes, authorization handlers, and middleware for seamless integration with the ASP.NET Core authorization framework. Enables declarative policy authorization using [PolicyAuthorize] attributes and supports resource-based access control with custom attribute resolvers. |
|
|
Authlink.Policy.ServiceStack
ServiceStack integration for Authlink policy-based authorization. Provides attributes, request filters, and plugins for seamless integration with the ServiceStack framework. Enables declarative policy authorization using [PolicyAuthorize] attributes and supports resource-based access control with custom attribute resolvers. |
GitHub repositories
This package is not used by any popular GitHub repositories.