Portal Community

Workflow Access Policy

The WorkflowAccessPolicy controls which workflows any Octopus agent is permitted to trigger. Two modes are supported:

ModeBehaviourRecommended For
AllowlistOnly workflows listed in AllowedWorkflows can be triggeredProduction — always use allowlist mode
OpenAny workflow can be triggered — no restrictionDevelopment/testing only — never in production
// WorkflowAccessPolicy implementation
public class WorkflowAccessPolicy
{
    private readonly ProcessPluginConfig _config;

    public bool IsAllowed(string workflowId)
    {
        if (_config.WorkflowAccessPolicy.Mode == "Open")
            return true;

        return _config.WorkflowAccessPolicy.AllowedWorkflows
            .Contains(workflowId, StringComparer.OrdinalIgnoreCase);
    }
}
Never use Open mode in production. Open mode allows any agent to trigger any workflow in your ProcessServer — including destructive or sensitive processes. Always configure an explicit AllowedWorkflows allowlist.

Tenant Isolation

All workflow trigger requests include the TenantId from the Octopus ITenantContext. The ProcessServer enforces that the calling tenant has permission to trigger the target workflow:

// WorkflowTriggerService always stamps the tenant ID
var startRequest = new StartWorkflowRequest
{
    WorkflowId  = workflowId,
    TenantId    = _tenant.TenantId,   // Always from ITenantContext — never from user input
    InitiatedBy = ctx.UserId,
    Inputs      = inputs
};

// ProcessServer validates: does tenant TenantId own workflow WorkflowId?
// If not, returns 403 Forbidden

Audit Trail

Every agent-workflow interaction is recorded in a dedicated audit log:

// Audit log entry stored in Octopus_ProcessAuditLog table
{
  "id":              "audit-xyz",
  "timestamp":       "2024-06-15T10:00:00Z",
  "tenant_id":       "tenant-abc",
  "agent_id":        "hr-assistant",
  "session_id":      "sess-123",
  "user_id":         "user-456",
  "workflow_id":     "leave-approval-workflow",
  "execution_id":    "exec-789",
  "action":          "WorkflowTriggered",
  "inputs_summary":  "{ employee_id: EMP-1234, days: 5 }",
  "outcome":         "Completed",
  "elapsed_ms":      4250
}

Security Checklist

ControlRequired
WorkflowAccessPolicy.Mode = "Allowlist" in productionRequired
AllowedWorkflows list reviewed by workflow ownerRequired
ProcessServer API key stored in credential store (not appsettings)Required
Audit log retained for compliance periodRequired for regulated industries
HIL actor agent reviewed for correct decision criteriaRequired before enabling HIL
Agent system prompt warns not to trigger workflows on insufficient user confirmationRecommended