Documentation
¶
Index ¶
Constants ¶
View Source
const ( MethodGet = http.MethodGet MethodPost = http.MethodPost MethodPut = http.MethodPut MethodPatch = http.MethodPatch MethodDelete = http.MethodDelete )
View Source
const UpdateKey = "opa_bundle"
Variables ¶
View Source
var AllMethods = []string{MethodGet, MethodPost, MethodPut, MethodPatch, MethodDelete}
Functions ¶
func GenerateOPABundle ¶
func GenerateOPABundle() error
func GetRevision ¶
func GetRevision() string
func NewBundleController ¶
func NewBundleController() *controller
func RefreshOPABundle ¶
func RefreshOPABundle()
Types ¶
type Attributes ¶ added in v1.7.1
type Attributes []*Attribute
func NewFrom ¶ added in v1.10.0
func NewFrom(attrs []models.MatchAttribute) Attributes
func (Attributes) LessOrEqual ¶ added in v1.7.1
func (a Attributes) LessOrEqual(other Attributes) bool
type Config ¶ added in v1.7.1
type Config struct {
Bundles []*ResourceBundleService `json:"bundles"`
Namespace string `json:"namespace"`
}
type ExemptionURLs ¶ added in v1.12.0
type ExemptionURLs struct {
Public Rules `json:"public"` // public urls are not controlled by AuthN and AuthZ
Privileged Rules `json:"privileged"` // privileged urls can only be visited by system admins
Registered Rules `json:"registered"` // registered urls are the entire list of urls which are controlled by AuthZ, which means that if an url is not in this list, it is not controlled by AuthZ
}
type ResourceBundle ¶ added in v1.7.1
type ResourceBundle map[string]resources
func AppendOPAResources ¶ added in v1.7.1
func AppendOPAResources(res ResourceBundle, resourceType string, objs []*ResourceSpec) ResourceBundle
func (ResourceBundle) MarshalJSON ¶ added in v1.7.1
func (r ResourceBundle) MarshalJSON() ([]byte, error)
type ResourceBundleService ¶ added in v1.7.1
type ResourceSpec ¶ added in v1.7.1
type Rule ¶ added in v1.12.0
type Rule struct {
Method string `json:"method"`
Endpoint string `json:"endpoint"`
ResourceType string `json:"resourceType,omitempty"`
IDRegex string `json:"idRegex,omitempty"`
MatchAttributes Attributes `json:"matchAttributes,omitempty"`
MatchExpressions []expression `json:"matchExpressions,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.