Portal Community

Token Properties

PropertyValue
FormatUUID v4 (GUID) — e.g., 3f9c4b2a-7e8d-4c1f-a3b6-9d0e1f2a3b4c
Generated byThe HIL executor (inside BuildSuspendPayload) — not the engine
UniquenessGlobally unique across all tenants, executions, and suspensions
Single-useMarked consumed on first valid resume call — repeat use returns 409 Conflict
LifetimePermanent — never deleted (kept for audit even after use/expiry)

Token in URLs

The correlation token appears in two URLs:

Security Considerations

The token is a secret — anyone who knows it can resume the execution. The API additionally validates:

Tokens should only be transmitted over HTTPS and should not be logged in plain text. Notification emails should use short-lived signed links that wrap the token, not embed it directly in the URL.

Token Validation Code

public async Task<ValidatedToken> ValidateAsync(string executionResId, string actorId, string tenantId)
{
    var suspension = await _repo.GetByExecutionResIdAsync(executionResId);

    if (suspension == null)
        throw new InvalidTokenException("Token not found");

    if (suspension.TenantId != tenantId)
        throw new InvalidTokenException("Tenant mismatch");

    if (suspension.ResumedAt.HasValue)
        throw new TokenAlreadyUsedException("Token already consumed");

    if (suspension.ExpiresAt.HasValue && suspension.ExpiresAt < DateTimeOffset.UtcNow)
        throw new TokenExpiredException("Token has expired");

    return new ValidatedToken { Suspension = suspension };
}