ExecuteCommandCallerCarryThrough
Namespace: Meshmakers.Octo.Sdk.Common.EtlDataPipeline.Nodes.Triggers
Carries the invoker of a manual through onto the
execution options (AB#5126). FromExecutePipelineCommand is manually invoked and the
invoker already holds a token, so — unlike the channel triggers — there is nothing to resolve
against the directory: the caller is simply mapped off the message and the three-state
CallerBindingMode is enforced over "was an invoker carried?".
public static class ExecuteCommandCallerCarryThrough
Inheritance Object → ExecuteCommandCallerCarryThrough
Remarks:
Kept as a pure static so the mapping and the three-state enforcement can be unit-tested without a bus, a context, or a running pipeline.
Methods
ToPrincipal(ExecutePipelineCaller)
The token-free principal projection of the carried invoker, or null when the message
carried none (an internal invocation, or a pre-AB#5126 controller).
public static VerifiedPrincipal ToPrincipal(ExecutePipelineCaller caller)
Parameters
caller ExecutePipelineCaller
Returns
ToTrust(ExecutePipelineCaller)
The invoker's effective trust as a CallerTrustLevel, clamped to the defined scale. CallerTrustLevel.None when no invoker was carried.
public static CallerTrustLevel ToTrust(ExecutePipelineCaller caller)
Parameters
caller ExecutePipelineCaller
Returns
Apply(ExecutePipelineRequest, CallerBindingMode, ExecutePipelineOptions)
Applies the carry-through to options under the trigger's
mode and returns the outcome. On
CallerBindingOutcome.UseResolvedCaller the invoker principal, its raw token
(for delegation) and its trust are written onto the options; on
CallerBindingOutcome.RunAsServiceAccount nothing is written (anonymous run);
on CallerBindingOutcome.Reject nothing is written and the pipeline must not
run.
public static CallerBindingOutcome Apply(ExecutePipelineRequest message, CallerBindingMode mode, ExecutePipelineOptions options)
Parameters
message ExecutePipelineRequest
mode CallerBindingMode
options ExecutePipelineOptions