ApacheDSContainer should allow a zero port #8144
Labels
in: ldap
An issue in spring-security-ldap
status: duplicate
A duplicate of another issue
type: enhancement
A general enhancement
ApacheDS's
TcpTransport
allows for a zero port, selecting any available port at startup. It does not correctly propagate that port up through the object graph, though.For example, giving a
TcpTransport
a port of zero:will result in a server that is listening on a random port, but
server.getPort()
still returns0
.Because ApacheDS has not had a GA release in many years, it's unlikely that this enhancement will get applied to the ApacheDS project.
Still, it would be nice if
ApacheDSContainer
could accept0
as a port value. One immediate benefit from this is reducing the likelihood of a port collision when multiple LDAP servers are started up simultaneously.For this to happen, the following test would need to pass:
It may be possible to post-process the
server
instance inApacheDSContainer#afterPropertiesSet
into a state where the selected port is correctly returned.Note that
UnboundIdContainerTests
has a test that would likely be good to port over intoApacheDSContainerTests
for testing this feature.The text was updated successfully, but these errors were encountered: