Documentation ¶
Index ¶
- Constants
- Variables
- func CompileFilter(filter string) (*ber.Packet, error)
- func DecompileFilter(packet *ber.Packet) (ret string, err error)
- func HandleAddRequest(req *ber.Packet, boundDN string, server *Server, conn net.Conn) error
- func HandleDeleteRequest(req *ber.Packet, boundDN string, server *Server, conn net.Conn) error
- func HandleExtendedRequest(req *ber.Packet, boundDN string, server *Server, conn net.Conn) (*ber.Packet, error)
- func HandleModifyDNRequest(req *ber.Packet, boundDN string, server *Server, conn net.Conn) error
- func HandleModifyRequest(req *ber.Packet, boundDN string, server *Server, conn net.Conn) error
- func HandlePasswordModifyExOp(req *ber.Packet, boundDN string, server *Server, conn net.Conn) (*ber.Packet, error)
- func HandleSearchRequest(req *ber.Packet, controls *[]ldap.Control, messageID int64, boundDN string, ...) (doneControls *[]ldap.Control, resultErr error)
- func Logger(l logr.Logger)
- func RegisterExtendedOperation(oid string, handler ExopHandler)
- type Adder
- type Binder
- type Closer
- type Deleter
- type ExopHandler
- type ExtendedRequest
- type LDAPResultCode
- func HandleBindRequest(req *ber.Packet, fns map[string]Binder, conn net.Conn) (resultCode LDAPResultCode)
- func ServerApplyFilter(f *ber.Packet, entry *ldap.Entry) (bool, LDAPResultCode)
- func ServerFilterAttributes(attributes []string, entry *ldap.Entry) (LDAPResultCode, error)
- func ServerFilterScope(baseDN string, scope int, entry *ldap.Entry) (bool, LDAPResultCode)
- type Modifier
- type PasswordUpdater
- type Renamer
- type Searcher
- type Server
- func (server *Server) AddFunc(baseDN string, f Adder)
- func (server *Server) BindFunc(baseDN string, f Binder)
- func (server *Server) CloseFunc(baseDN string, f Closer)
- func (server *Server) DeleteFunc(baseDN string, f Deleter)
- func (server *Server) GetStats() Stats
- func (server *Server) ListenAndServe(listenString string) error
- func (server *Server) ListenAndServeTLS(listenString string, certFile string, keyFile string) error
- func (server *Server) ModifyDNFunc(baseDN string, f Renamer)
- func (server *Server) ModifyFunc(baseDN string, f Modifier)
- func (server *Server) PasswordExOpFunc(baseDN string, f PasswordUpdater)
- func (server *Server) QuitChannel(quit chan bool)
- func (server *Server) SearchFunc(baseDN string, f Searcher)
- func (server *Server) Serve(ln net.Listener) error
- func (server *Server) SetStats(enable bool)
- type ServerSearchResult
- type Stats
Constants ¶
View Source
const ( FilterAnd = ldap.FilterAnd FilterOr = ldap.FilterOr FilterNot = ldap.FilterNot FilterEqualityMatch = ldap.FilterEqualityMatch FilterSubstrings = ldap.FilterSubstrings FilterGreaterOrEqual = ldap.FilterGreaterOrEqual FilterLessOrEqual = ldap.FilterLessOrEqual FilterPresent = ldap.FilterPresent FilterApproxMatch = ldap.FilterApproxMatch FilterExtensibleMatch = ldap.FilterExtensibleMatch )
View Source
const ( FilterSubstringsInitial = ldap.FilterSubstringsInitial FilterSubstringsAny = ldap.FilterSubstringsAny FilterSubstringsFinal = ldap.FilterSubstringsFinal )
View Source
const ( LDAPBindAuthSimple = 0 LDAPBindAuthSASL = 3 )
View Source
const ( TagReqIdentity = 0 TagReqOldPW = 1 TagReqNewPW = 2 TagRespGenPW = 0 )
Variables ¶
View Source
var (
FilterMap = ldap.FilterMap
)
Functions ¶
func HandleAddRequest ¶ added in v0.4.0
func HandleDeleteRequest ¶ added in v0.4.0
func HandleExtendedRequest ¶ added in v0.4.0
func HandleModifyDNRequest ¶ added in v0.5.0
func HandleModifyRequest ¶ added in v0.4.0
func HandlePasswordModifyExOp ¶ added in v0.4.0
func HandleSearchRequest ¶
func RegisterExtendedOperation ¶ added in v0.4.0
func RegisterExtendedOperation(oid string, handler ExopHandler)
Types ¶
type Adder ¶ added in v0.4.0
type Adder interface {
Add(boundDN string, req *ldap.AddRequest, conn net.Conn) (LDAPResultCode, error)
}
type Binder ¶
type Binder interface {
Bind(bindDN, bindSimplePw string, conn net.Conn) (LDAPResultCode, error)
}
type Deleter ¶ added in v0.4.0
type Deleter interface {
Delete(boundDN string, req *ldap.DelRequest, conn net.Conn) (LDAPResultCode, error)
}
type ExopHandler ¶ added in v0.4.0
type ExtendedRequest ¶ added in v0.4.0
type LDAPResultCode ¶
type LDAPResultCode uint8
func HandleBindRequest ¶
func ServerApplyFilter ¶
func ServerApplyFilter(f *ber.Packet, entry *ldap.Entry) (bool, LDAPResultCode)
func ServerFilterAttributes ¶
func ServerFilterAttributes(attributes []string, entry *ldap.Entry) (LDAPResultCode, error)
func ServerFilterScope ¶
func ServerFilterScope(baseDN string, scope int, entry *ldap.Entry) (bool, LDAPResultCode)
type Modifier ¶ added in v0.4.0
type Modifier interface {
Modify(boundDN string, req *ldap.ModifyRequest, conn net.Conn) (LDAPResultCode, error)
}
type PasswordUpdater ¶ added in v0.4.0
type PasswordUpdater interface {
ModifyPasswordExop(boundDN string, req *ldap.PasswordModifyRequest, conn net.Conn) (LDAPResultCode, error)
}
type Renamer ¶ added in v0.5.0
type Renamer interface {
ModifyDN(boundDN string, req *ldap.ModifyDNRequest, conn net.Conn) (LDAPResultCode, error)
}
type Searcher ¶
type Searcher interface {
Search(boundDN string, req *ldap.SearchRequest, conn net.Conn) (ServerSearchResult, error)
}
type Server ¶
type Server struct { AddFns map[string]Adder BindFns map[string]Binder DeleteFns map[string]Deleter ModifyFns map[string]Modifier ModifyDNFns map[string]Renamer PasswordExOpFns map[string]PasswordUpdater SearchFns map[string]Searcher CloseFns map[string]Closer Quit chan bool EnforceLDAP bool GeneratedPasswordLength int Stats *Stats }
func (*Server) DeleteFunc ¶ added in v0.4.0
func (*Server) ListenAndServe ¶
func (*Server) ListenAndServeTLS ¶
func (*Server) ModifyDNFunc ¶ added in v0.5.0
func (*Server) ModifyFunc ¶ added in v0.4.0
func (*Server) PasswordExOpFunc ¶ added in v0.4.0
func (server *Server) PasswordExOpFunc(baseDN string, f PasswordUpdater)
func (*Server) QuitChannel ¶
func (*Server) SearchFunc ¶
type ServerSearchResult ¶
type ServerSearchResult struct { Entries []*ldap.Entry Referrals []string Controls []ldap.Control ResultCode LDAPResultCode }
Click to show internal directories.
Click to hide internal directories.