DataZen Documentation
DataZen User Guide

Authentication Sequence

Authenticating to a DataZen agent follows a specific login sequence and varies based on the type of agent. Self-hosted and cloud agents share Service Token concepts such as scopes, topics, and tags, but they differ in how callers present credentials and which identity providers are available.

Self-Hosted Agents

Self-hosted and container agents evaluate each HTTP/S API request in the following order. The first matching path that authorizes the caller wins; otherwise the request fails (HTTP 403).

  1. Anonymous — if the agent was started with anonymous access enabled (-anonymous) and Disable default local admin access is not checked. Anonymous callers are treated as administrators. Enabling Disable default local admin access also blocks anonymous authentication.
  2. Token authentication — when the request includes an Authorization: Token … header:
    • Administrative Shared Access Key — if the token matches a configured admin key, optionally verify a global X.509 signature requirement, then enforce the configured access level (or scopes for scope-based keys).
    • Service Token — otherwise match a Service Token that has not expired; optionally verify a per-token X.509 signing certificate; then validate scopes (and attach token claims such as topics and tags).
  3. X.509 authentication — when no Token header is present, allow the call if the client certificate thumbprint is configured for authentication (and signature validation succeeds when global signing certificates are configured).
  4. Windows / NTLM group membership — when still unauthorized and a Windows identity is present (and not already on the Token path):
    • Optionally enforce a global X.509 signature requirement.
    • Administrator pass — members of configured Administrator AD groups, or (when local admin bootstrap is still enabled and the request is direct-local) members of BUILTIN\Administrators / Authenticated Users, receive full administrator access.
    • Scoped AD Group pass — matching scoped groups receive discrete access similar to Service Tokens (scopes, topics, tags, and optional X.509 signing).

See Security for Service Tokens, Scoped AD Groups, Disable default local admin access, and related Manager / Portal settings. For certificate usage, see X.509 Certificates.

Cloud Agents

Cloud agents authenticate API callers over HTTPS. Requests must identify the target agent with the X-API-DZ-AgentId header or with an Agent ID embedded in the URL path (/api/{agentId}/…). After authentication succeeds, the agent must be active and not expired. Failed authentication returns HTTP 401.

Cloud agents evaluate credentials in the following order:

  1. X.509 client certificate — if the request presents a client certificate (https-Client-Certificate or Azure-forwarded X-ARR-ClientCert), DataZen validates the certificate. When global signing certificates are configured, an invalid signature fails the request immediately. A certificate configured for authentication can authorize the call on its own.
  2. Token authentication — when not already authenticated and the request includes Authorization: Token …, DataZen validates a Service Token. Cloud Service Tokens are guid-like values (not Base64). The token must be active and not expired, must allow the requested HTTP method and path through its scopes, and may require a per-token X.509 signature. As with self-hosted agents, Service Tokens can also carry topics (MCP Tool access) and tags (pipeline access).
  3. Basic authentication — when not already authenticated and the request includes Authorization: Basic …, DataZen decodes the Base64 username:password pair and:
    • Authenticates administrative agent credentials (the agent client id and admin token / secret), or
    • Accepts a guid-like Service Token presented as the Basic password (32-character token value), with the same scope, topic, tag, and optional X.509 checks as Token authentication.

Cloud agents do not use Anonymous authentication or Windows / AD group membership. Those options apply to self-hosted agents only.

Webhooks

Webhook calls (/job/push) use a dedicated authorization path. Webhooks must be explicitly enabled for the agent, and only Token authentication is accepted. Administrative agent tokens are allowed; Service Tokens must be in scope and, when tags are assigned on the token, may only call pipelines whose tags match. A Service Token that requires X.509 signing must present a valid signature.

See Security for creating Service Tokens (including topics, tags, and optional X.509 signing) in the Portal or Manager.