Class KsmNotation

java.lang.Object
io.jenkins.plugins.ksm.notation.KsmNotation
Direct Known Subclasses:
KsmTestNotation

public class KsmNotation extends Object
  • Field Details

  • Constructor Details

    • KsmNotation

      public KsmNotation()
  • Method Details

    • looksLikeUid

      public static boolean looksLikeUid(String token)
    • 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 variable
      notation - The keeper notation
      allowFailure - 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 KsmSecret
      allowFailure - 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 variable
      notation - The keeper notation
      allowFailure - 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 variable
      filePath - Path to where the secret should be stored on disk.
      notation - The keeper notation
      allowFailure - 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)
    • getNotationSecrets

      public com.keepersecurity.secretsManager.core.KeeperSecrets getNotationSecrets(com.keepersecurity.secretsManager.core.SecretsManagerOptions options)
    • downloadDataFile

      public byte[] downloadDataFile(com.keepersecurity.secretsManager.core.KeeperFile file)
    • run

      public void run(KsmCredential credential, Map<String,KsmNotationItem> items) throws Exception
      Throws:
      Exception