ldap

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Copyright 2020 ForgeRock AS.

Package ldap provides ldap client access to our DS deployment. Used to manage users, etc.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DSConnection

type DSConnection struct {
	URL      string
	DN       string
	Password string

	Log logr.Logger
	// contains filtered or unexported fields
}

DSConnection parameters for managing the DS ldap service

func (*DSConnection) BindPassword added in v0.0.5

func (ds *DSConnection) BindPassword(DN, password string) error

BindPassword tries to bind as the DN with the password. This is used to test the password to see if we need to change it. Return nil if the password is OK, err otherwise

func (*DSConnection) Close

func (ds *DSConnection) Close()

Close the ldap connection

func (*DSConnection) Connect

func (ds *DSConnection) Connect() error

Connect to LDAP server via admin credentials

func (*DSConnection) DeleteBackupTask

func (ds *DSConnection) DeleteBackupTask(id string) error

DeleteBackupTask deletes a scheduled backup and purge tasks in DS. deletes the backup and the purge tasks in DS TODO: Check for Not found error code- which we can ignore and not consider an error

func (*DSConnection) GetBackupTask

func (ds *DSConnection) GetBackupTask(id string) (*dir.DirectoryBackup, error)

GetBackupTask reads the directory and gets the current state of the backup task.

func (*DSConnection) GetBackupTaskStatus

func (ds *DSConnection) GetBackupTaskStatus(id string) ([]dir.DirectoryBackupStatus, error)

GetBackupTaskStatus queries for the completed backup tasks for the given id

func (*DSConnection) GetMonitorData

func (ds *DSConnection) GetMonitorData() error

GetMonitorData returns cn=monitor data. We use thi for status updates. todo: What kinds of data do we want?

func (*DSConnection) ScheduleBackup

func (ds *DSConnection) ScheduleBackup(id string, d *dir.DirectoryBackup) error

ScheduleBackup - create or update a backup and purge tasks

func (*DSConnection) UpdatePassword

func (ds *DSConnection) UpdatePassword(DN, newPassword string) error

UpdatePassword changes the password for the user identified by the DN. This is done as an administrative password change The old password is not required.

Jump to

Keyboard shortcuts

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