@Override
protected void doInitialize() throws ComponentInitializationException {
super.doInitialize();
if (servicePrincipal != null && keytabPath == null) {
throw new ComponentInitializationException("A keytab path is required if a service principal is set");
}
clientOptions = new HashMap<>();
clientOptions.put("refreshKrb5Config", Boolean.valueOf(refreshKrb5Config).toString());
if (servicePrincipal != null) {
serverOptions = new HashMap<>();
serverOptions.put("refreshKrb5Config", Boolean.valueOf(refreshKrb5Config).toString());
serverOptions.put("useKeyTab", "true");
serverOptions.put("keyTab", keytabPath);
serverOptions.put("principal", servicePrincipal);
serverOptions.put("doNotPrompt", "true");
serverOptions.put("isInitiator", "false");
serverOptions.put("storeKey", "true");
}
}