Skip to main content

Compliance page

The Compliance page scores the running proxy against privacy and security regimes, keeps stored data within a retention period, holds model traffic to a region and serves access or erasure requests from the people whose data the gateway holds. Open it at /ui/compliance. In the left nav it sits in the Settings group, inside the Settings item, as Compliance. The nav item is shown to the Admin and Admin Viewer roles (proxyAdminTierRoles, which covers proxy_admin and proxy_admin_viewer). The page itself has no separate role guard, but every request it makes goes to routes that only admins can read.

Each tab has its own license check. Controls, Retention, Data Residency and Data Subject Requests need the license feature compliance (shown as "Compliance"). Evidence needs compliance_evidence (shown as "Compliance evidence bundles"). Sanctions needs no license for the jurisdiction policy. The proxy enforces the same features on its routes, so a request without the feature is refused even when the screen is shown.

The page opens with a short description of what it does. When you cannot change anything it adds "You can view every section, but only a proxy admin can change settings or run requests." The selected tab is kept in the URL, and the first tab, Controls, is the default.

TabLicense featureWhat it covers
ControlscompliancePass or fail results for each control of each regime, with saved snapshots.
Evidencecompliance_evidenceEvidence bundles for auditors, stored with a SHA-256 checksum.
RetentioncomplianceHow long each table is kept, and a manual cleanup run.
Data ResidencycomplianceA required model region, its enforcement and what breaks it.
Data Subject RequestscomplianceExport and erasure for one internal user or end user, with a history.
SanctionsnoneThe jurisdiction policy, and on Spanway Cloud the screening review queue.

A real-world scenario​

A GDPR review finds that request logs are kept forever, and the Controls tab shows gdpr.storage_limitation as Fail. The privacy officer sets request logs to 30 days on the Retention tab, runs the cleanup once, and saves a snapshot so the auditor can see the control turn to Pass on that date.

Steps​

  1. Open Settings, then Compliance in the left nav, or go to /ui/compliance. On the Controls tab pick EU GDPR under Regime and set the filter to Fail.

  2. Open the Retention tab, type 30d in the Retention period of the spend logs row and click Save changes. The same with the API:

    curl -X PATCH http://localhost:4000/compliance/retention \
    -H "Authorization: Bearer $SPANWAY_MASTER_KEY" -H "Content-Type: application/json" \
    -d '{"maximum_spend_logs_retention_period": "30d"}'
  3. Click Run cleanup now, then Run cleanup in the dialog, and read the Cleanup results.

  4. Go back to Controls, check that the control passes, and click Save snapshot. The report and the snapshot with the API:

    curl "http://localhost:4000/compliance/report?regime=gdpr" -H "Authorization: Bearer $SPANWAY_MASTER_KEY"
    curl -X POST http://localhost:4000/compliance/report/snapshot \
    -H "Authorization: Bearer $SPANWAY_MASTER_KEY" -H "Content-Type: application/json" -d '{"regime": "gdpr"}'

Expected result​

Kept for reads "30 days" on the spend logs row, the cleanup results list the rows deleted, gdpr.storage_limitation shows Pass, and Snapshot history lists the new snapshot.

Controls tab​

The Controls tab evaluates every control in the chosen regime against the live configuration and shows the result.

ControlTypeWhat it does
RegimeDropdownChooses which regime to evaluate. The default is All regimes. The other options are EU GDPR, UK GDPR, CCPA / CPRA, HIPAA, EU AI Act, SOC 2, ISO/IEC 27001, PIPEDA, LGPD, PDPA (Singapore) and Australian Privacy Act. The choice is kept in the URL as regime.
"Evaluated" timeTextWhen the shown report was evaluated.
HistoryButtonOpens the Snapshot history panel.
Save snapshotButtonStores the current report for the chosen regime so auditors can see later how the posture changed. It reads Saving... while it runs and is disabled until a report has loaded. Shown only to proxy admins. A toast confirms "Snapshot saved for" the regime.
All statusesFilterNarrows the table to Pass, Fail or Not applicable controls.
RefreshIcon buttonEvaluates the controls again.
ColumnsMenuShows or hides table columns.

