org.jwall.web.audit.util
Class ClientIPObfuscation
java.lang.Object
org.jwall.web.audit.util.ClientIPObfuscation
- All Implemented Interfaces:
- Obfuscator
public class ClientIPObfuscation
- extends Object
- implements Obfuscator
This class implements a simple client IP address obfuscation. It will check the audit-log header
for the client IP and replace this with a x.x.x.x-string in all subsequent sections
as well.
- Author:
- Christian Bockermann <chris@jwall.org>
IPv4_ADDRESS_PATTERN
public static final String IPv4_ADDRESS_PATTERN
- See Also:
- Constant Field Values
IPv6_ADDRESS_PATTERN
public static final String IPv6_ADDRESS_PATTERN
- See Also:
- Constant Field Values
ClientIPObfuscation
public ClientIPObfuscation()
getSections
public List<Integer> getSections()
- Specified by:
getSections in interface Obfuscator
- Returns:
obfuscate
public String obfuscate(Integer id,
String sectionData)
throws IOException
- Description copied from interface:
Obfuscator
- This method does the obfuscation on the given section data.
- Specified by:
obfuscate in interface Obfuscator
- Parameters:
id - The ID of the section data, given as additional parameter.sectionData - The section data.
- Returns:
- The obfuscated section data.
- Throws:
IOException - In case an I/O error occurs.
getExpression
public String getExpression()
getReplacement
public String getReplacement()
getVariable
public String getVariable()
done
public void done()
- Description copied from interface:
Obfuscator
- This method is called once all sections have been given to the obfuscator. Usually
this will be called one the Z-section has been reached. It may be used to release
all context-sensitive stuff being hold within the obfuscator instance.
- Specified by:
done in interface Obfuscator
- See Also:
Obfuscator.done()
Copyright © 2012 jwall.org. All Rights Reserved.