org.springframework.cloud.dataflow.core

## Class ArgumentSanitizer

- java.lang.Object
- - org.springframework.cloud.dataflow.core.ArgumentSanitizer

-     public class ArgumentSanitizer
      extends Object

  Sanitizes potentially sensitive keys for a specific command line arg.
  Author:
    Glenn Renfro, Gunnar Hillert, Ilayaperumal Gopinathan

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ArgumentSanitizer()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `sanitize(String argument)` Replaces a potential secure value with "******".
    `String` | `sanitize(String key, String value)` Replaces a potential secure value with "******".
    `List<String>` | `sanitizeArguments(List<String> arguments)` For all sensitive arguments (e.g.
    `Map<String,String>` | `sanitizeProperties(Map<String,String> properties)` For all sensitive properties (e.g.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ArgumentSanitizer

          public ArgumentSanitizer()

  - ### Method Detail

    - #### sanitize

          public String sanitize(String argument)

      Replaces a potential secure value with "******".
      Parameters:
        `argument` - the argument to cleanse.
      Returns:
        the argument with a potentially sanitized value

    - #### sanitize

          public String sanitize(String key,
                                 String value)

      Replaces a potential secure value with "******".
      Parameters:
        `key` - to check for sensitive words.
        `value` - the argument to cleanse.
      Returns:
        the argument with a potentially sanitized value

    - #### sanitizeProperties

          public Map<String,String> sanitizeProperties(Map<String,String> properties)

      For all sensitive properties (e.g. key names containing words like password, secret, key, token) replace the value with '*****' string
      Parameters:
        `properties` - to be sanitized
      Returns:
        sanitized properties

    - #### sanitizeArguments

          public List<String> sanitizeArguments(List<String> arguments)

      For all sensitive arguments (e.g. key names containing words like password, secret, key, token) replace the value with '*****' string
      Parameters:
        `arguments` - to be sanitized
      Returns:
        sanitized arguments

Copyright © 2021 Pivotal Software, Inc.. All rights reserved.