public class ArgumentSanitizer extends Object
Constructor and Description |
---|
ArgumentSanitizer() |
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.
|
HttpHeaders |
sanitizeHeaders(HttpHeaders headers) |
org.springframework.batch.core.JobParameters |
sanitizeJobParameters(org.springframework.batch.core.JobParameters jobParameters)
Replaces the sensitive String values in the JobParameter value.
|
String |
sanitizeJsonOrYamlString(String input)
Will determine the type of data and treat as JSON or YAML to sanitize sensitive values.
|
String |
sanitizeJsonString(String input)
Will replace the sensitive string fields with '*****'
|
Map<String,Object> |
sanitizeMap(Map<String,Object> input)
Will replace sensitive string value in the Map with '*****'
|
Map<String,String> |
sanitizeProperties(Map<String,String> properties)
For all sensitive properties (e.g.
|
String |
sanitizeTaskDsl(TaskDefinition taskDefinition)
Redacts sensitive property values in a task.
|
String |
sanitizeYamlString(String input)
Will replace the sensitive string fields with '*****'
|
public String sanitize(String argument)
argument
- the argument to cleanse.public String sanitize(String key, String value)
key
- to check for sensitive words.value
- the argument to cleanse.public org.springframework.batch.core.JobParameters sanitizeJobParameters(org.springframework.batch.core.JobParameters jobParameters)
jobParameters
- the original job parameterspublic String sanitizeTaskDsl(TaskDefinition taskDefinition)
taskDefinition
- the task definition to sanitizepublic Map<String,String> sanitizeProperties(Map<String,String> properties)
properties
- to be sanitizedpublic List<String> sanitizeArguments(List<String> arguments)
arguments
- to be sanitizedpublic HttpHeaders sanitizeHeaders(HttpHeaders headers)
public Map<String,Object> sanitizeMap(Map<String,Object> input)
input
- to be sanitizedpublic String sanitizeJsonString(String input) throws com.fasterxml.jackson.core.JsonProcessingException
input
- to be sanitizedcom.fasterxml.jackson.core.JsonProcessingException
- from mapper.public String sanitizeYamlString(String input) throws com.fasterxml.jackson.core.JsonProcessingException
input
- to be sanitizedcom.fasterxml.jackson.core.JsonProcessingException
- from mapperCopyright © 2024 Pivotal Software, Inc.. All rights reserved.