Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSConfiguration

type AWSConfiguration struct {
	BaseConfiguration `yaml:",inline"`
	AccountName       string   `yaml:"account_name"`
	IgnoreUsernames   []string `yaml:"ignore_usernames"`
	Credentials       struct {
		AccessKey string `yaml:"access_key"`
		SecretKey string `yaml:"secret_key"`
		RoleARN   string `yaml:"role_arn"`
	} `yaml:"credentials"`
	GroupMappings []GroupMapping `yaml:"group_mapping"`
}

func (*AWSConfiguration) Validate

func (c *AWSConfiguration) Validate() error

type AuthorizedKeysConfiguration

type AuthorizedKeysConfiguration struct {
	BaseConfiguration `yaml:",inline"`
	Name              string   `yaml:"name"`
	LdapGroups        []string `yaml:"ldap_groups"`
	Path              string   `yaml:"path"`
}

type BaseConfiguration

type BaseConfiguration struct {
	NotifyNewUsers bool   `yaml:"notify_new_users"`
	UsernameMap    []Umap `yaml:"username_map" json:"username_map"`
}

type BaseModule

type BaseModule struct {
	Notifications *notifications.Config `yaml:"notifications"`
	PersonClient  *person_api.Client
}

func (*BaseModule) LDAPUsernameToLocalUsername

func (bm *BaseModule) LDAPUsernameToLocalUsername(ldapUsername string, usernameMap []Umap) string

func (*BaseModule) Notify

func (bm *BaseModule) Notify(username, body string, person *person_api.Person) error

type Configuration

type Configuration interface{}

type GroupMapping

type GroupMapping struct {
	LdapGroup string   `yaml:"ldap_group"`
	IamGroups []string `yaml:"iam_groups"`
	Default   bool     `yaml:"default"`
}

type Module

type Module interface {
	NewFromInterface(config Configuration, notificationsConfig notifications.Config, personClient *person_api.Client) Module
	Create(username string, person *person_api.Person) error
	Reset(username string, person *person_api.Person) error
	Delete(username string) error
	Sync() error
	Verify() error
	Notify(username, body string, person *person_api.Person) error
	LDAPUsernameToLocalUsername(ldapUsername string, usernameMap []Umap) string
	ModuleName() string
}

type Umap

type Umap struct {
	LdapUsername  string `yaml:"ldap_username" json:"ldap_username"`
	LocalUsername string `yaml:"local_username" json:"local_username"`
}

Source Files

Directories

Path Synopsis