org.opensearch.crypto.CryptoHandlerRegistry Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of opensearch Show documentation
Show all versions of opensearch Show documentation
OpenSearch subproject :server
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*/
package org.opensearch.crypto;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.message.ParameterizedMessage;
import org.opensearch.cluster.metadata.CryptoMetadata;
import org.opensearch.common.SetOnce;
import org.opensearch.common.crypto.CryptoHandler;
import org.opensearch.common.crypto.MasterKeyProvider;
import org.opensearch.common.settings.Settings;
import org.opensearch.plugins.CryptoKeyProviderPlugin;
import org.opensearch.plugins.CryptoPlugin;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
/**
* During node bootstrap, installed key provider extensions responsible for generating data keys are loaded.
* Crypto factories against the respective KP plugins are cached. A crypto factory is used to register crypto
* handler against an {@link org.opensearch.common.blobstore.EncryptedBlobStore}
*/
public class CryptoHandlerRegistry {
private static final Logger logger = LogManager.getLogger(CryptoHandlerRegistry.class);
// Package private for tests
SetOnce