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

run.halo.app.extension.Secret Maven / Gradle / Ivy

package run.halo.app.extension;

import java.util.Map;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * Secret is a small piece of sensitive data which should be kept secret, such as a password,
 * a token, or a key.
 *
 * @author guqing
 * @see
 * kebernetes Secret
 * @since 2.0.0
 */
@Data
@EqualsAndHashCode(callSuper = true)
@GVK(group = "", version = "v1alpha1", kind = Secret.KIND, plural = "secrets", singular = "secret")
public class Secret extends AbstractExtension {
    public static final String KIND = "Secret";

    public static final String SECRET_TYPE_OPAQUE = "Opaque";

    public static final int MAX_SECRET_SIZE = 1024 * 1024;

    /**
     * Used to facilitate programmatic handling of secret data.
     * More info:
     * secret-types
     */
    private String type;

    /**
     * 

The total bytes of the values in * the Data field must be less than {@link #MAX_SECRET_SIZE} bytes.

*

{@code data} contains the secret data. Each key must consist of alphanumeric * characters, '-', '_' or '.'. The serialized form of the secret data is a * base64 encoded string, representing the arbitrary (possibly non-string) * data value here. Described in * rfc4648#section-4 *

*/ private Map data; /** * {@code stringData} allows specifying non-binary secret data in string form. * It is provided as a write-only input field for convenience. * All keys and values are merged into the data field on write, overwriting any existing * values. * The stringData field is never output when reading from the API. */ private Map stringData; }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy