wanted

package
v0.0.0-...-b98bc68 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 24, 2024 License: PostgreSQL Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GrantRule

type GrantRule struct {
	Owner     pyfmt.Format
	Privilege pyfmt.Format
	Database  pyfmt.Format
	Schema    pyfmt.Format
	Object    pyfmt.Format
	To        pyfmt.Format `mapstructure:"role"`
}

func (GrantRule) Formats

func (r GrantRule) Formats() []pyfmt.Format

func (GrantRule) Generate

func (r GrantRule) Generate(results *ldap.Result, privileges privilege.RefMap) <-chan privilege.Grant

func (GrantRule) IsStatic

func (r GrantRule) IsStatic() bool

type MembershipRule

type MembershipRule struct {
	Name pyfmt.Format
}

func (MembershipRule) Generate

func (m MembershipRule) Generate(values map[string]string) role.Membership

func (MembershipRule) IsStatic

func (m MembershipRule) IsStatic() bool

func (MembershipRule) String

func (m MembershipRule) String() string

type RoleRule

type RoleRule struct {
	Name         pyfmt.Format
	Options      role.Options
	Comment      pyfmt.Format
	Parents      []MembershipRule
	Config       *role.Config
	BeforeCreate pyfmt.Format `mapstructure:"before_create"`
	AfterCreate  pyfmt.Format `mapstructure:"after_create"`
}

func (RoleRule) Formats

func (r RoleRule) Formats() []pyfmt.Format

func (RoleRule) Generate

func (r RoleRule) Generate(results *ldap.Result) <-chan role.Role

func (RoleRule) IsStatic

func (r RoleRule) IsStatic() bool

type Rules

type Rules []Step

Rules holds a set of rules to generate wanted state.

func (Rules) DropGrants

func (m Rules) DropGrants() (out Rules)

func (Rules) HasLDAPSearches

func (m Rules) HasLDAPSearches() bool

func (Rules) Run

func (m Rules) Run(blacklist lists.Blacklist, privileges privilege.RefMap) (roles role.Map, grants []privilege.Grant, err error)

func (Rules) SplitStaticRules

func (m Rules) SplitStaticRules() (newMap Rules)

type SearchResult

type SearchResult struct {
	// contains filtered or unexported fields
}

type Step

type Step struct {
	Description string
	LdapSearch  ldap.Search
	RoleRules   []RoleRule  `mapstructure:"roles"`
	GrantRules  []GrantRule `mapstructure:"grants"`
}

func (Step) HasLDAPSearch

func (s Step) HasLDAPSearch() bool

func (Step) HasSubsearch

func (s Step) HasSubsearch() bool

func (*Step) InferAttributes

func (s *Step) InferAttributes()

func (Step) IterFields

func (s Step) IterFields() <-chan *pyfmt.Field

Yields all {attr} from all formats in item.

func (*Step) ReplaceAttributeAsSubentryField

func (s *Step) ReplaceAttributeAsSubentryField()

func (Step) SplitStaticItems

func (s Step) SplitStaticItems() (items []Step)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL