Package io.jenkins.plugins.ksm.notation
Class KsmNotation
- java.lang.Object
-
- io.jenkins.plugins.ksm.notation.KsmNotation
-
- Direct Known Subclasses:
KsmTestNotation
public class KsmNotation extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static StringnotationPrefix
-
Constructor Summary
Constructors Constructor Description KsmNotation()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]downloadDataFile(com.keepersecurity.secretsManager.core.KeeperFile file)static KsmNotationItemfind(String envVar, String notation, boolean allowFailure)Check in envVar is a keeper notation and then attempt to parse it.com.keepersecurity.secretsManager.core.KeeperSecretsgetNotationSecrets(com.keepersecurity.secretsManager.core.SecretsManagerOptions options, List<String> uids)static KsmNotationItemparse(KsmSecret item, boolean allowFailure)Parse a KsmSecret instance.static KsmNotationItemparse(String envVar, String notation, boolean allowFailure)Parse an environmental variable notation.static KsmNotationItemparse(String destination, String envVar, String filePath, String notation, boolean allowFailure)Parse notation and keeper track the destinationvoidrun(KsmCredential credential, Map<String,KsmNotationItem> items)
-
-
-
Field Detail
-
notationPrefix
public static final String notationPrefix
- See Also:
- Constant Field Values
-
-
Method Detail
-
find
public static KsmNotationItem find(String envVar, String notation, boolean allowFailure) throws Exception
Check in envVar is a keeper notation and then attempt to parse it.- Parameters:
envVar- The name of the environmental variablenotation- The keeper notationallowFailure- Allow failure, don't throw exception, but log the error.- Returns:
- KsmNotationItem
- Throws:
Exception- The parse failed for this reason.
-
parse
public static KsmNotationItem parse(KsmSecret item, boolean allowFailure) throws Exception
Parse a KsmSecret instance.- Parameters:
item- An instance of KsmSecretallowFailure- Allow failure, don't throw exception, but log the error.- Returns:
- KsmNotationItem
- Throws:
Exception- The parse failed for this reason.
-
parse
public static KsmNotationItem parse(String envVar, String notation, boolean allowFailure) throws Exception
Parse an environmental variable notation.- Parameters:
envVar- The name of the environmental variablenotation- The keeper notationallowFailure- Allow failure, don't throw exception, but log the error.- Returns:
- KsmNotationItem
- Throws:
Exception- The parse failed for this reason.
-
parse
public static KsmNotationItem parse(String destination, String envVar, String filePath, String notation, boolean allowFailure) throws Exception
Parse notation and keeper track the destination- Parameters:
destination- Flag indicating in the destination is an environmental var or file path.envVar- The name of the environmental variablefilePath- Path to where the secret should be stored on disk.notation- The keeper notationallowFailure- Allow failure, don't throw exception, but log the error.- Returns:
- KsmNotationItem
- Throws:
Exception- The parse failed for this reason.
-
getNotationSecrets
public com.keepersecurity.secretsManager.core.KeeperSecrets getNotationSecrets(com.keepersecurity.secretsManager.core.SecretsManagerOptions options, List<String> uids)
-
downloadDataFile
public byte[] downloadDataFile(com.keepersecurity.secretsManager.core.KeeperFile file)
-
run
public void run(KsmCredential credential, Map<String,KsmNotationItem> items) throws Exception
- Throws:
Exception
-
-