Four tiles sit above the table.

TileMeaning
ScoreThe share of applicable controls that pass, as a percentage, with a meter under it. The hint reads, for example, "4 of 5 applicable controls pass". When no control applies it shows n/a and "No applicable controls". The meter turns amber under 80% and red under 50%.
PassedHow many controls pass, out of the total.
FailedHow many controls fail, out of the total.
Not applicableControls that do not apply here. They are "Excluded from the score".

The table is sorted by Status by default, with failing controls first, and shows 50 rows per page.

ColumnMeaning
StatusA badge, Pass (green), Fail (red) or Not applicable (grey). Sortable.
RegimeThe regime the control belongs to. Shown only when All regimes is selected. Sortable.
ControlThe control title, with its ID under it. Sortable.
CitationThe article or clause the control maps to.
EvidenceWhat the proxy found when it evaluated the control.

Snapshot history panel​

The panel titled Snapshot history lists saved snapshots, newest first, 10 per page. Its description reads "Each snapshot stores the full report as it was evaluated, so auditors can see how the posture changed." Snapshots cannot be deleted from here.

ColumnMeaning
TakenWhen the snapshot was saved.
RegimeThe regime it covers, or All regimes.
ScoreThe score at that time.
ControlsHow many controls passed and failed, for example "12 passed, 2 failed".
ByWho saved it.

Evidence tab​

The Evidence tab bundles the control map for ISO/IEC 42001 and SOC 2, audit log verification, retention, access control, guardrails, eval and red-team results and change history for your auditors. Each bundle is stored with a SHA-256 checksum. The tab says plainly that a bundle is evidence for your own assessment and does not certify the deployment.

ControlTypeWhat it does
Evidence windowDropdownHow far back the bundle looks, Last 30 days, Last 90 days, Last 180 days or Last 365 days. The default is Last 90 days. Shown only to proxy admins.
Generate bundleButtonBuilds and stores a new bundle for the chosen window. It reads Generating... while it runs. A toast confirms "Evidence bundle" with the first 12 characters of its checksum, then "stored". Shown only to proxy admins.

The table lists stored bundles, newest first, 10 per page.

ColumnMeaning
GeneratedWhen the bundle was built.
TriggerManual for a bundle generated here, Scheduled for one the proxy built on its own schedule.
WindowThe covered dates, from the first day to the last.
SHA-256The first 12 characters of the checksum. Hover to see the full value.
ByWho generated it.
DownloadJSON saves the full bundle as spanway-evidence-<id>.json. Report saves a readable HTML report as spanway-evidence-<id>.html.

When you download the JSON and the stored bundle no longer matches its checksum, the page shows the error "The stored bundle no longer matches its checksum". The file is still saved, so treat it as tampered or damaged and do not hand it to an auditor.

Retention tab​

The Retention tab sets how long each table is kept. Retention keeps the database small and lets you keep privacy promises, because rows older than their period are deleted for good. The cleanup job runs once a day by default. To change when it runs, set maximum_spend_logs_retention_interval (such as 6h) or maximum_spend_logs_cleanup_cron (such as 0 3 * * *) under Router Settings, General, see when the cleanup runs. The line under the description shows "Last cleanup run" with the time, or "Cleanup has not run yet".

Every period is blank by default, which keeps that table forever. Setting a period turns deletion on for that table from the next run. Clearing it turns deletion off again, but rows already deleted do not come back. Only a proxy admin should change these, ideally after agreeing the periods with whoever owns your privacy policy.

ControlTypeWhat it does
Run cleanup nowButtonOpens the cleanup confirmation. Disabled while the periods load. Shown only to proxy admins.
Save changesButtonSaves every edited period together. If the gateway refuses one of them, for example because it is set in config.yaml, none of them is saved and the error toast shows the gateway's reason. It is disabled until a period changes and while any edited value is invalid. It reads Saving... while it runs. A toast confirms how many periods were saved, and the change is written to the audit log. Shown only to proxy admins.

The table has one row for each table the proxy can clean up.

