java.lang.Object
com.scivicslab.pojoactor.core.ActorRef<VaultActor.State>
com.scivicslab.turingworkflow.workflow.IIActorRef<VaultActor.State>
com.scivicslab.turingworkflow.plugins.vault.VaultActor
All Implemented Interfaces:
com.scivicslab.pojoactor.core.CallableByActionName, AutoCloseable

public class VaultActor extends com.scivicslab.turingworkflow.workflow.IIActorRef<VaultActor.State>
Workflow actor for reading secrets from HashiCorp Vault KV v2.

Default mode is HTTP (requires VAULT_ADDR and VAULT_TOKEN env vars). Call setKubectl to switch to kubectl mode for k8s-internal Vault (ClusterIP only).

 - actor: vault
   method: setKubectl
   arguments: ["infra-vault", "vault-0"]

 - actor: vault
   method: get
   arguments: ["keycloak-local-llm/test-users", "testadmin-password"]
 
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
  • Field Summary

    Fields inherited from class com.scivicslab.pojoactor.core.ActorRef

    actorName, actorSystem, object
  • Constructor Summary

    Constructors
    Constructor
    Description
    VaultActor(String actorName, com.scivicslab.turingworkflow.workflow.IIActorSystem system)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.scivicslab.pojoactor.core.ActionResult
    get(String args)
    Reads a named field from a Vault KV v2 secret.
    com.scivicslab.pojoactor.core.ActionResult
    Switch to kubectl mode: subsequent get calls use kubectl exec into the named pod.

    Methods inherited from class com.scivicslab.turingworkflow.workflow.IIActorRef

    callByActionName, hasAnnotatedAction, invokeAnnotatedAction, parseFirstArgument

    Methods inherited from class com.scivicslab.pojoactor.core.ActorRef

    ask, ask, askNow, clearJsonState, clearPendingMessages, close, createChild, expandVariables, getAttribute, getAttribute, getJsonBoolean, getJsonInt, getJsonString, getJsonString, getLastResult, getName, getNamesOfChildren, getParentName, hasAttribute, hasJson, hasJsonState, initLogger, isAlive, json, putAttribute, putJson, removeAttribute, setLastResult, setParentName, system, tell, tell, tellNow, toStringOfJson, toStringOfYaml

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • VaultActor

      public VaultActor(String actorName, com.scivicslab.turingworkflow.workflow.IIActorSystem system)
  • Method Details

    • setKubectl

      public com.scivicslab.pojoactor.core.ActionResult setKubectl(String args)
      Switch to kubectl mode: subsequent get calls use kubectl exec into the named pod.
    • get

      public com.scivicslab.pojoactor.core.ActionResult get(String args)
      Reads a named field from a Vault KV v2 secret.

      Arguments: ["mount/key", "fieldName"] e.g. ["keycloak-local-llm/test-users", "testadmin-password"]

      On success, ${result} holds the field value.