Class OneTimeSecretHandoff
java.lang.Object
com.kingsrook.qqq.backend.core.actions.processes.OneTimeSecretHandoff
Hands one-time secrets from a process step that finished as an ASYNC job to
the first status poll that sees it complete. The middleware runs a step as
a job and answers "job started" when it takes longer than its step timeout
(3 s by default), so without this a slow key-producing step would lose its
secret.
Held in this JVM's memory only, keyed by process UUID (status polls are
already restricted to the process's own user), never written to process
state, traces or listeners, removed on the first take, and dropped after
a short time-to-live. A poll that reaches another server instance finds
nothing, which is the documented "shown once, else rotate" outcome.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidoffer(String processUUID, List<OneTimeSecret> secrets) Park a finished run's secrets for its process UUID (no-op when none).static List<OneTimeSecret> Take (and forget) the secrets parked for a process UUID; empty when none, already taken, or expired.
-
Field Details
-
TIME_TO_LIVE
How long an untaken secret is kept.
-
-
Method Details
-
offer
Park a finished run's secrets for its process UUID (no-op when none). -
take
Take (and forget) the secrets parked for a process UUID; empty when none, already taken, or expired.
-