mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
9ca0e940da
* adds validation to ACL's * adds a new networks section that can be used as aliases in other sections (currently access_control)
24 lines
870 B
Go
24 lines
870 B
Go
package schema
|
|
|
|
// 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"`
|
|
}
|
|
|
|
// ACLRule represents one ACL rule entry; "weak" coerces a single value into slice.
|
|
type ACLRule struct {
|
|
Domains []string `mapstructure:"domain,weak"`
|
|
Policy string `mapstructure:"policy"`
|
|
Subjects [][]string `mapstructure:"subject,weak"`
|
|
Networks []string `mapstructure:"networks"`
|
|
Resources []string `mapstructure:"resources"`
|
|
}
|