Nevermind. For some reason we had omitted this is already supported by the 
ipv6Canonical flag. 

RTFM!

Manuel Dominguez Sarmiento


> On 13 Apr 2020, at 20:46, Manuel Dominguez Sarmiento <m...@renxo.com> wrote:
> 
>  Hi, we are in the middle of a thorough review to fully support IPv6 across 
> our platform. It has come to our attention that Java does not fully conform 
> to RFC 5952 section 4 which deals with IPv6 zero compression (i.e. ::1 
> instead of 0:0:0:0:0:0:0:1 for localhost). We have confirmed that Tomcat's 
> AccessLogValve is using the standard Java implementation. How can we 
> guarantee zero compression to be used in AccessLogValve?
> 
> We are using Guava's InetAddresses.toAddrString() across our systems to deal 
> with this. We know we can use a custom AccessLogValve extending the standard 
> behaviour, but we were wondering whether there was any other solution, option 
> or flag around this. We've thought of using a custom request attribute to 
> hold the IP address, but this is not very elegant. In particular, we'd lose 
> the IP address if the filter we would use to set the request attribute is not 
> invoked for any reason.
> 
> This is not minor, since we use access logs a lot to diagnose issues, and 
> cross-reference IP addresses with many other systems which are fully RFC 
> 5952-compliant. Having separate representations for the same IP address will 
> eventually lead to either trouble, misdiagnosis, missed records, etc.
> 
> Any suggestions?
> 
> Manuel Dominguez Sarmiento
> 

Reply via email to