ColumnMeaning
DataWhat the table holds, with the table name under it. Some rows add a plain note on what changing them also does: the request log row says it also shortens every table that is never kept longer than request logs, the audit log row says chain verification then starts at the oldest row kept, the sanctions row says those records are never deleted, and capped rows say they are still deleted once request logs have a period.
Kept forThe period the cleanup job really applies, for example "90 days". A table that copies prompts and answers reads, for example, "30 days, capped by request logs" when the request log period is shorter than its own, or when it has none. When nothing applies it reads "Kept forever", or "Not set," followed by the default that applies on Spanway Cloud when the proxy reports one. The sanctions row reads "Kept, never deleted" or the period followed by "never deleted".
Retention periodA text field for proxy admins, with the placeholder e.g. 90d. Other roles see the current value as plain text.

A period is a positive whole number followed by s, m, h, d, w or mo, for example 30d, 12w or 6mo. The words hourly, daily, weekly and monthly are also accepted. Zero is refused with "The period must be longer than zero", and anything else shows "Use a number with s, m, h, d, w or mo, for example 30d, 12w or 6mo" under the field. Clearing a field and saving removes that setting, so the table is kept forever again (or the Spanway Cloud default applies).

Run cleanup dialog​

The dialog titled Run cleanup now? says that rows older than their retention period are deleted from the number of tables the job really cleans, counting capped tables and leaving out sanctions records, and that this cannot be undone. Cancel closes it. Run cleanup starts the job and reads Running... while it runs. It is disabled when no table has a period.

When the job finishes, the dialog title changes to Cleanup results and explains that the job stops on its own when a table is clean or the time budget runs out. A table lists each Table, its Rows deleted and Stopped because. If no period is set, a notice titled Nothing to clean up says the job had nothing to delete. If another gateway instance is running the cleanup at that moment, or the run fails, the dialog stays open and an error toast shows the gateway's reason, for example "Another gateway instance is running the retention cleanup now. Try again when it finishes". Done closes the dialog. The deleted rows are gone for good, and the run is written to the audit log with object_id retention:run.

Data Residency tab​

The Data Residency tab sets a region that end users, keys, teams and organizations should be held to, and lists what does not comply. Existing records are not changed when you set a region.

ControlTypeWhat it does
Required model regionDropdownNo region required, EU, United Kingdom, Switzerland, US, Canada or Asia Pacific. Saving happens as soon as you pick a value. A toast confirms "Model traffic now has to stay in" the region, or "Region requirement cleared". Proxy admins see the dropdown, and other roles see the current value as a badge.
Enforce on every requestSwitchWhen on, every request is held to the required region, and a deployment outside it, or one with no declared region, is never chosen. When off, the region is only reported. It is disabled while no region is required. Other roles see an Enforced or Report only badge.

Three tables list what breaks the requirement. Each heading shows how many rows failed out of how many were checked.

TableColumns
End usersEnd user (alias and ID), Region, Problem.
DeploymentsDeployment (alias and ID), Region, Problem.
Keys, teams and organizationsKey, team or organization (type, alias and ID), Allowed regions, Problem.
Problem badgeMeaning
No region set (amber)The record has no region.
Other region (red)The record declares a different region.
Reaches outside (red)The record allows regions wider than the required one.

The Data policy table lists every deployment with its declared terms. The heading line sums up how many scopes require zero data retention, forbid training or restrict code traffic, and how many deployments meet each rule or have undeclared terms.

ColumnMeaning
DeploymentThe model name, with the deployment ID under it.
RetentionThe provider's declared data retention, or Undeclared.
Trains on dataYes, No or Undeclared.
RegionThe declared region.
Meets ZDRYes or No, whether the deployment qualifies for zero data retention traffic.
Meets no trainingYes or No, whether it qualifies for traffic that forbids training.
Code trafficYes or No, whether it may serve code traffic.

Data Subject Requests tab​

The Data Subject Requests tab serves a subject access request by exporting everything the proxy holds about a person, or an erasure request by deleting their records and pseudonymising their request logs. Both include Spanway Cloud signups and the copies Lens keeps. A request Lens could not finish is recorded as partial.

