Orleans.Lattice.Api.Auth API reference
This page documents Orleans.Lattice.Api.Auth 10.5.0, in the documentation for Orleans.Lattice 10.5.0 (release line 10.5), built 2026-12-05. It is also published as markdown, with every table and list, at api.md, and llms.txt lists every page.The package registers the in-process implementation of the shared ILatticeAuthAdmin contract. The contract and its request/response records live in the shared Orleans.Lattice.Api.Abstractions package, in the Orleans.Lattice.Api.Auth namespace; this page lists both this package's own declarations and that shared auth family. The facade guide explains every operation, the administrator gate and the tenant-tier rules; the facade implementation itself is internal and described in Architecture.
Registration
LatticeApiAuthServiceCollectionExtensions.AddLatticeAuthApi is the only registration method.
| Method | Signature | Purpose |
|---|---|---|
AddLatticeAuthApi |
ISiloBuilder AddLatticeAuthApi(this ISiloBuilder builder, Action<LatticeApiAuthOptions>? configure = null) |
Binds LatticeApiAuthOptions and registers ILatticeAuthAdmin and ILatticeAdminAuditLog as silo singletons. Throws ArgumentNullException when builder is null and InvalidOperationException when AddLatticeAuth(...) has not been called first. A repeated call layers its delegate; the facade itself is registered with TryAdd. |
LatticeApiAuthOptions has one property, MaxExplanationRules; see Configuration.
The facade contract
ILatticeAuthAdmin groups its 18 methods into membership administration, policy administration, policy introspection, and identity directory and access model. The method table gives every signature and the result and DTO tables describe every field; the inventory below adds source links.
Every method first requires the caller to hold a whole-tree Admin verdict on the reserved sys-auth-policy tree, so a non-administrator or anonymous caller receives the core LatticeAuthorizationDeniedException before anything is read or written. The exceptions a method can raise after that check are:
| Exception | Raised by | When |
|---|---|---|
LatticeTenantOwnedGroupException |
UpsertGroupAsync, RemoveGroupAsync |
The group id starts with the reserved t/ prefix. |
LatticeDirectoryValidationException |
UpsertGroupAsync, AddMemberAsync |
ValidationRequired is set, a real identity directory is active, and the id does not resolve or resolves to the wrong kind (fail-closed create validation). |
LatticeTenantGroupNestingException |
AddMemberAsync |
The edge would let a tenant group reach outside its tenant (Tenant groups). |
LatticeAppOwnedRuleException |
PutRuleAsync, RemoveRuleAsync |
The rule id is in the app-owned app: namespace. |
LatticeTenantOwnedRuleException |
PutRuleAsync |
The rule id is in the tenant-tier tenant: namespace. |
ArgumentException |
PutRuleAsync |
The policy store refuses the rule shape, or the scope is a tenant-wide sentinel tree. |
LatticeTenantAccessDeniedException |
ListRulesAsync |
AuthPageRequest.ActiveTenantOnly is set and the caller's active-tenant assertion is refused; the listing is never narrowed to a defaulted tenant. |
Every exception above except LatticeTenantAccessDeniedException derives from ArgumentException, which the gRPC binding maps to InvalidArgument; it maps the administrator-check denial (LatticeAuthorizationDeniedException, an UnauthorizedAccessException) and a refused tenant assertion to PermissionDenied.
Reading the admin audit trail
ILatticeAdminAuditLog is the operator reader over the durable admin audit trail (the reserved sys-admin-audit tree). It is a dedicated contract, not a member of ILatticeAuthAdmin, and it is gated the same way: the caller needs a whole-tree Admin verdict on sys-auth-policy, a refusal is recorded to the trail as a denied Read and surfaces as LatticeAuthorizationDeniedException, and nothing is read before the check passes.
ListAuditAsync(AdminAuditQuery query) returns one AdminAuditPage, newest first.
AdminAuditQuery member |
Meaning |
|---|---|
Scope |
One audit partition (cluster, t/{tenant}, or a tree id). Null reads every scope. |
From, To |
Inclusive lower and exclusive upper bounds on the record's timestamp. |
Actor |
Ordinal match on the acting subject id. |
Action, Outcome |
Exact match on LatticeAdminAuditAction / LatticeAdminAuditOutcome. |
PageSize, PageToken |
Page size (default 100, clamped to 1000) and the opaque NextPageToken of the previous page. A malformed token is an ArgumentException. |
Only this operator reader sees Pending rows: an intent whose call has not yet finalized or been reconciled, shown as in progress. The tenant reader, ILatticeTenantAuditLog in Orleans.Lattice.Api.TenantAdmin, never shows them. Before the first audited call the trail tree does not exist and the reader returns an empty page.
LatticeTenantOwnedGroupException
The ArgumentException the facade throws for a group id in the reserved t/ namespace, on creation and on removal. It implements the core ILatticeDomainFault and carries the refused GroupId; its public static Rejected(groupId, paramName) factory builds the creation refusal. Tenant groups are administered through ILatticeTenantDirectoryAdmin in Orleans.Lattice.Api.TenantAdmin.
Public declaration reference
The following inventory includes directly declared public members and overloads, enum values, record positional members, and the protected extension points of unsealed public classes. Inherited framework members and compiler-generated record equality helpers are not additional package operations. Each source link identifies the declaration that defines its signature.
Orleans.Lattice.Api.Auth.LatticeApiAuthOptions
Source (line 19).
public sealed class LatticeApiAuthOptions
public int MaxExplanationRules { get; set; }
Orleans.Lattice.Api.Auth.LatticeApiAuthServiceCollectionExtensions
Source (line 12).
public static class LatticeApiAuthServiceCollectionExtensions
public static ISiloBuilder AddLatticeAuthApi(this ISiloBuilder builder, Action<LatticeApiAuthOptions>? configure = null)
Orleans.Lattice.Api.Auth.LatticeTenantOwnedGroupException
Source (line 33).
public sealed class LatticeTenantOwnedGroupException : ArgumentException, ILatticeDomainFault
public string GroupId { get; }public LatticeTenantOwnedGroupException()public LatticeTenantOwnedGroupException(string message)public LatticeTenantOwnedGroupException(string message, Exception innerException)public static LatticeTenantOwnedGroupException Rejected(string groupId, string paramName)
Shared contract declaration reference
The following inventory includes directly declared public members and overloads, enum values, record positional members, and the protected extension points of unsealed public classes. Inherited framework members and compiler-generated record equality helpers are not additional package operations. Each source link identifies the declaration that defines its signature.
Orleans.Lattice.Api.Auth.ILatticeAuthAdmin
Source (line 34).
public interface ILatticeAuthAdmin
Task UpsertGroupAsync(AuthGroup group, CancellationToken cancellationToken = default)Task<AuthGroup?> GetGroupAsync(string groupId, CancellationToken cancellationToken = default)Task RemoveGroupAsync(string groupId, CancellationToken cancellationToken = default)Task<AuthGroupPage> ListGroupsAsync(AuthPageRequest request, CancellationToken cancellationToken = default)Task AddMemberAsync(string groupId, string memberId, MembershipMemberKind memberKind = MembershipMemberKind.User, CancellationToken cancellationToken = default)Task RemoveMemberAsync(string groupId, string memberId, CancellationToken cancellationToken = default)Task<IReadOnlyList<string>> ListGroupMembersAsync(string groupId, CancellationToken cancellationToken = default)Task<IReadOnlyList<string>> ListSubjectGroupsAsync(string memberId, CancellationToken cancellationToken = default)Task PutRuleAsync(LatticeAuthorizationRule rule, CancellationToken cancellationToken = default)Task<LatticeAuthorizationRule?> GetRuleAsync(string treeId, string ruleId, CancellationToken cancellationToken = default)Task<bool> RemoveRuleAsync(string treeId, string ruleId, CancellationToken cancellationToken = default)Task<AuthRulePage> ListRulesAsync(AuthPageRequest request, CancellationToken cancellationToken = default)Task<AuthRulePage> ListRulesForTreeAsync(string treeId, AuthPageRequest request, CancellationToken cancellationToken = default)Task<AuthExplanation> ExplainAsync(string subjectId, LatticeOperation operation, LatticeScope scope, LatticeSubjectSelectorKind subjectKind = LatticeSubjectSelectorKind.User, CancellationToken cancellationToken = default)Task<AuthEffectivePermissions> EffectivePermissionsAsync(string subjectId, LatticeSubjectSelectorKind subjectKind = LatticeSubjectSelectorKind.User, CancellationToken cancellationToken = default)Task<DirectorySearchResult> SearchDirectoryAsync(DirectorySearchRequest request, CancellationToken cancellationToken = default)Task<DirectoryPrincipalDescriptor?> ResolveDirectoryPrincipalAsync(string principalId, CancellationToken cancellationToken = default)Task<AccessModelDescriptor> GetAccessModelAsync(CancellationToken cancellationToken = default)
Orleans.Lattice.Api.Auth.ILatticeAdminAuditLog
Source (line 24).
public interface ILatticeAdminAuditLog
Task<AdminAuditPage> ListAuditAsync(AdminAuditQuery query, CancellationToken cancellationToken = default)
Orleans.Lattice.Api.Auth.AccessAuthenticationMode
Source (line 18).
public enum AccessAuthenticationMode
UnknownAnonymousClaimsBasic
Orleans.Lattice.Api.Auth.AccessModelDescriptor
Source (line 21).
public sealed record AccessModelDescriptor
public AccessAuthenticationMode AuthenticationMode { get; init; }public bool RulesEnforced { get; init; }public bool DirectoryAvailable { get; init; }public required string DirectoryProviderId { get; init; }public required string DirectoryExplanation { get; init; }public bool LocalMembershipEffective { get; init; }public bool AllTreesGrantsEnabled { get; init; }public bool AccessAdministrationDelegationEnabled { get; init; }public bool DelegatedTenantAccessAdministrationEnabled { get; init; }public bool DirectoryValidationRequired { get; init; }
Orleans.Lattice.Api.Auth.AdminAuditPage
Source (line 7).
public sealed record AdminAuditPage
public IReadOnlyList<LatticeAdminAuditRecord> Records { get; init; }public string? NextPageToken { get; init; }
Orleans.Lattice.Api.Auth.AdminAuditQuery
Source (line 14).
public sealed record AdminAuditQuery
public const int DefaultPageSizepublic const int MaxPageSizepublic int PageSize { get; init; }public string? PageToken { get; init; }public string? Scope { get; init; }public DateTimeOffset? From { get; init; }public DateTimeOffset? To { get; init; }public string? Actor { get; init; }public LatticeAdminAuditAction? Action { get; init; }public LatticeAdminAuditOutcome? Outcome { get; init; }public int EffectivePageSize
Orleans.Lattice.Api.Auth.ApiAuthTypeAliases
Source (line 16).
public static class ApiAuthTypeAliases
public const string AuthGrouppublic const string AuthPageRequestpublic const string AuthGroupPagepublic const string AuthRulePagepublic const string AuthExplanationpublic const string AuthEffectivePermissionspublic const string AuthPolicyPosturepublic const string DirectorySearchRequestpublic const string DirectorySearchResultpublic const string DirectoryPrincipalDescriptorpublic const string AccessModelDescriptorpublic const string AuthGroupRefpublic const string AuthMemberRefpublic const string AuthRuleRefpublic const string AuthMemberEdgepublic const string AuthPutRulepublic const string AuthTreeRulesPagepublic const string AuthExplainQuerypublic const string AuthSubjectRefpublic const string AuthAckpublic const string AuthGroupResultpublic const string AuthRuleResultpublic const string AuthStringListpublic const string AuthRuleRemovedpublic const string AuthPrincipalRefpublic const string AuthDirectoryPrincipalResultpublic const string AuthAccessModelQuerypublic const string AdminAuditQuerypublic const string AdminAuditPage
Orleans.Lattice.Api.Auth.AuthEffectivePermissions
Source (line 25).
public sealed record AuthEffectivePermissions
public required string SubjectId { get; init; }public IReadOnlyList<string> GroupIds { get; init; }public IReadOnlyList<LatticeAuthorizationRule> Rules { get; init; }public AuthPolicyPosture Posture { get; init; }public IReadOnlyList<TenantRuleLayer> RuleLayers { get; init; }
Orleans.Lattice.Api.Auth.AuthExplanation
Source (line 17).
public sealed record AuthExplanation
public required string SubjectId { get; init; }public IReadOnlyList<string> GroupIds { get; init; }public LatticeOperation Operation { get; init; }public required LatticeScope Scope { get; init; }public bool Allowed { get; init; }public bool Filtered { get; init; }public string? Reason { get; init; }public LatticeEffect DefaultEffect { get; init; }public IReadOnlyList<LatticeAuthorizationRule> MatchedRules { get; init; }public AuthPolicyPosture Posture { get; init; }public TenantRuleLayer? DecidingLayer { get; init; }public string? DecidingRuleId { get; init; }
Orleans.Lattice.Api.Auth.AuthGroup
Source (line 13).
public sealed record AuthGroup
public required string GroupId { get; init; }public string? DisplayName { get; init; }
Orleans.Lattice.Api.Auth.AuthGroupPage
Source (line 11).
public sealed record AuthGroupPage
public IReadOnlyList<AuthGroup> Entries { get; init; }public string? NextPageToken { get; init; }
Orleans.Lattice.Api.Auth.AuthPageRequest
Source (line 15).
public sealed record AuthPageRequest
public const int DefaultPageSizepublic const int MaxPageSizepublic int PageSize { get; init; }public string? PageToken { get; init; }public bool ActiveTenantOnly { get; init; }public bool IncludeTenantGroups { get; init; }public int EffectivePageSize
Orleans.Lattice.Api.Auth.AuthPolicyPosture
Source (line 21).
public sealed record AuthPolicyPosture
public bool AllTreesGrantsEnabled { get; init; }public bool AccessAdministrationDelegationEnabled { get; init; }
Orleans.Lattice.Api.Auth.AuthRulePage
Source (line 16).
public sealed record AuthRulePage
public IReadOnlyList<LatticeAuthorizationRule> Entries { get; init; }public string? NextPageToken { get; init; }public string? Tenant { get; init; }public IReadOnlyList<string?> TenantRuleTenants { get; init; }
Orleans.Lattice.Api.Auth.DirectoryPrincipalDescriptor
Source (line 17).
public sealed record DirectoryPrincipalDescriptor
public required string Id { get; init; }public required string DisplayName { get; init; }public DirectoryPrincipalKind Kind { get; init; }public IReadOnlyDictionary<string, string>? Claims { get; init; }
Orleans.Lattice.Api.Auth.DirectorySearchRequest
Source (line 15).
public sealed record DirectorySearchRequest
public string Term { get; init; }public DirectoryPrincipalKind? Kind { get; init; }public int PageSize { get; init; }public string? ContinuationToken { get; init; }
Orleans.Lattice.Api.Auth.DirectorySearchResult
Source (line 13).
public sealed record DirectorySearchResult
public IReadOnlyList<DirectoryPrincipalDescriptor> Principals { get; init; }public string? ContinuationToken { get; init; }public bool Available { get; init; }public static DirectorySearchResult Unavailable { get; }
Related
- Facade guide
- Configuration
- Architecture
Orleans.Lattice.Api.Auth.Grpcpublic API - the gRPC binding over this contract.Orleans.Lattice.Authpublic API - the rule model (LatticeAuthorizationRule,LatticeScope) this contract carries.