2019-04-25 04:52:08 +07:00
|
|
|
package schema
|
|
|
|
|
2021-01-04 17:55:23 +07:00
|
|
|
// AccessControlConfiguration represents the configuration related to ACLs.
|
|
|
|
type AccessControlConfiguration struct {
|
|
|
|
DefaultPolicy string `mapstructure:"default_policy"`
|
|
|
|
Networks []ACLNetwork `mapstructure:"networks"`
|
|
|
|
Rules []ACLRule `mapstructure:"rules"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// ACLNetwork represents one ACL network group entry; "weak" coerces a single value into slice.
|
|
|
|
type ACLNetwork struct {
|
|
|
|
Name []string `mapstructure:"name,weak"`
|
|
|
|
Networks []string `mapstructure:"networks"`
|
|
|
|
}
|
2019-04-25 04:52:08 +07:00
|
|
|
|
2020-06-25 15:22:42 +07:00
|
|
|
// ACLRule represents one ACL rule entry; "weak" coerces a single value into slice.
|
2019-04-25 04:52:08 +07:00
|
|
|
type ACLRule struct {
|
2020-06-25 15:22:42 +07:00
|
|
|
Domains []string `mapstructure:"domain,weak"`
|
|
|
|
Policy string `mapstructure:"policy"`
|
|
|
|
Subjects [][]string `mapstructure:"subject,weak"`
|
|
|
|
Networks []string `mapstructure:"networks"`
|
|
|
|
Resources []string `mapstructure:"resources"`
|
2019-04-25 04:52:08 +07:00
|
|
|
}
|