Skip to main content

Input/Output Schema

The Spring Boot SDK system uses a compatible input/output schema with the OPA Spring Boot SDK, which is documented here. To make the Spring Boot SDK system easier to use with the low-code policy editor, a slight variation of the Spring Boot SDK input schema is used where the most common HTTP headers are explicitly exposed, rather than defining the headers as an arbitrary map[string]string.

Input

ParameterTypeValueDescription
input.resource.typeStringendpointA constant describing the type of resource being accessed.
input.resource.idStringEndpoint servlet path
input.action.nameStringGET, POST, PUT, PATCH, HEAD, OPTIONS, TRACE, or DELETEHTTP request method
input.action.protocolStringHTTP protocol for request, e.g. HTTP 1.1
input.action.headers.authorizationStringHTTP authorization headerNot guaranteed to be present.
input.action.headers.acceptStringHTTP accept headerNot guaranteed to be present.
input.action.headers["accept-encoding"]StringHTTP accept-encoding headerNot guaranteed to be present.
input.action.headers["accept-language"]StringHTTP accept-language headerNot guaranteed to be present.
input.action.headers.connectionStringHTTP connection headerNot guaranteed to be present.
input.action.headers.cookieStringHTTP cookie headerNot guaranteed to be present.
input.action.headers.hostStringHTTP host headerNot guaranteed to be present.
input.action.headers.refererStringHTTP referer headerNot guaranteed to be present.
input.action.headers["user-agent"]StringHTTP user-agent headerNot guaranteed to be present.
input.context.typeStringhttpA constant describing the type of contextual information provided
input.context.hostStringHTTP remote host of request
input.context.ipStringHTTP remote IP of request
input.context.portStringHTTP remote port for request
input.context.dataMap[String, Any]Optional supplemental data you can inject using a ContextDataProvider implementation
input.subject.typeStringjava_authenticationA constant describing the kind of subject being provided.
input.subject.idStringSpring authN principalID representing the subject being authorized.
input.subject.detailsStringSpring authN details
input.subject.authoritiesStringSpring authN authorities

Output

ParameterTypeDescription
output.decisionBooleantrue if and only if the request should be allowed to proceed, else false
output.context.data.system_typeStringIndicates the DAS system type, e.g. template.springboot:0.0