IPv6 related utility classes in Wildfly / Elytron / ...

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

IPv6 related utility classes in Wildfly / Elytron / ...

Tomas Hofman
Hello,

I'm working on an issue in Elytron, which requires validation of IPv6
addresses. Potentially also normalizing IPv6 addresses and matching
addresses by masks could be needed in future. For now I implemented my
own validation code which may be good enough, but still, better would be
to rely on proven utility class.

Do we use some standard library for such purposes, or is there such
functionality in JBoss codebase somewhere? I found NetworkUtils class in
wildfly-network package, which does some of that, but that can't be used
in Elytron.

Are there some rules when considering new dependencies? For instance
would Apache Commons Validator/Net represent conceivable dependencies
for Elytron?

Thanks,
Tomas
_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: IPv6 related utility classes in Wildfly / Elytron / ...

Tomaž Cerar-2

On Mon, Feb 27, 2017 at 1:23 PM, Tomas Hofman <[hidden email]> wrote:
I'm working on an issue in Elytron, which requires validation of IPv6
addresses. Potentially also normalizing IPv6 addresses and matching
addresses by masks could be needed in future. For now I implemented my
own validation code which may be good enough, but still, better would be
to rely on proven utility class.

 
Do we use some standard library for such purposes, or is there such
functionality in JBoss codebase somewhere? I found NetworkUtils class in
wildfly-network package, which does some of that, but that can't be used
in Elytron.
What is the use case?
 

Are there some rules when considering new dependencies? For instance
would Apache Commons Validator/Net represent conceivable dependencies
for Elytron?
new runtime dependency? I would avoid them if possible.
Especially when it comes to Apache Commons * ...

--
tomaz



_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: IPv6 related utility classes in Wildfly / Elytron / ...

Darran Lofthouse

On 27/02/17 14:17, Tomaž Cerar wrote:
 >
 > On Mon, Feb 27, 2017 at 1:23 PM, Tomas Hofman <[hidden email]
 > <mailto:[hidden email]>> wrote:
 >
 >     I'm working on an issue in Elytron, which requires validation of IPv6
 >     addresses. Potentially also normalizing IPv6 addresses and matching
 >     addresses by masks could be needed in future. For now I
implemented my
 >     own validation code which may be good enough, but still, better
would be
 >     to rely on proven utility class.
 >
 >
 >
 >     Do we use some standard library for such purposes, or is there such
 >     functionality in JBoss codebase somewhere? I found NetworkUtils
class in
 >     wildfly-network package, which does some of that, but that can't
be used
 >     in Elytron.
 >
 > What is the use case?

Detection of and matching of IPv6 addresses including canonicalisation
for different representations of the same address.

Note: This is not DNS lookup or reverse DNS lookup.

 >
 >
 >
 >     Are there some rules when considering new dependencies? For instance
 >     would Apache Commons Validator/Net represent conceivable dependencies
 >     for Elytron?
 >
 > new runtime dependency? I would avoid them if possible.
 > Especially when it comes to Apache Commons * ...

+1 This code may be used by all remote clients and all deployments.

 > --
 > tomaz
 >
 >
 >
 >
 > _______________________________________________
 > wildfly-dev mailing list
 > [hidden email]
 > https://lists.jboss.org/mailman/listinfo/wildfly-dev
 >
_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: IPv6 related utility classes in Wildfly / Elytron / ...

David M. Lloyd
In reply to this post by Tomas Hofman
There are a couple of answers to this.

In https://github.com/wildfly/wildfly-common I've introduced a few IP
address utilities which render IP addresses and perform CIDR functions,
for the EJB client.  It would make sense to have proper IP address
parsing here; in fact this is something I've thought about a bit.

New dependencies are fundamentally OK with justification, but ideally we
want to get good usage out of them.  If we're bringing in a 10MB JAR for
one 6KB class, that is somewhat less than ideal.  Also we'd want
external dependencies to be well-maintained.

In this case my opinion is that the best option is to add IPv4 and IPv6
address parsers into the org.wildfly.common.net.Inet class.

On 02/27/2017 06:23 AM, Tomas Hofman wrote:

> Hello,
>
> I'm working on an issue in Elytron, which requires validation of IPv6
> addresses. Potentially also normalizing IPv6 addresses and matching
> addresses by masks could be needed in future. For now I implemented my
> own validation code which may be good enough, but still, better would be
> to rely on proven utility class.
>
> Do we use some standard library for such purposes, or is there such
> functionality in JBoss codebase somewhere? I found NetworkUtils class in
> wildfly-network package, which does some of that, but that can't be used
> in Elytron.
>
> Are there some rules when considering new dependencies? For instance
> would Apache Commons Validator/Net represent conceivable dependencies
> for Elytron?
>
> Thanks,
> Tomas
> _______________________________________________
> wildfly-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/wildfly-dev
>

--
- DML
_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Loading...