Documentation ¶
Index ¶
Constants ¶
View Source
const ( URL = "url" AuthToken = "auth_token" EnvPolicyOpaURL = "MINIO_POLICY_OPA_URL" EnvPolicyOpaAuthToken = "MINIO_POLICY_OPA_AUTH_TOKEN" )
Env IAM OPA URL
View Source
const ( EnvIamOpaURL = "MINIO_IAM_OPA_URL" EnvIamOpaAuthToken = "MINIO_IAM_OPA_AUTHTOKEN" )
Legacy OPA envs
Variables ¶
View Source
var ( DefaultKVS = config.KVS{ config.State: config.StateOff, config.Comment: "This is a default OPA configuration", URL: "", AuthToken: "", } )
DefaultKVS - default config for OPA config
View Source
var ( Help = config.HelpKV{ URL: `Points to URL for OPA HTTP API endpoint. eg: "http://localhost:8181/v1/data/httpapi/authz/allow"`, AuthToken: "Authorization token for the OPA HTTP API endpoint (optional)", config.State: "Indicates if OPA policy is enabled or not", config.Comment: "A comment to describe the OPA policy setting", } )
Help template for OPA policy feature.
Functions ¶
func SetPolicyOPAConfig ¶
SetPolicyOPAConfig - One time migration code needed, for migrating from older config to new for PolicyOPAConfig.
Types ¶
type Args ¶
type Args struct { URL *xnet.URL `json:"url"` AuthToken string `json:"authToken"` Transport http.RoundTripper `json:"-"` CloseRespFn func(r io.ReadCloser) `json:"-"` }
Args opa general purpose policy engine configuration.
func LookupConfig ¶
func LookupConfig(kv config.KVS, transport *http.Transport, closeRespFn func(io.ReadCloser)) (Args, error)
LookupConfig lookup Opa from config, override with any ENVs.
func (*Args) UnmarshalJSON ¶
UnmarshalJSON - decodes JSON data.
Click to show internal directories.
Click to hide internal directories.