Interface OpaBundle.OpaBuilder<C extends io.dropwizard.Configuration>

    • Method Detail

      • withInputExtension

        <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. 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.

        Type Parameters:
        T - the type of data that is added to the input
        Parameters:
        namespace - the namespace is used as property name that the input should be accessible as in the OPA policy
        extension - the extension to register
        Returns:
        the builder
        Throws:
        OpaBundle.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.
      • withOpenTelemetry

        OpaBundle.OpaBuilder<C> withOpenTelemetry​(io.opentelemetry.api.OpenTelemetry openTelemetry)