Package org.apache.polaris.extension.auth.opa.model
package org.apache.polaris.extension.auth.opa.model
OPA authorization input model classes.
This package contains immutable model classes that define the structure of authorization requests sent to Open Policy Agent (OPA). These classes serve as the single source of truth for the OPA input schema.
Schema Generation
The JSON Schema for these models can be generated using the
utility or by running the Gradle
task:
invalid reference
org.apache.polaris.extension.auth.opa.model.OpaSchemaGenerator
./gradlew :polaris-extensions-auth-opa:generateOpaSchema
This generates opa-input-schema.json which can be referenced in documentation and used
by OPA policy developers.
Model Structure
OpaRequest- Top-level request wrapperOpaAuthorizationInput- Authorization context containing actor, action, resource, and contextActor- Principal and rolesResource- Target and secondary resourcesResourceEntity- Individual resource with type, name, and parentsContext- Request metadata
-
InterfacesClassDescriptionRepresents the actor (principal) making an authorization request.Additional context information for the authorization request.OPA authorization input structure.OPA request wrapper containing the authorization input.Represents the resource(s) being accessed in an authorization request.Represents a single resource entity in the authorization context.