The request form is shown only to proxy admins. Next to the form a How data subject requests work link opens the data subject request docs. A team that receives requests by email or form can sort them first with the data subject request intake template.

To answer a request from a customer of your app who asks for their data:

  1. Open Compliance and the Data Subject Requests tab.
  2. Pick End user (customer) under Subject type. Pick Internal user instead for someone who signs in to the gateway.
  3. Enter the id under Subject id, as the help text under it says, and click Export data.
  4. In Export ready, click Download JSON and send the file through your data protection process.
  5. For an erasure, click Erase data, type the id again and click Erase data in the dialog.

The same export from a script:

curl -X POST http://localhost:4000/compliance/data_subject/export \
-H "Authorization: Bearer $SPANWAY_MASTER_KEY" -H "Content-Type: application/json" \
-d '{"subject_type": "end_user", "subject_id": "acct-48213"}'

The answer holds request (the recorded row, kind export and status completed) and export (everything held). The new row appears at the top of Request history.

ControlTypeWhat it does
Subject typeDropdownInternal user (someone who signs in to the gateway, found by user id) or End user (customer) (a customer your app sends as user, found by the id the Customers page lists). The help text under the dropdown says the same. The default is Internal user.
Subject idText inputThe ID to look up. The placeholder is user_id or end user id. Spaces around the value are ignored. On Spanway Cloud an end user is stored per tenant as <organization_id>/<user>, so enter the ID as the Customers page lists it.
Export dataButtonExports everything held about the subject and opens the Export ready dialog. It reads Exporting... while it runs and is disabled while the ID is empty. If the subject is not found, nothing is exported and an error toast says so.
Erase dataButtonOpens the erase confirmation. Disabled while the ID is empty.

Export ready dialog​

The dialog says it holds everything known about the subject, with secrets left out, and that the request is recorded in the history. A summary lists counts for the profile, virtual keys, team and organization memberships, request logs, audit log entries, access requests, earlier data subject requests, memories, provider credentials (provider and dates only), MCP credentials and environment variables (server and dates only), model access requests, Spanway Cloud tenants (no password hash or card), Lens request logs and spans, and account records such as daily spend rollups, archived deleted keys (no key hash), linked SSO identities, MFA enrolment (no secret) and invitation links (no link token).

When there are more request logs than fit, the dialog says only the first part is in the bundle. When Lens holds more than 1,000 request logs or spans, only the newest 1,000 of each are included. If Lens could not be read, a notice titled Export is partial explains why and tells you to fix the Lens connection and export again.

The full JSON is shown below the summary. Copy JSON copies it, Download JSON saves it as data-subject-<type>-<id>-<time>.json and Close closes the dialog. The export holds personal data, so store and send it the way your data protection process requires.

Erase dialog​

The dialog titled Erase this subject's data? explains what happens. The profile, its keys, credentials and memories are deleted, and its ID in request logs, daily rollups and archives is replaced with a pseudonym so totals stay correct. A closed Spanway Cloud workspace it owns is blanked, and an open one must be closed first. Copies in Lens are deleted too. This cannot be undone.

The dialog repeats the subject type and ID. Type the exact ID into Type the id to confirm to enable Erase data, which reads Erasing... while it runs. Cancel closes the dialog. The proxy refuses to erase a proxy admin, the caller itself or the owner of an open Spanway Cloud workspace, and the dialog then shows Erasure refused with the reason. A refused erasure changes nothing and is recorded as failed.

After a successful erasure the dialog lists what was deleted or pseudonymised, and Done closes it. If Lens could not be reached, a notice titled Erasure is partial says everything else is erased and tells you to fix the Lens connection and run the same erasure again. Earlier history rows for the subject are rewritten to show the pseudonym instead of the original ID.

Request history​

The history table is shown to every role that can open the page. It lists requests newest first, 25 per page, and has a Refresh button.

