ldap

package
v0.0.0-...-8c2db74 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 12 Imported by: 5

Documentation

Overview

Package ldap provides an LDAP authentication service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewUserService

func NewUserService(opts CreationOpts) (gimlet.UserManager, error)

NewUserService constructs a userService. It requires a URL and Port to the LDAP server. It also requires a Path to user resources that can be passed to an LDAP query.

Types

type CreationOpts

type CreationOpts struct {
	URL          string // URL of the LDAP server
	Port         string // Port of the LDAP server
	UserPath     string // Path to users LDAP OU
	ServicePath  string // Path to service users LDAP OU
	UserGroup    string // LDAP userGroup to authorize users
	ServiceGroup string // LDAP serviceGroup to authorize services
	GroupOuName  string // name of the OU that lists a user's groups

	ServiceUserName     string // name of the service user for performing ismemberof
	ServiceUserPassword string // password for the service user
	ServiceUserPath     string // path to the service user

	UserCache usercache.Cache
	// Functions to produce a UserCache
	ExternalCache *usercache.ExternalOptions

	ConvertIDIn    func(old string) (new string)
	UnconvertIDOut func(new string) (old string)
	// contains filtered or unexported fields
}

CreationOpts are options to pass to the service constructor.

Jump to

Keyboard shortcuts

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