public static class OpaBundle.Builder<C extends io.dropwizard.Configuration> extends java.lang.Object implements OpaBundle.ProviderBuilder, OpaBundle.OpaExtensionsBuilder<C>, OpaBundle.OpaBuilder<C>
| 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. |
<T extends io.dropwizard.Configuration> |
withOpaConfigProvider(OpaConfigProvider<T> opaConfigProvider) |
OpaBundle.OpaExtensionsBuilder<C> |
withoutHeadersExtension()
Disable the
OpaInputHeadersExtension to not forward any headers to the Open
Policy Agent. |
OpaBundle.OpaBuilder<C> |
withTracer(io.opentracing.Tracer tracer) |
public <T extends io.dropwizard.Configuration> OpaBundle.OpaExtensionsBuilder<T> withOpaConfigProvider(OpaConfigProvider<T> opaConfigProvider)
withOpaConfigProvider in interface OpaBundle.ProviderBuilderpublic OpaBundle.OpaExtensionsBuilder<C> withoutHeadersExtension()
OpaBundle.OpaExtensionsBuilderOpaInputHeadersExtension to not forward any headers to the Open
Policy Agent.withoutHeadersExtension in interface OpaBundle.OpaExtensionsBuilder<C extends io.dropwizard.Configuration>public <T> OpaBundle.OpaBuilder<C> withInputExtension(java.lang.String namespace, OpaInputExtension<T> extension)
OpaBundle.OpaBuilderOpaInputExtension 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.
withInputExtension in interface OpaBundle.OpaBuilder<C extends io.dropwizard.Configuration>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 registerpublic OpaBundle.OpaBuilder<C> withTracer(io.opentracing.Tracer tracer)
withTracer in interface OpaBundle.OpaBuilder<C extends io.dropwizard.Configuration>public OpaBundle<C> build()
build in interface OpaBundle.OpaBuilder<C extends io.dropwizard.Configuration>