[Fix] Fixed secrets showing up on JSON of agent

This commit is contained in:
Robert von Burg 2023-07-28 13:05:30 +02:00
parent d4ba65a8e8
commit a987928703
Signed by: eitch
GPG Key ID: 75DB9C85C74331F7
1 changed files with 4 additions and 1 deletions

View File

@ -250,7 +250,10 @@ public abstract class AbstractionConfiguration {
JsonObject propertyJ = new JsonObject();
propertyJ.addProperty(Tags.Json.KEY, key);
if (this.valueTypes.containsKey(key) && this.valueTypes.get(key).equals(SECRET))
String type = this.valueTypes.get(key);
if (type != null)
propertyJ.addProperty(Tags.Json.TYPE, this.valueTypes.get(key));
if (type != null && type.equals(SECRET))
propertyJ.addProperty(Tags.Json.VALUE, "***");
else
propertyJ.addProperty(Tags.Json.VALUE, this.configurationValues.get(key));