All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.quarkus.vault.runtime.config.CredentialsProviderConfig Maven / Gradle / Ivy

There is a newer version: 3.0.0.Beta1
Show newest version
package io.quarkus.vault.runtime.config;

import static io.quarkus.credentials.CredentialsProvider.PASSWORD_PROPERTY_NAME;

import java.util.Optional;

import io.quarkus.runtime.annotations.ConfigGroup;
import io.quarkus.runtime.annotations.ConfigItem;

@ConfigGroup
public class CredentialsProviderConfig {

    /**
     * Database credentials role, as defined by https://www.vaultproject.io/docs/secrets/databases/index.html
     *
     * One of `database-credentials-role` or `kv-path` needs to be defined. not both.
     *
     * @asciidoclet
     */
    @ConfigItem
    public Optional databaseCredentialsRole;

    /**
     * A path in vault kv store, where we will find the kv-key.
     *
     * One of `database-credentials-role` or `kv-path` needs to be defined. not both.
     *
     * see https://www.vaultproject.io/docs/secrets/kv/index.html
     *
     * @asciidoclet
     */
    @ConfigItem
    public Optional kvPath;

    /**
     * Key name to search in vault path `kv-path`. The value for that key is the credential.
     *
     * `kv-key` should not be defined if `kv-path` is not.
     *
     * see https://www.vaultproject.io/docs/secrets/kv/index.html
     *
     * @asciidoclet
     */
    @ConfigItem(defaultValue = PASSWORD_PROPERTY_NAME)
    public String kvKey;

    @Override
    public String toString() {
        return "CredentialsProviderConfig{" +
                "databaseCredentialsRole='" + databaseCredentialsRole.get() + '\'' +
                ", kvPath='" + kvPath.get() + '\'' +
                ", kvKey='" + kvKey + '\'' +
                '}';
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy