io.descoped.secrets.secure.configuration.SafeConfigurationClientInitializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of secrets-provider-safe-configuration Show documentation
Show all versions of secrets-provider-safe-configuration Show documentation
Secrets Provider Safe Configuration
package io.descoped.secrets.secure.configuration;
import io.descoped.secrets.api.SecretManagerClient;
import io.descoped.secrets.api.SecretManagerClientInitializer;
import io.descoped.service.provider.api.ProviderName;
import java.util.Map;
import java.util.Set;
@ProviderName("safe-configuration")
public class SafeConfigurationClientInitializer implements SecretManagerClientInitializer {
@Override
public String providerId() {
return "safe-configuration";
}
@Override
public Set configurationKeys() {
return Set.of("secrets.property-resource-path");
}
@Override
public SecretManagerClient initialize(Map configuration) {
String propertyResourcePath = configuration.get("secrets.property-resource-path");
return new SafeConfigurationClient(propertyResourcePath);
}
}