ColumnMeaning
RequestedWhen the request ran.
KindExport or Erasure.
SubjectThe subject ID (the pseudonym after an erasure), with its type under it.
StatusA badge with a tooltip.
SummaryThe counts or the error recorded for the request. Hover to see all of it.
ByWho ran the request.
BadgeMeaning
Completed (green)Every store the gateway reaches was exported or erased.
Partial (amber)The gateway records were handled but Lens copies were not confirmed. Fix the Lens connection and run the request again.
Failed (red)The request was refused and nothing was changed. The summary says why.

Sanctions tab​

The Sanctions tab says it is compliance tooling, not legal advice. IP geolocation is best effort and VPNs defeat it, so screening at signup and billing is the primary control.

Jurisdiction policy​

The heading shows the policy version and a badge, Geofence on with its scope, or Geofence off. A help line under it explains the switch in plain words. When the geofence is on, the gateway refuses requests from the restricted places in the table with HTTP 451, so the service is not used where sanctions forbid it. When it is off, nobody is refused by location. It is off by default on a self-hosted gateway and always on for Spanway Cloud, and an operator changes it with general_settings.sanctions_geofence in the config file, as the geofence page shows. The line links there too. A warning titled Policy not yet approved by counsel appears while the policy is a draft. An error titled Geofence configuration problem appears when the proxy reports one.

ColumnMeaning
PlaceThe country or region, linked to its source.
CodesThe country code, or the country and subdivision codes.
Legal basisThe measures the rule is based on.
StatusEnforced (red), Other scope or Candidate. A tooltip shows any note on the rule.

While the geofence is on, the gateway refuses requests from an Enforced place with HTTP 451, as what a refused request gets describes.

On a self-hosted gateway, a note says name screening, the review queue and OFAC report tasks run on Spanway Cloud, and this gateway applies the jurisdiction policy only. The sections below appear only on Spanway Cloud, where they need the cloud license feature.

Sanctions lists​

A card shows when the lists were published and fetched, how often they refresh, the matcher and program disposition versions and how many years records are kept. A second line explains the two screening choices in force. With on_possible_match_existing: alert, the default, a possible match on an existing customer only raises a case and an alert and service continues, and with hold their account is held until a reviewer decides. With on_list_unavailable: hold, the default, new signups wait while no usable list is loaded, and with allow they are let through unscreened. An operator changes both under general_settings.sanctions_screening. An error titled Screening settings ignored appears when that block does not validate, with the reason, because the gateway then uses every default until it is fixed. An error titled No sanctions list loaded or Sanctions lists are stale appears when screening cannot rely on the lists, with the reason a refresh was last rejected. Proxy admins see Refresh now, which fetches the lists again and reports the outcome in a toast.

Review queue​

Review queue shows the number of open cases and lists them with Customer (legal name, organization or email), Kind (a badge with the case kind and priority, red for high), Top candidate (the best list match with its list and score) and Opened. Click a row to open the case.

The case dialog titled Sanctions review case shows the screened customer's legal name, organization, email, address and the case kind. Each list candidate shows its name, list entry, score, matched name tokens, programs and badges for its disposition, country and birth year. Agreeing fields are red and conflicting fields are green, and a conflicting field never clears a name match on its own.

Proxy admins also see these controls.

ControlTypeWhat it does
Decision reasonText areaPlaceholder "Why this decision is right, for the audit record". Required for both decisions.
Disposition if confirmedDropdownBlock (freeze account and balance, file 31 CFR 501.603 report), Restrict (stop service, no blocked property) or Informational (record only, no action). The default comes from the case.
ClearButtonClears the case as a false match straight away, with no second step.
Confirm matchButtonAsks "Confirm as" the disposition, and warns that this cannot be undone from this screen. Yes, confirm records it and Back returns to the case.

OFAC report tasks​

Blocked property and rejected transaction reports are due within ten business days. Counsel files them with OFAC and records the reference here. The table shows Report (the regulation and any action for counsel), Tenant, Amount and Deadline, a badge that turns amber with three business days or fewer left and red when overdue. Proxy admins type the filing reference into the field with placeholder "OFAC reference" and click Mark filed, which is disabled while the field is empty.

Decision log​

