AbacTags

ABAC tags grouped by key.

Each key can contain multiple values.

Examples:

// A user in two departments with an administrator role.
mapOf(
"dept" to listOf("eng", "pm"),
"role" to listOf("admin")
)

// A document available only to the engineering department.
mapOf(
"dept" to listOf("eng")
)

// No tags represents a public resource.
emptyMap()

Empty values:

  • A blank key is invalid.

  • An empty value list represents no tag for that key.

  • Filter invalid entries when constructing tags:

tags.filter { it.key.isNotBlank() && it.value.isNotEmpty() }

Wildcard:

  • ["*"] matches every value for a key. For example, mapOf("dept" to listOf("*")) matches resources from every department.