public static interface OpaBundle.OpaBuilder<C extends io.dropwizard.Configuration>
Modifier and Type | Method and Description |
---|---|
OpaBundle<C> |
build() |
<T> OpaBundle.OpaBuilder<C> |
withInputExtension(java.lang.String namespace,
OpaInputExtension<T> extension)
Register a custom
OpaInputExtension that enriches the default OpaInput with
custom properties that are sent to the Open Policy Agent. |
OpaBundle.OpaBuilder<C> |
withTracer(io.opentracing.Tracer tracer) |
<T> OpaBundle.OpaBuilder<C> withInputExtension(java.lang.String namespace, OpaInputExtension<T> extension)
OpaInputExtension
that enriches the default OpaInput
with
custom properties that are sent to the Open Policy Agent. Prefer authorization based on the
constraints
that are returned after
policy execution.
Please note that it is prohibited to override properties that are already set in the
original OpaInput
.
T
- the type of data that is added to the inputnamespace
- the namespace is used as property name that the input should be accessible
as in the OPA policyextension
- the extension to registerOpaBundle.HiddenOriginalPropertyException
- thrown if the namespace of an input extension
interferes with a property name of the original OpaInput
.OpaBundle.DuplicatePropertyException
- thrown if a namespace interferes with an already
registered extension.OpaBundle.OpaBuilder<C> withTracer(io.opentracing.Tracer tracer)