AbacQueryPolicy

abstract class AbacQueryPolicy(val options: AbacQueryOptions = AbacQueryOptions.DEFAULT) : QueryPolicy

Resolves terminal snapshot access conditions using attribute-based access control (ABAC).

Principal tags from the current context are converted into query conditions and appended to snapshot queries. Other query models are unrestricted by this policy and do not resolve principal tags.

Matching rules

Principal tagsResource tagsResult
wildcard (["*"])anymatch
["a", "b"]["a"]match
["a", "b"]["c"]no match
anykey absentmatch (public resource)
no tagsanymatch

The last two rows are the defaults; AbacQueryOptions tightens each.

Constructors

Link copied to clipboard
constructor(options: AbacQueryOptions = AbacQueryOptions.DEFAULT)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open override fun evaluate(contextView: ContextView, context: QueryContext<*>): Mono<FilterExpression>

Resolves the ABAC condition for the current context.

Link copied to clipboard
abstract fun getPrincipalTags(contextView: ContextView, context: QueryContext<*>): Mono<AbacTags>

Resolves the principal's ABAC tags from the current context.