Class OpaOptions
Configuration options for the OPA HTTP authorization adapter.
public sealed class OpaOptions
- Inheritance
-
OpaOptions
- Inherited Members
Properties
Endpoint
Gets or sets the base URL of the OPA server (e.g., http://localhost:8181).
[Required]
public string Endpoint { get; set; }
Property Value
- string
The OPA server endpoint URL.
FailClosed
Gets or sets a value indicating whether authorization should deny on OPA errors (fail-closed). When true, HTTP errors, timeouts, and malformed responses result in denial. When false, errors result in permit (fail-open).
public bool FailClosed { get; set; }
Property Value
PolicyPath
Gets or sets the OPA policy document path to query (e.g., v1/data/authz/allow).
[Required]
public string PolicyPath { get; set; }
Property Value
- string
The policy path relative to the OPA server root.
TimeoutMs
Gets or sets the HTTP request timeout in milliseconds.
[Range(100, 60000)]
public int TimeoutMs { get; set; }
Property Value
- int
The timeout in milliseconds. Defaults to 5000.