ldapuserinfo

package
v0.0.0-...-4b8d076 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2019 License: Apache-2.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

View Source
const (
	UserServiceAccount  userinfo.AccountType = 1
	GroupServiceAccount userinfo.AccountType = 2
)
View Source
const HomeDirectory = "/home/"
View Source
const LoginShell = "/bin/bash"

Variables

This section is empty.

Functions

func FindLockAccountsinTargetLdap

func FindLockAccountsinTargetLdap(TargetLDAPUsers map[string]string, LockedAccountsSourceLDAP []string) ([]string, error)

find out which accounts need to be locked in Target ldaputil(i.e. which accounts needs attribute nsaccountLock=True) --required

Types

type UserInfoLDAPSource

type UserInfoLDAPSource struct {
	BindUsername          string `yaml:"bind_username"`
	BindPassword          string `yaml:"bind_password"`
	LDAPTargetURLs        string `yaml:"ldap_target_urls"`
	UserSearchBaseDNs     string `yaml:"user_search_base_dns"`
	UserSearchFilter      string `yaml:"user_search_filter"`
	GroupSearchBaseDNs    string `yaml:"group_search_base_dns"`
	GroupSearchFilter     string `yaml:"group_search_filter"`
	AdminGroup            string `yaml:"admin_group"`
	ServiceAccountBaseDNs string `yaml:"service_search_base_dns"`
	MainBaseDN            string `yaml:"Main_base_dns"`
	GroupManageAttribute  string `yaml:"group_Manage_Attribute"`
	SearchAttribute       string `yaml:"searchAttribute"`

	RootCAs *x509.CertPool
	// contains filtered or unexported fields
}

func (*UserInfoLDAPSource) AddmemberstoExisting

func (u *UserInfoLDAPSource) AddmemberstoExisting(groupinfo userinfo.GroupInfo) error

adding members to existing group

func (*UserInfoLDAPSource) ChangeDescription

func (u *UserInfoLDAPSource) ChangeDescription(groupname string, managegroup string) error

Change group description --required

func (*UserInfoLDAPSource) CreateGroup

func (u *UserInfoLDAPSource) CreateGroup(groupinfo userinfo.GroupInfo) error

Creating a Group --required

func (*UserInfoLDAPSource) CreateServiceAccount

func (u *UserInfoLDAPSource) CreateServiceAccount(groupinfo userinfo.GroupInfo) error

func (*UserInfoLDAPSource) CreateUser

func (u *UserInfoLDAPSource) CreateUser(username string, givenName, email []string) error

func (*UserInfoLDAPSource) DeleteGroup

func (u *UserInfoLDAPSource) DeleteGroup(groupnames []string) error

deleting a Group from target ldaputil. --required

func (*UserInfoLDAPSource) DeletemembersfromGroup

func (u *UserInfoLDAPSource) DeletemembersfromGroup(groupinfo userinfo.GroupInfo) error

remove members from existing group

func (*UserInfoLDAPSource) DisableaccountsinLdap

func (u *UserInfoLDAPSource) DisableaccountsinLdap(result []string) error

function which compares the users disabled accounts in Source LDAP and Target LDAP and adds the attribute nsaccountLock in TARGET LDAP for the disbaled USer. ---required

func (*UserInfoLDAPSource) GetAllGroupsManagedBy

func (u *UserInfoLDAPSource) GetAllGroupsManagedBy() ([][]string, error)

func (*UserInfoLDAPSource) GetDescriptionvalue

func (u *UserInfoLDAPSource) GetDescriptionvalue(groupname string) (string, error)

get description of a group

func (*UserInfoLDAPSource) GetEmailofauser

func (u *UserInfoLDAPSource) GetEmailofauser(username string) ([]string, error)

get email of a user

func (*UserInfoLDAPSource) GetEmailofusersingroup

func (u *UserInfoLDAPSource) GetEmailofusersingroup(groupname string) ([]string, error)

get email of all users in the given group

func (*UserInfoLDAPSource) GetGroupUsersAndManagers

func (u *UserInfoLDAPSource) GetGroupUsersAndManagers(groupname string) ([]string, []string, string, error)

This might become unndded if we can get connection reuse.

func (*UserInfoLDAPSource) GetGroupandManagedbyAttributeValue

func (u *UserInfoLDAPSource) GetGroupandManagedbyAttributeValue(groupnames []string) ([][]string, error)

func (*UserInfoLDAPSource) GetGroupsInfoOfUser

func (u *UserInfoLDAPSource) GetGroupsInfoOfUser(groupdn string, username string) ([][]string, error)

func (*UserInfoLDAPSource) GetUserAttributes

func (u *UserInfoLDAPSource) GetUserAttributes(username string) ([]string, []string, error)

func (*UserInfoLDAPSource) GetallGroups

func (u *UserInfoLDAPSource) GetallGroups() ([]string, error)

func (*UserInfoLDAPSource) GetallUsers

func (u *UserInfoLDAPSource) GetallUsers() ([]string, error)

func (*UserInfoLDAPSource) GetgroupsofUser

func (u *UserInfoLDAPSource) GetgroupsofUser(username string) ([]string, error)

GetGroupsOfUser returns the all groups of a user. --required

func (*UserInfoLDAPSource) GetusersofaGroup

func (u *UserInfoLDAPSource) GetusersofaGroup(groupname string) ([]string, string, error)

returns all the users of a group --required

func (*UserInfoLDAPSource) GroupnameExistsornot

func (u *UserInfoLDAPSource) GroupnameExistsornot(groupname string) (bool, string, error)

func (*UserInfoLDAPSource) IsgroupAdminorNot

func (u *UserInfoLDAPSource) IsgroupAdminorNot(username string, groupname string) (bool, error)

func (*UserInfoLDAPSource) IsgroupmemberorNot

func (u *UserInfoLDAPSource) IsgroupmemberorNot(groupname string, username string) (bool, string, error)

if user is already a member of group or not

func (*UserInfoLDAPSource) ServiceAccountExistsornot

func (u *UserInfoLDAPSource) ServiceAccountExistsornot(groupname string) (bool, string, error)

func (*UserInfoLDAPSource) UserisadminOrNot

func (u *UserInfoLDAPSource) UserisadminOrNot(username string) bool

if user is super admin or not

func (*UserInfoLDAPSource) UsernameExistsornot

func (u *UserInfoLDAPSource) UsernameExistsornot(username string) (bool, error)

Jump to

Keyboard shortcuts

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