Class PropertiesSecretSource
- java.lang.Object
-
- io.jenkins.plugins.casc.SecretSource
-
- io.jenkins.plugins.casc.impl.secrets.PropertiesSecretSource
-
- All Implemented Interfaces:
ExtensionPoint
@Extension @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public class PropertiesSecretSource extends SecretSource
ThisSecretSource
implementation allows to use a .properties file for providing secrets. The default file path is/run/secrets/secrets.properties
, which can be changed viaSECRETS_FILE
environment variable.- Since:
- 1.33
- Author:
- Daniel Estermann
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
Fields Modifier and Type Field Description static String
SECRETS_DEFAULT_PATH
Default path for .properties file
-
Constructor Summary
Constructors Constructor Description PropertiesSecretSource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
init()
Optional<String>
reveal(String secret)
Reveal the plaintext value of a secret.-
Methods inherited from class io.jenkins.plugins.casc.SecretSource
all
-
-
-
-
Field Detail
-
SECRETS_DEFAULT_PATH
public static final String SECRETS_DEFAULT_PATH
Default path for .properties file- See Also:
- Constant Field Values
-
-
Method Detail
-
reveal
public Optional<String> reveal(String secret)
Description copied from class:SecretSource
Reveal the plaintext value of a secret.- Specified by:
reveal
in classSecretSource
- Parameters:
secret
- the variable reference to reveal- Returns:
- the secret's value, or Optional.empty() if a recoverable error occurred. (An empty Optional will allow CasC to continue processing the resolver chain.)
Recoverable errors include:
- the secret was not found in the backing store
-
init
public void init()
- Overrides:
init
in classSecretSource
-
-