Documentation
¶
Overview ¶
Package authmapping maps external group memberships to Dagu authorization.
Index ¶
Constants ¶
View Source
const ( // DefaultWorkspaceAccessAll grants the fallback role in every workspace. DefaultWorkspaceAccessAll = "all" // DefaultWorkspaceAccessNone grants no named workspaces on fallback. DefaultWorkspaceAccessNone = "none" )
Variables ¶
View Source
var ErrNoMatch = errors.New("no authorization mapping matched")
ErrNoMatch is returned when strict mapping finds no matching group.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
DefaultRole auth.Role
GroupMappings map[string]auth.Role
WorkspaceMappings map[string][]WorkspaceGrantConfig
DefaultWorkspaceAccess string
Strict bool
}
Config defines group-based authorization mapping.
type Mapper ¶
type Mapper struct {
// contains filtered or unexported fields
}
Mapper is an immutable, compiled group authorization mapper.
func (*Mapper) WorkspaceAccessPolicyActive ¶
WorkspaceAccessPolicyActive reports whether mapping controls workspace access.
type Result ¶
type Result struct {
Role auth.Role
WorkspaceAccess *auth.WorkspaceAccess
MatchCount int
}
Result is the authorization selected for a set of groups.
type WorkspaceGrantConfig ¶
WorkspaceGrantConfig maps a group membership to a role in one workspace.
Click to show internal directories.
Click to hide internal directories.