Rag.NET.Security.AspNetCore
3.1.0
See the version list below for details.
dotnet add package Rag.NET.Security.AspNetCore --version 3.1.0
NuGet\Install-Package Rag.NET.Security.AspNetCore -Version 3.1.0
<PackageReference Include="Rag.NET.Security.AspNetCore" Version="3.1.0" />
<PackageVersion Include="Rag.NET.Security.AspNetCore" Version="3.1.0" />
<PackageReference Include="Rag.NET.Security.AspNetCore" />
paket add Rag.NET.Security.AspNetCore --version 3.1.0
#r "nuget: Rag.NET.Security.AspNetCore, 3.1.0"
#:package Rag.NET.Security.AspNetCore@3.1.0
#addin nuget:?package=Rag.NET.Security.AspNetCore&version=3.1.0
#tool nuget:?package=Rag.NET.Security.AspNetCore&version=3.1.0
Rag.NET.Security.AspNetCore
Part of Rag.NET — a modular RAG pipeline for .NET built on Microsoft.Extensions.AI. Ships as 74 packages; install only what you call. Documentation · Choosing packages
ASP.NET Core binding for Rag.NET's RBAC: resolves the caller's roles from the current
request's ClaimsPrincipal, so UseRbac() chunk filtering follows your existing
authentication without a custom ICallerContext.
Install
dotnet add package Rag.NET.Security.AspNetCore
Setup
using Rag.NET.DependencyInjection;
using Rag.NET.Security;
using Rag.NET.Security.AspNetCore;
services.AddRagNet(rag => rag.UseRbac());
services.AddRagNetAspNetCoreSecurity(); // ICallerContext ← ClaimsPrincipal role claims
Example
Documents declare who may retrieve them via the allowed_roles tag at ingestion; from
then on, retrieval inside an authenticated request only returns chunks the caller's role
claims allow:
using Rag.NET.Models;
await pipeline.IngestAsync(stream, new DocumentMetadata
{
DocumentId = new DocumentId("hr-handbook-2024"),
FileName = "hr-handbook-2024.pdf",
Tags = new Dictionary<string, MetadataValue>
{
["allowed_roles"] = "hr,finance",
},
});
Full guide
| 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. net11.0 is compatible. |
-
net10.0
- Rag.NET.Security (>= 3.1.0)
-
net11.0
- Rag.NET.Security (>= 3.1.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.4.0 | 0 | 12/5/2026 |
| 3.3.0 | 0 | 12/5/2026 |
| 3.2.0 | 53 | 12/4/2026 |
| 3.1.1 | 93 | 12/3/2026 |
| 3.1.0 | 81 | 12/3/2026 |
| 3.0.3 | 74 | 12/2/2026 |
| 3.0.2 | 68 | 12/2/2026 |
| 3.0.1 | 66 | 12/1/2026 |
| 3.0.0 | 109 | 12/1/2026 |
| 2.0.4 | 106 | 11/30/2026 |
| 2.0.3 | 125 | 11/30/2026 |
| 2.0.2 | 110 | 11/29/2026 |
| 2.0.1 | 128 | 11/26/2026 |
| 2.0.0 | 114 | 11/24/2026 |
| 1.10.4 | 131 | 11/21/2026 |
| 1.10.3 | 120 | 11/19/2026 |
| 1.10.2 | 104 | 11/19/2026 |
| 1.10.1 | 116 | 11/18/2026 |
| 1.10.0 | 108 | 11/18/2026 |
| 1.9.2 | 132 | 11/16/2026 |