Documentation ¶
Overview ¶
Package authz provides simple rule-based authorization that can be used to implement access control
Index ¶
Constants ¶
View Source
const GroupAnonymous = "anonymous"
GroupAnonymous is the group name for unauthenticated users
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Claims ¶ added in v1.3.0
type Claims struct { Username string Groups []string Roles []string ClientID string // for tokens issued as part of client credentials grant // Status is the message given when token is not validated Status string }
Claims are the profile attributes of user/client that are part of the JWT claims
type Conf ¶
type Conf struct { // Enabled toggles authorization Enabled bool `json:"enabled"` // Authorization rules Rules Rules `json:"rules"` }
Authorization struct
type Rule ¶
type Rule struct { Paths []string `json:"paths"` Methods []string `json:"methods"` Users []string `json:"users"` Groups []string `json:"groups"` Roles []string `json:"roles"` Clients []string `json:"clients"` ExcludePathSubstrtings []string `json:"excludePathSubstrings"` // Deprecated. Use Paths instead. Resources []string `json:"resources"` // Deprecated. Use ExcludePathSubstrtings instead. DenyPathSubstrtings []string `json:"denyPathSubstrings"` }
Authorization rule
Click to show internal directories.
Click to hide internal directories.