-
Notifications
You must be signed in to change notification settings - Fork 6k
ApacheDSContainer should allow a zero port #8144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
in: ldap
An issue in spring-security-ldap
status: duplicate
A duplicate of another issue
type: enhancement
A general enhancement
Comments
Perhaps we can add another accessor on 'ApacheDsContsiner' that would be be used for getting the local port vs configured port? |
That could be nice, yes. I think it should be |
I can take this task. |
Thanks, @evgeniycheban! It's yours. |
evgeniycheban
added a commit
to evgeniycheban/spring-security
that referenced
this issue
May 19, 2020
Marking as duplicate of the PR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: