|
@@ -5,8 +5,9 @@
|
|
|
*/
|
|
|
package org.elasticsearch.xpack.core.watcher.crypto;
|
|
|
|
|
|
+import org.apache.logging.log4j.LogManager;
|
|
|
+import org.apache.logging.log4j.Logger;
|
|
|
import org.elasticsearch.ElasticsearchException;
|
|
|
-import org.elasticsearch.common.component.AbstractComponent;
|
|
|
import org.elasticsearch.common.io.Streams;
|
|
|
import org.elasticsearch.common.settings.Setting;
|
|
|
import org.elasticsearch.common.settings.Setting.Property;
|
|
@@ -34,7 +35,7 @@ import java.util.List;
|
|
|
/**
|
|
|
* Service that provides cryptographic methods based on a shared system key
|
|
|
*/
|
|
|
-public class CryptoService extends AbstractComponent {
|
|
|
+public class CryptoService {
|
|
|
|
|
|
public static final String KEY_ALGO = "HmacSHA512";
|
|
|
public static final int KEY_SIZE = 1024;
|
|
@@ -58,6 +59,7 @@ public class CryptoService extends AbstractComponent {
|
|
|
Setting.intSetting(SecurityField.setting("encryption_key.length"), DEFAULT_KEY_LENGTH, Property.NodeScope);
|
|
|
private static final Setting<String> ENCRYPTION_KEY_ALGO_SETTING =
|
|
|
new Setting<>(SecurityField.setting("encryption_key.algorithm"), DEFAULT_KEY_ALGORITH, s -> s, Property.NodeScope);
|
|
|
+ private static final Logger logger = LogManager.getLogger(CryptoService.class);
|
|
|
|
|
|
private final SecureRandom secureRandom = new SecureRandom();
|
|
|
private final String encryptionAlgorithm;
|