MitDesk docs
Governing it

Audit and evidence

7 min read Odoo 20.0

MitDesk writes down what the AI did. With the Compliance module, it also makes the record tamper-evident. This page explains what is recorded, how the protection works, and what it can and cannot prove.

Who this is for: administrators, auditors and compliance officers.

You need: Edition: The audit log and jobs are in Basic and above. The hash chain, anchors, retention and legal holds need minddesk_compliance, which is part of Business. See Editions.

The audit log

Open Oversight ▸ Audit. Each row is one event.

The audit log with time, actor, event, tool, financial flag and data class

A row holds:

  • the time, the actor and the event type,
  • the tool name and a free-text message,
  • whether the action was Financial,
  • the Data classes the action touched,
  • the company it happened in,
  • when a digital employee was behind it, which one.

One audit entry with its time, user, event, tool, message, financial flag and data classes

MitDesk keeps the actor's login and user id as a copy in the row. The record stays correct if the user changes later. A user cannot be deleted while audit rows exist for them.

MitDesk also writes one model_call row for each request to an AI model. It records the hosting class (on-premises, EU cloud or non-EU cloud). The Compliance reports use these rows.

What the Data column means

The data classes are filled in only when Sovereign routing is installed. Without it the column is empty. Empty means "not classified". It does not mean "no personal data".

Tool arguments are not stored

MitDesk stores a one-way hash (SHA-256) of the arguments, not the arguments. The log shows who used which tool. It cannot show which records the action touched.

Who sees which rows

A normal MitDesk user sees only their own rows. An administrator sees all rows in the companies they work in. Nobody can edit or delete a row through normal access rights.

Undo a change

On an audit entry, a button can undo a recent change. It is shown only to the user who made the change, and only if:

  • the change was a simple edit of stored fields with plain values (numbers, dates, choices, links),
  • the record has not changed since,
  • the model is not sensitive.

The undo is a new request. It goes through consent again and may wait for approval.

Jobs

Configuration ▸ What has run ▸ Jobs lists the queued work: the step, the user, the attempts and the state. The states are Pending, Waiting, In Progress, Done and Failed. Waiting means the job is parked behind an approval. A failed job shows Why it stopped in plain words.

The jobs list with step, user, attempts, state and the reason a job stopped

Append-only

Without the Compliance module, the log is append-only because no group has the right to write, create or delete rows. Code that runs with sudo can bypass access rights, so this is a convention.

With the Compliance module, the rule is enforced in the model. Editing a row is refused, even for privileged code. Only the chain job may write the hash columns. Deleting through the ORM is refused. Retention is the only way old rows leave. Anchors cannot be edited or deleted at all.

The hash chain

Hash chain means that each record contains a fingerprint of the one before it. If someone changes or removes a record, the fingerprints after it no longer match.

  1. Row hash. MitDesk stamps a hash on every row when it is created. It covers the actor, event, tool, argument hash, message and financial flag.
  2. Chain. A background job runs every five minutes. It links the rows in the order it finds them. It runs one at a time.

The chain can be up to five minutes behind. Rows written since the last run are shown as pending, not as missing.

Anchors

An anchor records how far the evidence reaches. Open Governance ▸ Compliance ▸ Audit Anchors. There are four kinds:

Kind When it is written
Chain head After the chain job ran.
Retention reseed When retention removed old rows.
Operator reseed after an accepted gap When an operator accepts a known gap (see below).
Verification After every verification. It stores the result.

Anchors have their own chain, so changing one is as visible as changing a row.

The Audit Anchors list with the Verify chain now button

Verify the chain

Click Verify chain now on the Audit Anchors list or in Cockpit ▸ Compliance. MitDesk checks:

  • the anchor chain,
  • the signatures, if you use signing,
  • the row hash of every row that survived a retention run,
  • the whole live chain.

It reports every break, not only the first. The result is written to the audit log and stored in a verification anchor. Verifying is therefore an audited act.

Signing anchors

An administrator can add an Ed25519 key. MitDesk then signs each new anchor. The key is read from a file. The path comes from the environment variable MINDDESK_ATTESTATION_SIGNING_KEY_FILE. The path must be absolute and the file must be readable only by its owner. It cannot be a symbolic link. Neither the path nor the key is stored in the database. If signing is set up but the key cannot be loaded, MitDesk stops and does not write an unsigned anchor.

What this proves, and what it does not

The chain is tamper-evident, not tamper-proof.

  • It shows later changes and deletions made through the application, including by the AI.
  • It cannot protect you if the server itself is compromised. The signing key lives on that server. Someone with full control of the database and the files could rebuild a consistent chain.
  • An anchor without a key is only a hash. A signature proves that the key holder signed the bytes. It is not a qualified electronic signature, not a trusted timestamp and not a statement of compliance. Check the key fingerprint through a second channel.

Accept a known gap

A chain that broke once would stay broken forever. An operator can accept the gap and write down why.

  1. Open Cockpit ▸ Compliance and click Accept gap and rebuild chain.
  2. Read how many breaks there are and where the first one is.
  3. Write the reason and confirm.

The missing rows stay missing. MitDesk stores the acceptance (who, why, where it broke) as an anchor and as an audit row. It rebuilds the chain from the last row that still links. MitDesk refuses if a row no longer matches its own hash. A gap can be accepted. A changed row cannot.

Incidents and alerts

If tampering is found while the chain is built, or a verification fails, MitDesk opens an Integrity Incident and an Odoo activity for the Compliance responsible. Set this person in the settings (block Compliance alerts). The same happens when a local model serves a different version than the one you pinned. The alert never contains audit content, model names or digests.

Set a compliance responsible

There is no default. If no company has one, no incident or activity is created. You would see the problem only in the verification result and in the server log.

An administrator can mark an incident as resolved in Governance ▸ Compliance ▸ Integrity Incidents.

Retention policies per artifact type

Open Governance ▸ Compliance ▸ Retention policies. There is one policy per kind of data:

  • audit log,
  • conversations,
  • messages,
  • background jobs,
  • consent gates (approvals).

Each policy has Retention days and an Active switch. The default is 0, which means keep forever. Nothing is deleted after an upgrade. A daily job applies the policies.

Rules that always apply:

  • Financial rows are never removed.
  • Only finished items are removed: idle conversations, jobs that are done or failed, approvals that are decided or expired.
  • A job that has approvals is kept until its approvals are gone.
  • An approval that is still shown in a kept conversation is kept.
  • Before audit rows are removed, MitDesk chains everything and anchors the head. The removal writes a reseed anchor. Older rows can still be checked one by one through their row hash.

The audit log retention is also a setting: Audit retention (non-financial) in the MitDesk settings.

A legal hold always beats retention. Open Governance ▸ Compliance ▸ Legal holds.

Legal holds with name, data subject, dates and state

  • A hold can name a Data subject, a date range, or both. If both are set, both must match. The date range has one day of margin on each side.
  • A hold with neither is a global freeze. It stops every removal.
  • While any hold is active, MitDesk removes no audit rows at all.
  • Opening and releasing a hold are written to the audit log.

Administrators can create and release holds. A Compliance Officer can read them.