[Enhancement]: Add new module for OpenLDAP support (Testcontainers.Ldap)

Aperta
#1,464 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
csharp, docker
Ambito
devtools, testing

Direzione di ricerca

L’issue non indica file né test. Inizia esaminando le convenzioni esistenti dei moduli Testcontainers e gli entry point proposti LdapBuilder, GetLdapConnectionConfig e AddOrganization; il lavoro è completato quando è disponibile un modulo OpenLDAP pronto all’uso, con valori predefiniti sensati e un comportamento della configurazione validato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement module
Problem

Currently, Testcontainers for .NET does not provide any built-in support for LDAP services. Developers who need to test applications relying on directory services like OpenLDAP or Active Directory must manually configure containers using the generic TestcontainersBuilder.

In the past week, I implemented a custom LDAP test container from scratch for one of my projects. The process of loading and setting up the LDAP configuration was complicated and prone to bugs, especially for developers without deep knowledge of LDAP protocols and setup details. This increases maintenance overhead and reduces test reliability.

Solution

Initially, implement a basic configuration that provides a ready-to-use OpenLDAP container with default settings (admin user, password, domain, port mapping). Then, gradually develop the module to support configuring organizations, users, groups, and other LDAP entities internally within the container setup.

This approach aims to prevent increased maintenance overhead and reduce test reliability issues by hiding complex LDAP setup details from users and providing sensible defaults out-of-the-box.

var container = new LdapBuilder().Build();
await container.StartAsync();
var ldapConfig = container.GetLdapConnectionConfig();
container.AddOrganization("");
Benefit
  • Simplifies LDAP integration testing with a ready-to-use container.
  • Reduces setup time and errors for developers.
Alternatives
  • Use generic TestcontainersBuilder with manual LDAP setup.
  • Use in-memory or mock LDAP servers (less realistic).
Would you like to help contributing this enhancement?

Yes

Lingua principale
C#
Stelle
4.4k
Fork
366
Merge medio
2g 6h
PR unite (30g)
19

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di testcontainers/testcontainers-dotnet

Tutte le issue di testcontainers/testcontainers-dotnet

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.