Skip to main content

HTTP Sink Configuration | Enterprise OPA

The HTTP decision log sink is a more generic version of the Service sink. It will send decision logs as payloads to an HTTP API.

note

The payload sent to the configured HTTP service is the same as it is in OPA.

Example Configuration

decision_logs:
plugin: eopa_dl
plugins:
eopa_dl:
output:
- type: http
url: https://mytenant.styra.com/v1/logs
retry:
period: 1s
max_attempts: 10
rate_limit:
count: 500
interval: 1s
FieldTypeRequiredDefaultDescription
output.urlstringYesURL of the HTTP API to send decision logs
output.timeoutstringNoTimeout (e.g. 10s)
output.headersObjectNoSee OPA service configuration documentation
output.oauth2ObjectNoSee OPA service configuration documentation
output.retryObjectNoSee Retry configuration
output.rate_limitObjectNoSee Rate Limit configuration
output.tlsObjectNoSee TLS configuration
output.batchingObjectNoSee Batching configuration
output.mask_decisionstringNoSee Mask and Drop decisions configuration
output.drop_decisionstringNoSee Mask and Drop decisions configuration

OAuth2

Enterprise OPA will authenticate using a bearer token obtained through the OAuth2 client credentials flow.

FieldTypeRequiredDefaultDescription
output.oauth2.enabledboolNoFalseEnables OAuth2 authentication
output.oauth2.token_urlstringYesSee OPA service configuration documentation
output.oauth2.client_keystringYesSee OPA service configuration documentation for client_id
output.oauth2.client_secretstringYesSee OPA service configuration documentation
output.oauth2.scopesArray of stringNoSee OPA service configuration documentation

Retry

These configurations allow you to control the underlying retry logic for Benthos.

FieldTypeRequiredDefaultDescription
output.retry.periodstringNoSee description"The base period to wait between failed requests"
output.retry.max_attemptsintNoSee description"The maximum number of retry attempts to make"
output.retry.max_backoffstringNoSee description"The maximum period to wait between failed requests"
output.retry.backoff_onArray of intNoSee description"A list of status codes whereby the request should be considered to have failed and retries should be attempted, but the period between them should be increased gradually.
output.retry.drop_onArray of intNoSee description"A list of status codes whereby the request should be considered to have failed but retries should not be attempted. This is useful for preventing wasted retries for requests that will never succeed. Note that with these status codes the request is dropped, but message that caused the request will not be dropped."
output.retry.successful_onArray of intNoSee description"A list of status codes whereby the attempt should be considered successful, this is useful for dropping requests that return non-2XX codes indicating that the message has been dealt with, such as a 303 See Other or a 409 Conflict. All 2XX codes are considered successful unless they are present within backoff_on or drop_on, regardless of this field."

Rate Limit

These configurations allow you to control the underlying rate limiting logic for Benthos.

FieldTypeRequiredDefaultDescription
output.rate_limit.countintNoMaximum requests per time period described in .interval
output.rate_limit.intervalstringNoThe interval over which requests are measured (e.g. 1s)

Example configuration to rate limit to 500 requests per second.

count: 500
interval: 1s