public class URISanitizer extends Object implements Sanitizer
Parameters containing sensitive information like user-names, passwords, API-keys etc. can be filtered out by setting
the PARAMETER_FILTER_PROPERTY
System property to a comma separated
list of names that should never show up in the DocumentService
. Some systems may use
non-standard URIs, which cannot be parsed by URI
.
If the sanitizer encounters one of those URIs it
will catch the Exception and return an empty String. This can be overruled by setting the
FAILURE_MODE_PASS_THROUGH
System property to true
,
which will cause the actual value being returned. Note that this might leak sensitive information to the
DocumentService
.
Modifier and Type | Field and Description |
---|---|
static String |
FAILURE_MODE_PASS_THROUGH
System property to allow values to pass through a parse exception.
|
static String |
PARAMETER_FILTER_PROPERTY
System property for listing URI parameters to be filtered out (usernames, passwords etc.)
Value cases are ignored, thus
UserName will be equivalent to username . |
Constructor and Description |
---|
URISanitizer() |
Modifier and Type | Method and Description |
---|---|
String |
apply(Visibility visibility,
Object value)
Applies the custom sanitization to the given value for the given visibility.
|
public static final String PARAMETER_FILTER_PROPERTY
UserName
will be equivalent to username
.public static final String FAILURE_MODE_PASS_THROUGH
public URISanitizer()
public String apply(Visibility visibility, Object value)
Sanitizer
Copyright © 2007-2015 Concurrent, Inc. All Rights Reserved.