Not sure if this is a bug that has been resolved or not, but the keystore
only saves one of the values. Using version 5.5.3
integTestCluster {
keystoreSetting 'foo', 'abc'
keystoreSetting 'bar', 'xyz'
keystoreSetting 'baz', 'qwerty'
}
public class MyPlugin extends Plugin implements IngestPlugin {
static final Setting<SecureString> FOO =
SecureSetting.secureString("foo", null);
static final Setting BAR =
SecureSetting.secureString("bar", null);
static final Setting BAZ =
SecureSetting.secureString("baz", null);
@Override
public Map<String, Processor.Factory>
getProcessors(Processor.Parameters parameters) {
Logger logger = Loggers.getLogger(getClass());
SecureString foo = FOO.get(parameters.env.settings());
SecureString bar = BAR.get(parameters.env.settings());
SecureString baz = BAZ.get(parameters.env.settings());
logger.warn("all settings {}",
parameters.env.settings().toDelimitedString('\n'));
logger.warn("foo: {} for {}", foo, FOO.getKey());
logger.warn("bar: {} for {}", bar, BAR.getKey());
logger.warn("baz: {} for {}", bar, BAZ.getKey());
return new HashMap<>();
}
@Override
public List<Setting<?>> getSettings() {
return Arrays.asList(FOO, BAR, BAZ);
}
}
returns
foo: qwerty for foo
bar: qwerty for bar
baz: qwerty for baz
integTestCluster {
keystoreSetting 'foo', '1'
keystoreSetting 'bar', '2'
keystoreSetting 'baz', '3'
}
returns
foo: 3 for foo
bar: 3 for bar
baz: 3 for baz
Hopefully you can comment before I open an issue.
Thanks,
Ivan