MCPcopy Index your code
hub / github.com/go-ldap/ldap

github.com/go-ldap/ldap @v3.4.13 sqlite

repository ↗ · DeepWiki ↗ · release v3.4.13 ↗
541 symbols 1,838 edges 43 files 315 documented · 58% 30 cross-repo links
README

GoDoc

Basic LDAP v3 functionality for the GO programming language.

The library implements the following specifications:

  • https://datatracker.ietf.org/doc/html/rfc4511 for basic operations
  • https://datatracker.ietf.org/doc/html/rfc3062 for password modify operation
  • https://datatracker.ietf.org/doc/html/rfc4514 for distinguished names parsing
  • https://datatracker.ietf.org/doc/html/rfc4533 for Content Synchronization Operation
  • https://datatracker.ietf.org/doc/html/draft-armijo-ldap-treedelete-02 for Tree Delete Control
  • https://datatracker.ietf.org/doc/html/rfc2891 for Server Side Sorting of Search Results
  • https://datatracker.ietf.org/doc/html/rfc4532 for WhoAmI requests

Features:

  • Connecting to LDAP server (non-TLS, TLS, STARTTLS, through a custom dialer)
  • Bind Requests / Responses (Simple Bind, GSSAPI, SASL)
  • "Who Am I" Requests / Responses
  • Search Requests / Responses (normal, paging and asynchronous)
  • Modify Requests / Responses
  • Add Requests / Responses
  • Delete Requests / Responses
  • Modify DN Requests / Responses
  • Unbind Requests / Responses
  • Password Modify Requests / Responses
  • Content Synchronization Requests / Responses
  • LDAPv3 Filter Compile / Decompile
  • Server Side Sorting of Search Results
  • LDAPv3 Extended Operations
  • LDAPv3 Control Support

Go Modules:

go get github.com/go-ldap/ldap/v3

Contributing:

Bug reports and pull requests are welcome!

Before submitting a pull request, please make sure tests and verification scripts pass:

# Setup local directory server using Docker or Podman
make local-server

# Run gofmt, go vet and go test
cd ./v3
make -f ../Makefile

# (Optionally) Stop and delete the directory server container afterwards
cd ..
make stop-local-server

The Go gopher was designed by Renee French. (http://reneefrench.blogspot.com/) The design is licensed under the Creative Commons 3.0 Attributions license. Read this article for more details: http://blog.golang.org/gopher

Extension points exported contracts — how you extend this code

Control (Interface)
Control defines an interface controls provide to encode and describe themselves [18 implementers]
v3/control.go
GSSAPIClient (Interface)
GSSAPIClient interface is used as the client-side implementation for the GSSAPI SASL mechanism. Interface inspired by GS [2 …
v3/bind.go
Response (Interface)
Response defines an interface to get data from an LDAP server [1 implementers]
v3/response.go
Client (Interface)
Client knows how to interact with an LDAP server [1 implementers]
v3/client.go
DialOpt (FuncType)
DialOpt configures DialContext.
v3/conn.go
NTLMNegotiator (Interface)
NTLMNegotiator is an abstraction of an NTLM implementation that produces and processes NTLM binary tokens.
v3/bind.go

Core symbols most depended-on inside this repo

Encode
called by 106
v3/control.go
Printf
called by 54
v3/debug.go
NewError
called by 50
v3/error.go
Close
called by 49
v3/client.go
DialURL
called by 38
v3/conn.go
Error
called by 35
v3/error.go
String
called by 32
v3/control.go
Equal
called by 28
v3/dn.go

Shape

Method 253
Function 201
Struct 73
Interface 6
TypeAlias 6
FuncType 2

Languages

Go100%

Modules by API surface

v3/control.go114 symbols
v3/bind.go38 symbols
v3/search.go36 symbols
v3/conn.go33 symbols
v3/client.go28 symbols
v3/dn.go25 symbols
v3/conn_test.go22 symbols
v3/control_test.go21 symbols
v3/ldap_test.go19 symbols
v3/examples_test.go18 symbols
v3/error_test.go17 symbols
v3/modify.go15 symbols

Dependencies from manifests, versioned

github.com/Azure/go-ntlmsspv0.1.0 · 1×
github.com/alexbrainman/sspiv0.0.0-2025091915055 · 1×
github.com/go-asn1-ber/asn1-berv1.5.8-0.20250403174 · 1×
github.com/hashicorp/go-uuidv1.0.3 · 1×
github.com/jcmturner/aescts/v2v2.0.0 · 1×
github.com/jcmturner/dnsutils/v2v2.0.0 · 1×
github.com/jcmturner/goforkv1.7.6 · 1×
github.com/jcmturner/goidentity/v6v6.0.1 · 1×
github.com/jcmturner/gokrb5/v8v8.4.4 · 1×
github.com/jcmturner/rpc/v2v2.0.3 · 1×

For agents

$ claude mcp add ldap \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact