F
FileManagerby Clappe
All docs

Admin console: fleet, tenancy and enterprise

The admin console (admin/, Next.js) manages backup clients centrally. It is the UFOP counterpart of the Duplicati Console. This page covers how to run it, its main concepts and the agent protocol clients speak.

Running

pnpm admin:dev                    # development, port 3001
cd admin && npx next build && npx next start -p 3001
VariablePurpose
NEXTAUTH_SECRETRequired. Signs session cookies. Also the fallback key for sealing secrets.
ADMIN_ENCRYPTION_KEYKey for sealing stored secrets (AES-256-GCM): channel passwords, SSO client secrets, central credentials, the AI API key, TOTP seeds. Defaults to HKDF(NEXTAUTH_SECRET). Set it explicitly in production.
ADMIN_DB_PATHSQLite file (default ./admin-data.db). Migrations run on start (PRAGMA user_version).
ADMIN_PUBLIC_URLExternal URL behind a proxy. Used for SSO callbacks, invitation links, registration links and preload files.
ADMIN_EMAIL, ADMIN_PASSWORDBootstrap owner of the default organization, created on first sign-in to an empty database.
ADMIN_DISABLE_JOBSTurns off the 5-minute background jobs: missed-backup alerts, scheduled AI summaries, offboarding purges.

Concepts

  • Organizations form a tree. Owners and admins of a parent also manage its children (delegation). A detached child is invisible to and unmanaged by its ancestors.
    • Protected organizations cannot be offboarded.
    • Offboarding revokes all access and agent tokens immediately. Data is purged after a grace period (0–90 days).
    • Licenses (plan, machine seats) are set by the parent and inherited by children that don't set their own. Registration beyond the seats fails with 402.
  • Roles per organization: org_owner, org_admin, operator, user, read_only_auditor. A role comes from a direct membership, a parent organization (delegated) or a group. The server recomputes it on every request, so changes apply at once.
  • Groups grant an organization role and, optionally, access to specific machines, tags or backups.
    • Members with the user role see only what their groups grant.
    • Group owners add and remove members and send invitations.
  • Invitations are single-use links that expire after 7 days. They are sent through the email channel marked use for invitations, or copied by hand.
  • Single sign-on:
    • OIDC: authorization code + PKCE, with the ID token verified against the issuer's JWKS, and claims also taken from userinfo.
    • SAML 2.0: signed assertions required, InResponseTo checked, SP metadata at /api/auth/sso/<id>/metadata.
    • LDAP / Active Directory: people type their directory user name and password on the console's sign-in page (POST /api/auth/ldap). A service account searches baseDn with the user filter ({username} is escaped per RFC 4515; exactly one entry must match), then the console binds as that entry with the password. Email, name, groups (memberOf; mappings may use the CN or the full DN) and a stable id (objectGUID/entryUUID) feed the same account rules as OIDC and SAML. ldaps:// or StartTLS is required (plain ldap:// only to a loopback address); a private CA certificate can be pasted. Attempts and their steps (service bind, search, user bind) are in the provider's diagnostics, failures are rate-limited and audited as auth.login_failed.
    • Providers claim email domains. The sign-in page shows them for matching addresses, and existing accounts in those domains are linked on first sign-in.
    • Accounts can be created on first sign-in with a default role (never owner), a default group, and groups mapped from the IdP's group claim.
    • People link and unlink providers on My account.
  • Two-factor sign-in: TOTP (RFC 6238) with replay protection and 10 single-use recovery codes. A provider can require it on top of SSO. Turning it off needs a current code.
  • Audit log: append-only (enforced by SQLite triggers) and hash-chained (SHA-256), with HMAC-signed checkpoints. Audit → Verify integrity recomputes the whole chain.

Fleet

  • Enrollment has three paths:
    1. A registration link token for unattended installs: ufop agent register --url … --token ufop_reg_…, or a downloadable preload.json.
    2. A claim code: the machine runs ufop agent claim and shows XXXX-XXXX, which an admin enters on Enrollment.
    3. A report URL for clients that only send reports (/api/ingest/<token>, JSON or form-encoded).
  • Machines carry tags (with organization-wide colors), notes, connectivity (online / stale / offline from heartbeats), backups, reports, alerts and policy compliance. Machines can be suspended, revoked, deleted, or have their token rotated (the agent rotates itself on its next check-in).
  • Remote session: queue allow-listed client calls (backup_*), runs, policy applies and token rotation. Agents pick commands up on their next heartbeat and post the result back. Calls that read secrets back or touch arbitrary files are not allowed.
  • Languages (My account → Profile → Language): English, Deutsch, Español, Français, 日本語, 한국어, Português and 中文 — the same languages as the desktop app. The choice is saved on the account (it follows you to other browsers); without one the browser's language is used. Dates, numbers and relative times follow the language. The navigation, sign-in, My account, confirmation dialog and tables are translated; strings live in admin/src/locales/<lang>.json, and a test keeps every language's keys and placeholders identical to English.
  • Tables: the audit explorer and the API request log filter and page on the server (search, severity, category, dates), so every matching entry is reachable; Columns chooses visible columns and the page size (25–200) is selectable, both remembered per table in the browser. The Event Categories view counts every entry, not just the loaded page.
  • Paging (API convention): list routes take ?limit= (1–500) and ?cursor= (opaque, from the previous page); offset and page+pageSize still work. Responses keep their list key and add pagination: {limit, offset, total, nextCursor, hasMore} plus X-Total-Count and an RFC 8288 Link: <…>; rel="next" header. Lists whose screens show everything (users, machines, devices, alerts) return the whole list unless a limit or cursor is given; the others default to 50 (100 for deliveries, outbox and backup reports). An unknown cursor answers 400.
  • Background exports (Audit → Export, Audit → API requests → Export; POST /api/exports {kind: audit|api_requests|backup_reports|machines, format, params}): every matching row — nothing is cut off — written page by page in the background (oldest first, up to a snapshot taken when the export starts), gzip-compressed, with progress, row count and SHA-256; download as a plain file or .gz for 7 days. Only the requester sees and downloads an export; starting and downloading are audited; at most five run per organization at a time. The immediate GET /api/audit?export= answers 413 (use_background_export) above 10,000 entries instead of truncating.
  • Retention (Settings → Retention; console-wide, changed by owners of a top-level organization with a recent sign-in): days to keep the audit log (default forever; at least 365), backup reports, AI transcripts, report runs, the API request log, SSO diagnostics, webhook deliveries, the notification outbox, machine diagnostics and ended sessions. Cleanup runs with the periodic jobs (or Save and clean up now). The audit log is pruned only up to the newest signed checkpoint older than the limit and never past entries an enabled SIEM destination has not forwarded; the prune is recorded (append-only), verification starts from that checkpoint, and nothing is pruned while the chain does not verify. AI transcripts whose audit entry was pruned say so when viewed.
  • Reports (Reports; /api/reports): a catalog of reports — backup status (last result, last success, success rate), failed backups, storage growth, machine inventory, machines not seen, access review (roles and where they come from, two-factor, API tokens, last activity, membership end) and audit summary — each limited to the roles that may see its data. Run one for 1–365 days and download CSV (spreadsheet formulas neutralized), JSON or text. Schedules send a report daily, weekly or monthly at a local hour in a chosen time zone (DST-aware) to notification channels: emails get the file attached (up to 1 MB, else a pointer to the run) plus a text table; chat and webhooks get the summary and run id. Every run is kept (last 500) with status, rows, summary, the downloadable result and per-channel delivery; Send now runs a schedule immediately.
  • API request log (Audit → API requests; GET /api/api-requests?result=ok|refused&tokenId=): every request made with an API token — accepted (authorized) or refused, with the reason (unknown/expired/revoked token, missing permission, not allowed with a token, network) — plus session requests refused by the organization's network rule; method, path, status, token, user, address and client. Kept 30 days.
  • SSO diagnostics (Settings → SSO → Diagnostics): the last 200 sign-ins per provider, step by step — the identity provider's answer, discovery, code exchange, identity token check (expected vs. received issuer and audience, issue/expiry times and the server's clock), nonce, user info, claims received (names plus subject, email, verification, name, groups), SAML response check and assertion attributes, the console-account decision and the sign-in — with the failing step and error. Tokens, assertions and signatures are never stored.
  • SIEM forwarding (Audit → SIEM): stream the audit log to syslog (RFC 5424 over UDP, TCP with octet counting, or TLS with an optional trusted CA), Splunk HTTP Event Collector (token), any HTTPS collector (JSON batches; an optional secret is sent as a bearer token and signs the body like webhooks) or a JSON-lines file in SIEM_JSONL_DIR (for log shippers). Each event is the full audit record including its sequence and hash-chain fields. Every destination keeps a cursor: entries are sent in order, at most once per acceptance, and a destination that is down keeps its place, retries with the shared backoff (1 min → 6 h) and catches up; the backlog, last error and next retry are shown. Start from now or send the history (backfill); optionally include child organizations. Internal addresses are refused unless SIEM_ALLOW_PRIVATE=1. Changes need audit export permission and a recent sign-in.
  • Fleet policies push a backup job template to every machine with the targeted tags. Machines create, update and remove the managed job (policy-<id>) and acknowledge the version they applied. A policy marked Also apply to child organizations reaches machines of child organizations too (not across a detached organization); it brings its own organization's credentials. A child organization sees such policies under From parent organizations and can opt out (also for the organizations below it) or replace one with its own policy of the same name — unless the parent locked it: then it always applies, opt-out is refused and same-named child policies are refused (and ignored if they predate the lock). Compliance on the parent counts the child machines running an inherited policy.
  • Credentials (passphrases, cloud keys) are stored sealed and can be replaced but never read back. Each replacement is a new version (history: who and when, never the secret). Machines whose policies use a credential fetch the new version on their next heartbeat without their jobs being rewritten, and report the version they hold; the Credentials page shows how many machines have the current version and which are still waiting.
  • App settings set update channel, update blackout window, proxy, AI limits, machine-wide transfer caps and the drive mount profile for every desktop (see silent-install.md). The mount profile can limit which kinds of drives may be mounted, mount everything read-only, force the cache mode of cloud drives (up to Full for offline use), cap the cache size and how long cached files are kept, and require mount points inside a folder (~/Drives). It governs new mounts: forced options replace the user's choice, limits cap it, and the desktop shows what the profile changed. Organization workflows (same page) install automation rules on every desktop: paste a rule from the desktop's Copy as JSON, give it a name (the id defaults to it) and enable or disable it. Desktops install them as org-<id>, read-only for users, keep their run statistics and history across updates, and remove them when they leave the list. Rules that run programs (run_command, execute_custom_command, anywhere in a workflow) are refused, as are more than 50 workflows or one larger than 256 KB; the console and the desktop check the same rules.
  • Server accounts and access (same page, Server accounts and access (ufop-server)): accounts (user name, Argon2 password hash from ufop-server hash-password, role admin/operator/viewer, disabled) and per-job access rules (principal, jobPattern, permission) as JSON (serverAccess). Every registered ufop-server provisions them read-only (organization in its web UI; editing them there is refused), replaces them on each change and removes them when the section is cleared. An organization account never replaces a local account of the same name. Plain passwords are refused; see server-operations.md.
  • Server web UI branding (same page, Server web UI branding (ufop-server)): serverBranding as JSON (titlePrefix, productName, logo as a data:image/…;base64,… URI up to 512 KiB, accentColor #rrggbb, customCss up to 32 KiB without @import, external url() or scripts). Every registered ufop-server applies it over its own branding and refuses local changes while it is set; see server-operations.md#web-ui-branding.
  • Policy as code (Fleet → Policy as code; GET /api/fleet/policy-as-code, POST /api/fleet/policy-as-code/plan, PUT /api/fleet/policy-as-code): fleet policies, managed app settings and alert rules as one JSON document (apiVersion: ufop.policy/v1) to keep in version control. Items match by name; notification channels and central credentials are referenced by name (central-name:<name>), so a document exported from one organization applies to another that has the same names — secrets are never exported. Review changes lists what applying would create, update (with the fields) or, with Delete items the document doesn't list, delete; Apply does it in one transaction (a document with any invalid item changes nothing) and is audited as fleet.policy_as_code. Export needs fleet and alert read permission; apply needs both write permissions.
  • Diagnostics: machines upload scrubbed log bundles on request (machine page → Diagnostics) or from the app.
  • Webhooks (Integrations → Webhooks): subscribe URLs to console events — backup results (backup.success|warning|error|cancelled), alerts (alert.opened|resolved) and every audit event type (machine.register, credential.rotate, …), by exact name, prefix.* or *. Each delivery is a JSON POST with X-UFOP-Event, X-UFOP-Delivery, X-UFOP-Timestamp and X-UFOP-Signature: sha256=HMAC-SHA256(secret, "<timestamp>.<body>"). Failed deliveries are retried after 1 min, 5 min, 30 min, 2 h and 6 h, then marked failed; after 15 failures in a row the webhook is paused until resumed. The delivery log shows status, attempts and responses, and any delivery can be sent again. Internal addresses (loopback, private, link-local) are refused unless WEBHOOKS_ALLOW_PRIVATE=1; redirects are not followed.
  • Passwords (Settings → Security; My account → Password): new passwords need 12+ characters, three character classes or 16+ characters, no repeats/sequences, no common passwords, and not the user's name or address (a strength meter shows why). Organizations can require a new password after N days; accounts in several organizations follow the strictest. An expired password still has to be correct: the sign-in then leads to a 15-minute page to choose a new one. Forgot your password? e-mails a one-hour, single-use link through the organization's account-mail channel; the answer is the same whether or not the account exists, and requests are rate-limited. MFA still applies after a reset.
  • Passkeys (My account → Passkeys; Sign in with a passkey on the sign-in page): WebAuthn credentials (Face ID/Touch ID, Windows Hello, security keys; ES256, EdDSA, RS256). The relying party is the console's public origin (ADMIN_PUBLIC_URL behind a proxy). A passkey used with a PIN or biometric counts as two-factor sign-in and satisfies a two-factor requirement; the last second factor cannot be removed while one is required. Wrong origins or sites, replayed challenges, bad signatures and signature counters that go backwards (copied keys) are refused and audited.
  • Sessions: every sign-in creates a server-side session (at most 8 hours). Signing out ends it; My account → Sessions lists where the account is signed in and can end any of them; changing or resetting the password ends the others; administrators can sign members out everywhere (Users → bulk sign out), and deactivation does too. Settings → Security can sign out sessions idle for 5–480 minutes (strictest organization wins).
  • Step-up confirmation: sensitive changes (security settings, single sign-on, SCIM tokens, central credentials, webhooks, removing members and changing roles, adding or removing passkeys) need a sign-in or confirmation within the last STEP_UP_MINUTES (default 10). Otherwise the console asks you to confirm — with your authenticator code or a passkey (with PIN/biometric) when the account has them, else your password; single sign-on accounts sign in again — and then repeats the change. Confirmations are audited as auth.reauth / auth.reauth_failed and rate-limited.
  • API tokens (My account → API tokens): personal tokens for scripts, sent as Authorization: Bearer ufop_cat_… (no session cookie). Each has a name, an expiry (1–365 days) and a chosen subset of your permissions (read-only, everything your role allows, or a custom list); on every request it is further narrowed to what your role allows now, so demoting or removing you narrows or ends it, and deactivation revokes it. Tokens cannot change account or sign-in settings, mint tokens, switch organization or make step-up changes; the organization's allowed networks apply. Only a hash is stored; last use (time, address) is shown; administrators with user management can list (?all=1) and revoke members' tokens. Created/revoked tokens and every audited change made with one (metadata apiToken) are in the audit log.
  • View as (Users → eye icon; POST/DELETE /api/view-as): see the console exactly as a member sees it — their organizations, role and scoping — to answer "why can't they see X?". It is read-only: the session gets only the member's read permissions and every change is refused (view_as_read_only) until you stop; only user managers can start it, after a recent sign-in, for members whose role is not above their own, for 5–60 minutes (default 30; it ends by itself). A banner shows it on every page. Start, stop and expiry are audited (user.view_as_start|stop|end) under the administrator's name, and every request made meanwhile is in the API log as viewing as <member>. API tokens cannot use it.
  • Explain access (Users → ? on a member; GET /api/users/:id/access?permission=): every role grant that could reach the member — direct membership and groups in this organization and its parents — marked as applying or not (and why: a group that does not delegate to children, a detached organization on the way), the resulting role and permissions (the highest applying role wins), machine scoping from group grants for the user role, the sign-in rules (account active, membership end, two-factor, allowed networks), and a yes/no answer for a chosen permission. It is computed by the same code that enforces access. Anyone can explain their own access; others need user read permission.
  • Time zone (My account → Profile): times in the console are shown in your chosen IANA time zone (default: the browser's); date inputs such as membership end dates are read in it too. The profile also sets your display name.
  • Removing members (Users → remove): optionally name a successor, who becomes owner of groups the member was the last owner of and replaces them as an alert email recipient (without one, the address is dropped where other recipients remain). The member leaves the organization's groups, their API tokens there are revoked, and an account left without organizations is disabled and signed out. Recently removed lists removals for 30 days with Restore (role, groups and account come back); after that the record is purged and accounts left with nothing are deleted. Membership end (calendar icon) removes a member on a date the same way (never the last owner). Removal, restore and end dates need a recent sign-in and are audited.
  • Inactive access (Settings → Security): with Retire after N days (30–3650; 0 = never), the background jobs remove members whose last activity — sign-in, session use or API token use, else when they joined — is older than N days (the account is disabled, its sessions and tokens revoked, when it belongs to no other organization) and revoke API tokens unused that long. Owners are never retired; retired members can be restored like removed ones; access granted only through groups is managed on the group. Audited as user.retired_inactive / api_token.retired_inactive.
  • Allowed networks (Settings → Security): restrict console access to IP addresses / CIDR ranges (IPv4 and IPv6). Enforced on every request and at sign-in (an account in several organizations lands in one that admits the address; otherwise the sign-in is refused and audited as auth.login_failed); signing out always works, and agent and SCIM endpoints are not affected. A list that excludes the address you save from is refused, so you cannot lock yourself out. The client address is the X-Forwarded-For entry added by your proxy: set TRUSTED_PROXY_HOPS to the number of proxies in front of the console (default 1) and never expose the console directly. ufop-server has the same control for its own clients: --allowed-cidrs / UFOP_SERVER_ALLOWED_CIDRS (matched against the TCP peer, so forwarded headers cannot bypass it).
  • Required two-factor sign-in (Settings → Security): when on, every member must use an authenticator app. Until they enroll, their session (including sessions started before the rule) can only reach enrollment, session info and sign-out; the console sends them to My account. Optionally exempt single sign-on when the identity provider enforces MFA. Members of several organizations follow the strictest rule, and MFA cannot be turned off while required.
  • CSV user import (Users → Import CSV): columns email (required), role, group, group_role. The server previews every row (invite, skip — already a member — or the reason it cannot be imported: invalid address, duplicate, unknown role or group, a role above yours), then invites the valid rows through the normal invitation flow (e-mail via the outbox when an invitation channel exists). Up to 1,000 rows / 1 MB; audited.
  • SCIM 2.0 provisioning (Users → SSO & provisioning): create a token (shown once, with a default role for provisioned users — never an admin role) and give the identity provider the tenant URL https://<console>/api/scim/v2. Supported: Users and Groups (GET with eq filters on userName/externalId/emails/displayName/active/id and paging, POST, PUT, PATCH with the operation shapes Entra ID and Okta send, DELETE), ServiceProviderConfig, ResourceTypes, Schemas. active: false or DELETE removes the user from this organization (and disables the account when it belongs to no other); reactivation restores it with the default role. An existing account from another organization is linked rather than duplicated. SCIM never changes users who are owners/admins/security admins of the organization, nor groups created in the console (which may grant roles). Every change is audited as scim:<token name>.
  • Billing (Billing; STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET, STRIPE_PRICE_BUSINESS = the monthly per-seat price id, STRIPE_PRICE_BUSINESS_ANNUAL = the yearly one, BILLING_TRIAL_DAYS, BILLING_ALLOW_PROMOTION_CODES): owners of organizations that own their license (top-level or detached) subscribe with a seat count through Stripe Checkout (needs a recent sign-in), then change seats, payment method or cancel in the Stripe billing portal; invoices are listed with links. Point a Stripe webhook at https://<console>/api/billing/webhook for checkout.session.completed, customer.subscription.created|updated|deleted|trial_will_end, customer.updated and invoice.paid|payment_failed; create the endpoint with API version 2024-06-20, the version the console's own calls use (webhook payloads follow the endpoint's version; the console also reads discounts[] and the item's current_period_end as newer versions send them). Deliveries are verified (Stripe-Signature, 5-minute tolerance) and applied once each: an active, trialing or past-due (grace) subscription sets the license plan and seats; an ended or unpaid one returns the organization to Starter (5 seats); an unknown price leaves the license unchanged. Subscriptions, payments and failed payments are audited (billing.*). Without Stripe settings, licenses stay manual.
    • Monthly or annual: the Billing page has a Monthly / Annual toggle; annual needs STRIPE_PRICE_BUSINESS_ANNUAL (the Business annual price is $95.90 per machine per year, 20% less than twelve months at $9.99). The subscription's interval is shown on the page and kept per organization.
    • Free trial: an organization's first subscription starts with a trial of BILLING_TRIAL_DAYS days (default 14, the length the marketing pricing page promises; 0 turns trials off). No card is collected to start it (payment_method_collection=if_required); a trial that ends without a payment method is cancelled by Stripe and the organization returns to Starter. While trialing, the subscribed plan and seats apply (the seat limit is enforced at machine registration as usual) and the Billing page shows a banner with the days left and the date; "Manage subscription" opens the portal to add a card. Each organization gets one trial: any earlier subscription (trial, paid or cancelled) uses it up, and organizations that subscribed before trials existed never get one. Because webhooks can lag, starting a checkout for a customer the console already knows first asks Stripe whether that customer has any subscription (status all) and drops the trial if so; a lookup failure stops the checkout rather than guess. Only one checkout session stays open per organization: starting a new one expires the earlier one, so two browser tabs (or two owners) cannot both start a trial. The console records whether a payment method is on file (the subscription's default and the customer's default, from customer.updated — subscribe the webhook to it, otherwise a card added in the billing portal is never seen); the Billing banner and the trial-ending notice say the trial converts to a paid subscription when one is, ask for a card only when both defaults are known to be empty, and otherwise tell the owner to check the billing portal. The "Start N-day free trial" button follows the console's own record; if Stripe already knows the customer has a subscription the console has not heard about yet, the trial is dropped when the checkout starts and Stripe Checkout shows the real terms. Three days before the trial ends Stripe sends customer.subscription.trial_will_end: it is audited (billing.trial_will_end, so webhook subscriptions can receive it) and delivered to every enabled notification channel of the organization (email, Slack, Teams, webhook) through the outbox, with retries.
    • Coupons: Checkout shows Stripe's promotion-code field unless BILLING_ALLOW_PROMOTION_CODES is 0/false; the Billing page mentions it only while it is shown. The coupon applied to the subscription (name, percent or amount off, duration) is shown on the Billing page and cleared when the coupon is removed or the subscription ends. Create coupons and promotion codes in the Stripe dashboard. Lifetime purchases are not offered.
  • Branding (Settings → Branding; orgs.write): the organization's name, brand color (applied to the console's primary color) and logo (PNG, JPEG, GIF or WebP up to 256 KB, checked against its file signature) in the console, a support email and link, and email branding: email channels then send an HTML version in the brand color with the logo inline, the footer, and the sender name when the channel's From has none. Email templates for invitations, password resets, alerts, resolved alerts and scheduled reports take {{placeholders}} (unknown ones are refused; invitations and resets must keep {{link}}), with a live preview using example values and Send me a test through an email channel. Child organizations inherit their parent's branding until they set their own (detached organizations do not inherit); unbranded organizations keep the standard plain-text email.
  • Notification outbox (Alerts → Deliveries): every alert, summary and invitation sent through a channel (email/SMTP, Slack, Teams, webhook) is recorded. The first attempt is immediate; failures are retried on the same schedule as webhooks and then marked failed. Messages can be retried now or discarded; sent and discarded ones are kept 30 days. Channel Test sends directly.
    • Policies reference them as central:<id>.
    • They are delivered only to authenticated agents that a policy targets, with Cache-Control: no-store.
    • Agents keep them in the OS keychain.
  • Alerts:
    • Rules: backup failed (optionally on warnings), missed backup (schedule from the client, or an assumed interval, plus grace), backup not arrived by a set time (local time in an IANA time zone, chosen weekdays, grace; a successful backup must arrive between the previous deadline and this one), unusual changed or deleted file counts, unusual duration (median and standard deviation of earlier runs).
    • Open alerts can be acknowledged (they stay open, no further notifications) or snoozed for up to 30 days; both are audited and visible on the alert.
    • Rules are scoped by tags, use a cooldown and can notify on resolve.
    • Channels: SMTP email (STARTTLS/TLS, custom CA), Slack, Microsoft Teams (paste the URL of a "Post to a channel when a webhook request is received" workflow; messages arrive as Adaptive Cards), and signed webhooks (X-UFOP-Signature: sha256=<HMAC of body>).
  • AI insights: organization-level Anthropic API key (sealed), on-demand analysis of a machine or the whole fleet, and daily or weekly summaries sent to channels. Only report metadata is sent; file names, paths and secrets are not. Every run keeps its full transcript (system prompt, request with the snapshot, response or error); its SHA-256 is recorded on the audit chain (ai.transcript), and Transcript on a report (AI and audit read permission) shows it with a check that it is unchanged and the chain verifies. Viewing is audited. On the desktop, AI actions and assistant chat transcripts are appended to the app's tamper-evident audit chain (ai.* events, covered by its signed anchors and export) and the AI audit log reads from it, so it survives restarts.

Agent protocol (summary)

All agent calls carry Authorization: Bearer ufop_agent_…, except registration and claiming.

CallPurpose
POST /api/agent/register {registrationToken, info, tags}Returns {machineId, agentToken, heartbeatSeconds}.
POST /api/agent/claim {info}, then POST /api/agent/claim/poll {claimId, secret}Returns the token once the claim is approved.
POST /api/agent/heartbeat {info, jobs, policySetVersion}Returns pending commands, the heartbeat interval and whether policies changed.
GET /api/agent/policies, POST /api/agent/policies/appliedFetch managed jobs and credentials; acknowledge versions.
POST /api/agent/reportRun result, plus stats {version_count, backend_size, source_size, schedule_interval_minutes}.
POST /api/agent/commands/<id> {ok, result}Complete a remote command.
POST /api/agent/rotateRotate the token.
POST /api/agent/unregisterUnregister the machine.

Tests

pnpm --dir admin test covers:

  • migrations, sessions, audit;
  • tenancy and isolation;
  • the agent protocol and fleet;
  • alerts over a real SMTP server and local Slack/webhook endpoints;
  • AI against a local Messages-API stream;
  • SSO against a live oidc-provider and SAML responses signed by a samlify IdP.

The SMTP cases expect the local aiosmtpd server on 127.0.0.1:2525 (UFOP_TEST_SMTP_DIR, UFOP_TEST_SMTP_CERT).

Connector provisioning and shared workspaces

Connectors persists organization-scoped storage definitions and grants them to explicitly selected, active desktop agents in that organization. Supported provisioning protocols are SFTP, FTP/FTPS, WebDAV, SMB, NFS, S3, Azure Blob, ADLS Gen2, Azure Files and B2. Create secrets in Fleet → Credentials; definitions contain references rather than passwords. OAuth and rclone connections continue to be configured on each desktop.

Shared Workspaces groups those definitions and grants the set to selected desktops. Edit a workspace to add or revoke a desktop. Storage authorization remains the responsibility of the remote account; a console grant does not change a remote server's ACLs. The console requires the corresponding read/write permissions, recent authentication for mutations, and records changes in its audit chain.

Agents receive a full snapshot with their fleet policy bundle. The desktop installs saved connections with a Managed badge, keeps secrets in its secure store and acknowledges the actual revision after installation succeeds. Pending means no acknowledgement; Failed includes the agent's installation error and retries on a later heartbeat. Changes and credential rotations generate a new revision. Removing the last grant removes the managed profile on the next successful sync, without deleting personal connections. Offline agents retain their prior configuration until they reconnect; revoking an agent token removes managed profiles when the agent observes the refusal.

Test endpoint performs a bounded TCP reachability check. It does not claim authentication or folder access succeeded. Private targets are refused unless the console operator enables CONNECTORS_ALLOW_PRIVATE=1 for a trusted corporate network.

Local CI and GHCR images

GitHub Actions stay disabled. Run pnpm verify for the local gate, or install its pre-push hook with pnpm hooks:install. The gate includes zero-warning lint, type checks and tests for desktop, admin and marketing, strict Rust checks, contract checks and production builds. --fast skips production builds, native integration tests and the optional Windows target check. Rust uses the pinned toolchain in rust-toolchain.toml.

./scripts/build-push-ghcr.sh all runs the full local gate and publishes admin and marketing images with immutable full commit SHA tags. It refuses dirty source and an existing SHA tag. --dry-run prints the plan without publishing. Images carry source/revision labels and provenance. Native desktop releases are packaged separately.

docker-compose.admin.ghcr.yml is an explicit, separate admin stack. Set IMAGE_TAG, ADMIN_DOMAIN, ADMIN_PUBLIC_URL, NEXTAUTH_SECRET, and ADMIN_ENCRYPTION_KEY before use. Keep encryption keys stable across redeployments and back up the admin-data volume. Publishing an image does not deploy this stack or invent a production hostname.