directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Lecharny (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DIRSERVER-2031) Use a properly random port when creating a KDCServer via annotation
Date Thu, 11 Dec 2014 14:14:13 GMT

    [ https://issues.apache.org/jira/browse/DIRSERVER-2031?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14242551#comment-14242551
] 

Emmanuel Lecharny commented on DIRSERVER-2031:
----------------------------------------------

The patch does not take anymore a given port when creating a KDC server. We should keep the
possibility for the user to provide a part, and if none is provided, then we pick one random
port.

Here is a proposal :
- if the port is given, then we use it : @CreateTransport(protocol = "TCP", address = "127.0.0.1",
port = 6087),
- if the port is not given, or is 0 or below 0, we pick a random free port : @CreateTransport(protocol
= "TCP" )

For the specific case where we want to pick a random port, which has to be shared between
TCP and UDP, I would rather create a new protocol type : KRB in this case. Then @CreateTransport(protocol
= "KRB", port= xyz ) will create 2 transports (TCP and UDP) with the same port for both. If
the port is omitted, then we will pick a random port, the same for both transports.

General :
* @CreateTransport(protocol = "TCP" [, port= 0/-1] ) -> pick a random TCP free port
* @CreateTransport(protocol = "TCP", port =123 ) -> use TCP port 123
* @CreateTransport(protocol = "UDP" [, port= 0/-1] ) -> pick a random UDP free port
* @CreateTransport(protocol = "UDP", port =123 ) -> use UDP port 123

LDAP/LDAPS specific :
* @CreateTransport(protocol = "LDAP[S]" [, port= 0/-1] ) -> create a random TCP port

Kerberos :
* @CreateTransport(protocol = "KRB" [, port= 0/-1]) -> create a random port, shared by
the TCP and UDP transport used by the KerberosServer
* @CreateTransport(protocol = "KRB", port= 123) -> create port 123, shared by the TCP and
UDP transport used by the KerberosServer

ChangePassword :
* @CreateTransport(protocol = "CPW" [, port= 0/-1]) -> create a random port, shared by
the TCP and UDP transport used by the ChangePasswordServer
* @CreateTransport(protocol = "CPW", port= 123) -> create port 123, shared by the TCP and
UDP transport used by the ChangePasswordServer

> Use a properly random port when creating a KDCServer via annotation
> -------------------------------------------------------------------
>
>                 Key: DIRSERVER-2031
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-2031
>             Project: Directory ApacheDS
>          Issue Type: Improvement
>            Reporter: Colm O hEigeartaigh
>            Assignee: Emmanuel Lecharny
>            Priority: Minor
>             Fix For: 2.0.0-M20
>
>         Attachments: dirserver-2031.patch
>
>
> Currently, when creating a KDCServer via annotation, the "random" port is always "1024".
In addition, it should be possible to share the same random port for multiple transports.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message