Rag.NET.Security.AspNetCore
3.1.1
See the version list below for details.
dotnet add package Rag.NET.Security.AspNetCore --version 3.1.1
NuGet\Install-Package Rag.NET.Security.AspNetCore -Version 3.1.1
<PackageReference Include="Rag.NET.Security.AspNetCore" Version="3.1.1" />
<PackageVersion Include="Rag.NET.Security.AspNetCore" Version="3.1.1" />
<PackageReference Include="Rag.NET.Security.AspNetCore" />
paket add Rag.NET.Security.AspNetCore --version 3.1.1
#r "nuget: Rag.NET.Security.AspNetCore, 3.1.1"
#:package Rag.NET.Security.AspNetCore@3.1.1
#addin nuget:?package=Rag.NET.Security.AspNetCore&version=3.1.1
#tool nuget:?package=Rag.NET.Security.AspNetCore&version=3.1.1
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.1)
-
net11.0
- Rag.NET.Security (>= 3.1.1)
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 | 62 | 12/5/2026 |
| 3.2.0 | 63 | 12/4/2026 |
| 3.1.1 | 94 | 12/3/2026 |
| 3.1.0 | 83 | 12/3/2026 |
| 3.0.3 | 77 | 12/2/2026 |
| 3.0.2 | 70 | 12/2/2026 |
| 3.0.1 | 68 | 12/1/2026 |
| 3.0.0 | 111 | 12/1/2026 |
| 2.0.4 | 108 | 11/30/2026 |
| 2.0.3 | 126 | 11/30/2026 |
| 2.0.2 | 112 | 11/29/2026 |
| 2.0.1 | 129 | 11/26/2026 |
| 2.0.0 | 115 | 11/24/2026 |
| 1.10.4 | 132 | 11/21/2026 |
| 1.10.3 | 122 | 11/19/2026 |
| 1.10.2 | 105 | 11/19/2026 |
| 1.10.1 | 118 | 11/18/2026 |
| 1.10.0 | 109 | 11/18/2026 |
| 1.9.2 | 132 | 11/16/2026 |