Skip to main content

RtDataSecurityQueryFilter

Namespace: Meshmakers.Octo.Runtime.Contracts.DataPermissions

A caller-specific, tenant-global read filter derived from the policy table (AB#4973). All type ids are runtime full names ("Model/Type"), expanded to concrete derived types, so the filter applies uniformly to any entity row — root queries, association stages and navigation lookups: a row passes when its type is unprotected, allowed, or owned-only and created by the caller.

public record RtDataSecurityQueryFilter : IEquatable<RtDataSecurityQueryFilter>

Inheritance ObjectRtDataSecurityQueryFilter
Implements IEquatable<RtDataSecurityQueryFilter>

Properties

ProtectedCkTypeIds

All concrete type ids any enforcing policy protects

public IReadOnlyCollection<string> ProtectedCkTypeIds { get; set; }

Property Value

IReadOnlyCollection<String>

AllowedCkTypeIds

Protected types the caller may fully read

public IReadOnlyCollection<string> AllowedCkTypeIds { get; set; }

Property Value

IReadOnlyCollection<String>

OwnedOnlyCkTypeIds

Protected types the caller may read own entities of

public IReadOnlyCollection<string> OwnedOnlyCkTypeIds { get; set; }

Property Value

IReadOnlyCollection<String>

SubjectId

Subject id for the owned-only predicate

public string SubjectId { get; set; }

Property Value

String

AuditDeniedCkTypeIds

Types where only AuditOnly policies would restrict the caller — access stays open, but reads should be logged as would-be violations

public IReadOnlyCollection<string> AuditDeniedCkTypeIds { get; set; }

Property Value

IReadOnlyCollection<String>

OwnedOnlyOwnerAttributes

Per owned-only type the CK-model-declared owner attribute path (AB#4978). Types without an entry use the default ownership predicate (server-stamped rtCreatedBy); types with an entry compare the value at the String-terminated path (Record segments allowed) against .

public IReadOnlyDictionary<string, string> OwnedOnlyOwnerAttributes { get; set; }

Property Value

IReadOnlyDictionary<String, String>

HasEnforcement

True when the filter restricts anything (at least one enforcing policy exists).

public bool HasEnforcement { get; }

Property Value

Boolean

Constructors

RtDataSecurityQueryFilter(IReadOnlyCollection<String>, IReadOnlyCollection<String>, IReadOnlyCollection<String>, String, IReadOnlyCollection<String>, IReadOnlyDictionary<String, String>)

A caller-specific, tenant-global read filter derived from the policy table (AB#4973). All type ids are runtime full names ("Model/Type"), expanded to concrete derived types, so the filter applies uniformly to any entity row — root queries, association stages and navigation lookups: a row passes when its type is unprotected, allowed, or owned-only and created by the caller.

public RtDataSecurityQueryFilter(IReadOnlyCollection<string> ProtectedCkTypeIds, IReadOnlyCollection<string> AllowedCkTypeIds, IReadOnlyCollection<string> OwnedOnlyCkTypeIds, string SubjectId, IReadOnlyCollection<string> AuditDeniedCkTypeIds, IReadOnlyDictionary<string, string> OwnedOnlyOwnerAttributes)

Parameters

ProtectedCkTypeIds IReadOnlyCollection<String>
All concrete type ids any enforcing policy protects

AllowedCkTypeIds IReadOnlyCollection<String>
Protected types the caller may fully read

OwnedOnlyCkTypeIds IReadOnlyCollection<String>
Protected types the caller may read own entities of

SubjectId String
Subject id for the owned-only predicate

AuditDeniedCkTypeIds IReadOnlyCollection<String>
Types where only AuditOnly policies would restrict the caller — access stays open, but reads should be logged as would-be violations

OwnedOnlyOwnerAttributes IReadOnlyDictionary<String, String>
Per owned-only type the CK-model-declared owner attribute path (AB#4978). Types without an entry use the default ownership predicate (server-stamped rtCreatedBy); types with an entry compare the value at the String-terminated path (Record segments allowed) against .

Methods

ComputeCacheSegment()

Stable string for the query-result-cache key. Callers with the same allowed/owned type sets share cache entries; the subject only participates when an owned-only predicate is present.

public string ComputeCacheSegment()

Returns

String