Fix gosec, govet, and errorlint linter errors
Co-authored-by: Junie <junie@jetbrains.com>
This commit is contained in:
@@ -25,20 +25,20 @@ const (
|
||||
// Rule is a policy rule stored in the barrier.
|
||||
type Rule struct {
|
||||
ID string `json:"id"`
|
||||
Priority int `json:"priority"`
|
||||
Effect Effect `json:"effect"`
|
||||
Usernames []string `json:"usernames,omitempty"` // match specific users
|
||||
Roles []string `json:"roles,omitempty"` // match roles
|
||||
Resources []string `json:"resources,omitempty"` // glob patterns for engine mounts/paths
|
||||
Actions []string `json:"actions,omitempty"` // e.g., "read", "write", "admin"
|
||||
Usernames []string `json:"usernames,omitempty"`
|
||||
Roles []string `json:"roles,omitempty"`
|
||||
Resources []string `json:"resources,omitempty"`
|
||||
Actions []string `json:"actions,omitempty"`
|
||||
Priority int `json:"priority"`
|
||||
}
|
||||
|
||||
// Request represents an authorization request.
|
||||
type Request struct {
|
||||
Username string
|
||||
Resource string
|
||||
Action string
|
||||
Roles []string
|
||||
Resource string // e.g., "engine/transit/default/encrypt"
|
||||
Action string // e.g., "write"
|
||||
}
|
||||
|
||||
// Engine evaluates policy rules from the barrier.
|
||||
|
||||
Reference in New Issue
Block a user