Version: v1.0.5 Latest Latest

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

Go to latest
Published: Mar 31, 2022 License: MPL-2.0 Imports: 8 Imported by: 2




This section is empty.


This section is empty.


This section is empty.


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"`
	NotifyUsePgp   bool   `yaml:"notify_use_pgp"`
	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, usePgp bool) 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, usePgp bool) 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


Path Synopsis

Jump to

Keyboard shortcuts

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