The append-only log lists refusals, cases, decisions, report tasks and list refreshes, newest first, with the time, kind, actor and subject.

Empty, error and disabled states​

While the license is checked, a tab shows a loading state. A tab whose license feature is missing shows the tab name followed by "needs a Spanway Enterprise license", names the missing feature by its label and links to Get a trial license. If the license cannot be read at all, the tab stays hidden behind a notice titled with the tab name followed by "is hidden until the license can be checked", which asks you to reload the page or have a proxy admin check that GET /health/license answers. The Sanctions tab has no license gate, so it always shows.

The empty messages are "No controls in this regime." (or "No Fail controls." and so on when a status filter is set), "No snapshots saved yet.", "No evidence bundles yet.", "No region is required." in the residency tables until you set a region, "No deployments are configured." for the data policy, and "No requests yet" in the request history. The data policy line reads "Needs a connected database." when the proxy has no database.

A failed action shows an error toast with the proxy's reason, for example "Could not save the snapshot", the gateway's own message for a retention save or cleanup run, "Region requirement was not changed", "Nothing was exported" or "Nothing was erased". Run cleanup is disabled when no period is set, Save changes is disabled until a valid change is made, Enforce on every request is disabled until a region is required, and Export data and Erase data are disabled until a subject ID is entered.

Differences by role and license​

Only the Admin and Admin Viewer roles see the nav item. A proxy admin (proxy_admin) can use every control. Other roles that can open the page can read every tab but see no Save snapshot, Generate bundle, Run cleanup now, Save changes, region dropdown, enforcement switch, data subject request form, Refresh now, case decision or Mark filed control. The proxy enforces the same split. Every change and every data subject request needs a proxy admin, or a custom role that grants compliance.write, and reads need an admin role or a custom role that grants compliance.read. A custom role holder opens the routes through the API, the nav item stays hidden from them.

The UI decides who can change things from the session role. A proxy_admin_viewer session has the Admin Viewer role, so it reads every tab with the view only note and sees none of the change controls. The proxy also refuses its write requests with a 403 error.

Each tab is locked by its own license feature as listed at the top. The data on every tab except Sanctions also loads only when the session belongs to a licensed gateway.

Errors​

What you seeWhat it meansFix
" needs a Spanway Enterprise license"The license lacks compliance or, for Evidence, compliance_evidence.Add the feature to the license.
Screening settings ignored with a reasongeneral_settings.sanctions_screening does not validate, for example a misspelled key or refresh_interval_hours under 24, so the gateway uses the defaults.Fix the key the reason names and reload the config.
"Use a number with s, m, h, d, w or mo, for example 30d, 12w or 6mo"The period is not in a format the gateway reads.Type a period such as 30d.
"general_settings key '' is set in the config file and cannot be changed here."That period comes from config.yaml, so none of the edited periods was saved.Change it in the file, or remove it there and save again here.
"Another gateway instance is running the retention cleanup now. Try again when it finishes"Run cleanup found the job already running on another replica.Wait a few minutes and run it again.
"The retention cleanup failed with . Check the gateway logs and retry"The run stopped on an error, usually a database timeout.Read the Error during spend log cleanup line in the gateway log, then retry.
"Erasure refused" with a reasonThe subject is a proxy admin, yourself, or the owner of an open Cloud workspace.Demote the user, use another admin, or close the workspace first.
"The stored bundle no longer matches its checksum"An evidence bundle changed after generation.Do not hand it over, generate a new one.
"Nothing was exported"The subject id is not found.Check the id and the subject type.

Logs​

The page writes no log lines of its own. The actions it calls log on the gateway, as the Logs sections of Compliance and data governance, Compliance evidence export and Sanctions screening on Spanway Cloud list.

See Compliance and data governance for how controls, retention, residency and data subject requests work on the proxy, and Compliance evidence export for what an evidence bundle contains. What Spanway stores lists the tables retention applies to, Zero data retention and training policies explains the data policy columns and Audit logs covers the audit trail. For sanctions, read Sanctions data and geofencing, Sanctions geofence on a self-hosted gateway and Sanctions screening on Spanway Cloud and license issuance.