aboutsummaryrefslogtreecommitdiffstats
path: root/container-disc/src/main/java/com/yahoo/container/jdisc/secretstore/SecretStore.java
blob: ceefaf44176276024853753df1b73a8be5a7fd70 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

package com.yahoo.container.jdisc.secretstore;

import java.util.List;

/**
 * @author mortent
 */
public interface SecretStore {

    /** Returns the secret for this key */
    String getSecret(String key);

    /** Returns the secret for this key and version */
    String getSecret(String key, int version);

    /** Lists the existing versions of this secret (nonnegative integers) */
    default List<Integer> listSecretVersions(String key) {
        throw new UnsupportedOperationException("Secret store does not support listing versions");
    }

}