diff options
| author | James Elliott <james-d-elliott@users.noreply.github.com> | 2022-10-19 14:09:22 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-19 14:09:22 +1100 |
| commit | 52102eea8c7379e0d34d9025ea72bebdcf639673 (patch) | |
| tree | 516fc8ed26f9a36d62a10e5a4cf22964e7120ded /internal/configuration/schema/access_control.go | |
| parent | 46ae5b2bf37d3854b6e230e8687672aa77c781d7 (diff) | |
feat(authorization): query parameter filtering (#3990)
This allows for advanced filtering of the query parameters in ACL's.
Closes #2708
Diffstat (limited to 'internal/configuration/schema/access_control.go')
| -rw-r--r-- | internal/configuration/schema/access_control.go | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/internal/configuration/schema/access_control.go b/internal/configuration/schema/access_control.go index 7b12fe129..79e1c93fa 100644 --- a/internal/configuration/schema/access_control.go +++ b/internal/configuration/schema/access_control.go @@ -19,13 +19,21 @@ type ACLNetwork struct { // ACLRule represents one ACL rule entry. type ACLRule struct { - Domains []string `koanf:"domain"` - DomainsRegex []regexp.Regexp `koanf:"domain_regex"` - Policy string `koanf:"policy"` - Subjects [][]string `koanf:"subject"` - Networks []string `koanf:"networks"` - Resources []regexp.Regexp `koanf:"resources"` - Methods []string `koanf:"methods"` + Domains []string `koanf:"domain"` + DomainsRegex []regexp.Regexp `koanf:"domain_regex"` + Policy string `koanf:"policy"` + Subjects [][]string `koanf:"subject"` + Networks []string `koanf:"networks"` + Resources []regexp.Regexp `koanf:"resources"` + Methods []string `koanf:"methods"` + Query [][]ACLQueryRule `koanf:"query"` +} + +// ACLQueryRule represents the ACL query criteria. +type ACLQueryRule struct { + Operator string `koanf:"operator"` + Key string `koanf:"key"` + Value any `koanf:"value"` } // DefaultACLNetwork represents the default configuration related to access control network group configuration. |
