Skip to content

Authorization Model

The Deck authorization model

The Deck is an administrative control plane. It can inspect jobs, cancel work, edit payloads, requeue DLQ rows, purge data, pause queues, and change queue runtime controls. It is secure by default.

Options

OptionMeaning
AuthorizationPolicyRead/connect policy for dashboard and hub.
DestructiveAuthorizationPolicyStronger policy for write/destructive hub commands.
AllowAnonymousDeckExplicit demo/sandbox escape hatch. Default is false.

If AuthorizationPolicy is not set, The Deck uses the host application's default authorization boundary. If AllowAnonymousDeck is true, policies cannot also be configured.

Endpoint Protection

MapChokaQTheDeck() maps:

  • static assets;
  • SignalR hub at {RoutePrefix}/hub;
  • dashboard Razor components at {RoutePrefix}.

Unless anonymous access is explicitly enabled, both hub and dashboard require authorization.

Destructive Policy

The hub checks DestructiveAuthorizationPolicy at method level for operations that mutate jobs or queues. This enables read-only operators to inspect the system without granting purge/edit/requeue privileges.

Architecture Decision

Why this pattern?

Dashboard read access and destructive command access are different privileges. Production systems often need more people to observe than to mutate.

Trade-offs

Two policies add configuration burden. The payoff is a clean separation between incident visibility and destructive authority.

Alternatives considered

AlternativeBenefitCost
Anonymous by defaultEasy demos.Unsafe for production.
One policy for everythingSimple.No read-only operator role.
App-specific auth inside every componentFlexible.Repeated and error-prone.

Additional Questions

Why secure The Deck by default?
Because it is a write-capable operations console.

Why have a separate destructive policy?
Because inspect and mutate are different operational privileges.

When is anonymous access acceptable?
Only for local demos or intentionally public sandboxes.

Apache 2.0 Licensed