Skip to content
logmast

Developer documentation

Credentials and data safety

Choose the narrow credential, rotate it safely, and protect evidence.

API v1 · Updated 2026-11-10View MarkdownSource manifest

Use the narrow credential required for the operation. The API separates production collection from evidence access and management.

Credential boundaries

Credential Intended authority
Service ingest token Submit events and check-ins for one service; no evidence reads.
Sentry DSN key Submit Sentry SDK error events for one service; derived from its ingest token and replaced when that token is rotated. Sentry SDKs expose it, so see Use your Sentry SDK.
Agent access (read) A separate agent identity that reads authorized workspace evidence; no mutations. Granted and revoked in Access → Agents.
Agent access (manage) Member-level control within its workspace and grant: services, credentials and alert policies. It cannot invite, delete, buy credit or create API tokens.
Device login (logmastctl login) Agent access, read or manage, that an owner approves for one machine by typing a code; optionally limited to one project. Its own agent identity, 30 days by default.
Project-limited token or agent Any of the above, confined to one project: its services, credentials, rules, checks and evidence. Workspace-wide routes (members, billing, audit, agents, workspace deletion) refuse it, and deleting the project ends it. It still lists the workspace’s name, and its view omits workspace-wide usage, balance and check-in counts. Workspace caps (notification rules, checks, daily allowances) are shared with the rest of the workspace.
API token Acts as the person who created it, read-only or with their permissions, for up to 365 days. Created and revoked in Access → API tokens; removing the person revokes it. For an agent, use agent access instead.
Bootstrap enrollment token Read and enroll during the 14-day handoff; no policy edits or purchases.
Human session Account membership; owner-only and human-only actions still require the relevant role.

Store secrets in a secret manager or private files. Keep them out of prompts, URLs, shell history, source control, browser analytics, and diagnostics. Generated configuration is displayed only when issued; save it privately before leaving the page.

Device login

logmastctl login generates its token on the machine and sends Logmast only the token’s hash and the hash of a separate device code. Logmast returns an eight-letter code that a signed-in owner types at /device within ten minutes; the approval page never fills it in from a link. Approving management needs the owner’s authenticator code, and that code cannot approve twice. An approval can narrow the request (read instead of manage, fewer days, one project) but cannot change the workspace or project the request names, and the CLI refuses a grant for anything else.

The approval page shows the computer name, directory and version the CLI reported (unverified), and the requester’s network: the first 24 bits of an IPv4 address or 64 bits of an IPv6 address. The network is deleted when the request is approved or denied; a request nobody decides loses it within an hour of expiring (ten minutes after it began), and the request itself is deleted a day later. The audit log records who decided and what the CLI reported, never the network. Only members of the workspace a request names can find or deny it. Five wrong codes in ten minutes, per person or per client address (an IPv6 /64), stop further attempts. Other owners are emailed when a login is approved. A login that names no workspace lets the approver choose one, so the CLI accepts that only from a person at a terminal.

Approve only a code you can see in a terminal or agent you are running. Logmast staff and emails never ask anyone to approve a code. Revoke a login in Access → Agents, or with logmastctl logout on the machine.

Rotate a service credential

Open the service’s page in the console and choose Rotate credential. Rotation immediately revokes its active ingest credentials. Save the returned service ID and new token, update every producer, and run a fresh verification. The credential record ID is not the service ID.

An ingest request with a missing or revoked credential returns 401; a credential attempting another service returns 403. Do not repeatedly retry these responses without fixing configuration. After an uncertain rotation response, reconcile the service’s credential inventory before issuing another rotation.

Protect event content

Report safe classifications, stable codes, operation names, and selected context. Do not send passwords, access tokens, raw request bodies, personal records, unrestricted object dumps, or unsafe database/provider messages. Explicit reporting at a terminal error boundary reduces duplicate noise and accidental data capture.

Configured field-name redaction is case insensitive and runs before payload, title, grouping rationale, or policy selection is persisted. Redaction is a second line of defense; producers still own what they submit. Do not put secrets in check names, release labels, or correlation IDs.

Access and retention

Tenant-scoped evidence reads enforce workspace authorization and retention independently of physical cleanup. Increasing retention does not restore previously expired evidence. Minimal identity tombstones remain for deduplication and stable links without preserving expired payloads.

Browser writes require the exact public Origin. Sessions use HttpOnly, SameSite=Strict cookies that are Secure on HTTPS, where they carry the __Host- prefix so a sibling subdomain cannot set or replace them, and expire after 12 hours. Password login also requires TOTP. Logout clears visible evidence immediately; if the server cannot confirm revocation, the console offers a retry rather than claiming the session ended.

A signed-in person can change their password, replace their authenticator, generate ten single-use recovery codes and sign out everywhere from the Account page. Each of those needs the password and, except for signing out, an authenticator code; API tokens cannot use them. Replacing a password or authenticator ends that account’s other sessions. A recovery code signs in once and lets someone who has lost their device replace the authenticator; a forgotten password still needs Logmast support.

Owners invite people by email. The link proves the address and lasts seven days. It never resets or replaces an existing account: someone who already has an account must sign in to it. Membership can change only people who already belong to the workspace. Owners can read the workspace’s audit log.

An owner can delete a workspace from the console’s Settings page with its exact name, their password and an authenticator code. All access ends at once, and the next hourly maintenance run removes its data. Billing records are kept for accounting. Backups keep deleted data until they rotate. A workspace nobody claimed is removed seven days after its trial ends.

Delegated agents have distinct principals, bounded expiry, and revocable authority. A human must establish ownership through the email proof. Successful onboarding does not authorize spending or impersonation. See the agent contract.

Search documentation

Search guides, contracts, and agent playbooks.

Search runs in your browser over public documentation.