## cascading.management.annotation
Class URISanitizer

    java.lang.Object
      cascading.management.annotation.URISanitizer

All Implemented Interfaces:
  Sanitizer

    public class URISanitizer

extends Object
implements Sanitizer

URISanitizer is an implementation of the Sanitizer interface to sanitize URIs of different kinds (file, HTTP, HDFS, JDBC etc.) Depending on the visibility, the Sanitizer will return different values:

- PUBLIC: Only return the path of the URI
- PROTECTED: Same as PUBLIC + query parameters
- PRIVATE: Same as PROTECTED + URI scheme and authority (host/port)

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`.

Field Summary
`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 Summary
`URISanitizer()`

Method Summary
`String` `apply(Visibility visibility, Object value)` Applies the custom sanitization to the given value for the given visibility.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### PARAMETER_FILTER_PROPERTY

    public static final 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`.

  See Also:
    Constant Field Values

### FAILURE_MODE_PASS_THROUGH

    public static final String FAILURE_MODE_PASS_THROUGH

  System property to allow values to pass through a parse exception.

  See Also:
    Constant Field Values

Constructor Detail

### URISanitizer

    public URISanitizer()

Method Detail

### apply

    public String apply(Visibility visibility,
                        Object value)

  Description copied from interface: `Sanitizer`
  Applies the custom sanitization to the given value for the given visibility.

  Specified by:
    `apply` in interface `Sanitizer`
  Parameters:
    `visibility` - The visibility of the property value.
    `value` - The value to sanitize.
  Returns:
    A sanitized version of the value.

Copyright © 2007-2014 Concurrent, Inc. All Rights Reserved.