---
title: "Delegation, certification and drift"
sidebarTitle: "Delegation and certification"
description: "The Delegation and lineage screen and the governance behind it: authority delegations, certification campaigns, the drift report and control mapping."
keywords: ["authority delegation", "access certification", "access review", "entitlement drift", "agent lineage", "control mapping"]
---

NHI Security has one console screen about delegation, the **Access reviews** screen for certification campaigns, and three governance surfaces that exist only as API routes. They are easy to confuse, so this page separates them.

| Surface | Console | API |
|---|---|---|
| Whose authority each agent exercises | **Agents → Delegation** | Read from `GET /api/v1/agents` |
| Authority delegations | None | `/api/v1/delegations` |
| Access certification campaigns | **Policies → Access reviews**, see [Access reviews](/nhi-security/access-reviews) | `/api/v1/certification-campaigns`, `/api/v1/access-reviews` |
| Drift report | None | `/api/v1/governance/drift` |
| Control mapping | None | `/api/v1/governance/compliance` |

<Warning>
None of these authorizes anything. The [runtime gate](/nhi-security/runtime-gate) does not read delegations, campaigns or drift. An approved delegation does not entitle an agent to a tool, a `certified` decision does not grant access, and a `revoked` decision does not remove it. They are records for the people who answer for the estate.
</Warning>

Routes are written as `/api/v1/...`. Inside TRUSTIVAN they are served under `/nhi` and take your TRUSTIVAN session.

## The Delegation and lineage screen

**Agents → Delegation** needs `agent:read`. It does not list authority delegations. It reports, for up to 100 agents, the "acts for" field on each agent profile: the principal whose reach the agent borrows when it runs, which is a different question from who owns it.

- **Three tiles**: agents **Acting for a known principal**, agents **Naming somebody unresolved**, and agents **Saying nothing**.
- **Whose authority each agent exercises**: one row per agent with who it acts for, on what basis, who owns it and its autonomy. A name the provider gave that matches nobody in your organization stays an unresolved hint. NHI Security never matches it to a person by name.
- **Agents nothing has profiled** (needs `identity:read`): identities a provider typed as an agent that have no agent profile, so every agent policy passes them in silence.
- **What this platform cannot yet establish** (needs `policy:read`): the provenance policies, including `agent_lineage_unknown` and `agent_delegates_to_agent`, each marked **Can be evaluated** or **Cannot be evaluated here** with the fact it is waiting on.

"Acts for" is filled only by a connector that reports it. [Registering an agent](/nhi-security/agent-registry) does not set it and no route edits it, so a registered agent is always counted under **Saying nothing**.

There is no lineage diagram. The graph has no agent-to-agent relationship, and nothing shipped records what created an agent, so where an agent came from is reported as unanswerable rather than drawn from guesses.

## Permissions

| Permission | Lets you | Roles that hold it |
|---|---|---|
| `delegation:read`, `certification:read`, `drift:read` | Read delegations, campaigns, the control mapping and the drift report | Organization Admin, Security Admin, Security Analyst, Auditor, Viewer |
| `delegation:request` | Ask to delegate | Organization Admin, Security Analyst |
| `delegation:approve`, `delegation:revoke` | Approve, refuse or end a delegation | Organization Admin, Security Admin |
| `certification:manage` | Build, open, reassign, close and cancel campaigns | Organization Admin, Security Admin |
| `certification:review` | Answer the items assigned to you | Organization Admin, Security Analyst |

Inside TRUSTIVAN only Organization Admin (Owner, Admin), Security Analyst (Member) and Viewer are reachable. A Member can request a delegation and answer a campaign; an Owner or Admin approves and organizes. An Owner's or Admin's own delegation needs a second Owner or Admin to approve it.

## Authority delegations

A delegation is a record that one person handed a named, narrow piece of authority to someone else for a period, and that a second person approved it.

```http
POST /api/v1/delegations
Content-Type: application/json

{
  "delegatedTo": { "kind": "user", "userId": "6f1c2d4e-8a90-4b3c-9d21-7e5f4a3b2c10" },
  "scope": { "kind": "tool", "toolId": "0b8e7a61-2c3d-4f5e-8a9b-1c2d3e4f5a6b" },
  "justification": "Covering the release tooling while I am on leave until 2 November",
  "durationDays": 21
}
```

| Field | Rules |
|---|---|
| `delegatedTo` | `kind` is `user`, `team` or `agent`, with exactly one of `userId`, `teamId` or `identityId` to match |
| `scope` | `kind` is `tool` with a `toolId`, or `campaign_review` with a `campaignId`. There is no scope meaning "all of my authority" |
| `justification` | Required, up to 4,096 characters |
| `durationDays` | A whole number from 1 to 90 |
| `parentId` | Optional. The delegation this one passes along |

You are always the delegator: there is no field for naming anyone else. The answer is `201` with the new `id`, in state `requested`.

- **The window starts at the request.** `startsAt` is when you asked and `expiresAt` is that moment plus `durationDays`. Time spent waiting for approval is not added back.
- **Approval is someone else's.** `POST /api/v1/delegations/{id}/decision` with `{"approve": true}` or `{"approve": false}` moves it to `active` or `refused`. Deciding your own is `403` and written to the audit trail as a failure.
- **Revoke with a reason.** `POST /api/v1/delegations/{id}/revocation` with `{"reason": "..."}` ends an `active` delegation. Anything else is `409`.
- **There is no edit.** To change a scope or a window, revoke and request again.
- **Passing it along is bounded.** A delegation naming a `parentId` must have the same scope as its parent, must end no later than its parent, and the parent must be in force. A chain holds at most three delegations, counting the first. Breaking any of these is `422`, or `409` for a parent that has ended.
- **Revoking does not cascade.** Delegations derived from a revoked one keep their own state. Revoke each one you want ended.
- **Other refusals.** Delegating to yourself is `403`. The same authority already delegated to the same principal is `409`. A delegate or scope that is not in your organization is `404`.

Read them with `GET /api/v1/delegations` (filter by `state`, `awaitingDecisionOnly=true` or `delegatedBy`), `GET /api/v1/delegations/{id}`, `/chain` (this delegation and its ancestors, child first) and `/events` (each state change, who made it and when).

Every delegation carries `originatingDelegator`, the person at the root of the chain, and `isActive`. `isActive` is true only while the state is `active`, the clock is inside the window, and the delegator's own account is still active: authority from someone who has left is not in force whatever its end date says. Trust `isActive`, not `state`.

The states are `requested`, `active`, `refused`, `revoked`, `withdrawn` and `expired`. Nothing sets the last two today.

## Access certification campaigns

A campaign puts one dated question about one kind of subject to a named reviewer, and records an answer with a reason for each subject.

<Steps>
  <Step title="Create a draft">
    `POST /api/v1/certification-campaigns` with `certification:manage`:

    ```json
    {
      "name": "Q4 agent review",
      "subjectKind": "identity",
      "statement": "Confirm each agent is still needed and still owned by the team listed",
      "reviewer": { "kind": "team", "teamId": "3d2c1b0a-9f8e-4d7c-8b6a-5f4e3d2c1b0a" },
      "durationDays": 30
    }
    ```

    `subjectKind` is `identity`, `credential`, `tool` or `team`, one kind per campaign. `reviewer.kind` is `user` or `team`. `durationDays` is 1 to 180, and the due date is counted from this moment, not from when you open the campaign.
  </Step>
  <Step title="Add what is being reviewed">
    `POST /api/v1/certification-campaigns/{campaignId}/subjects` once per subject, for example `{"subject": {"kind": "identity", "identityId": "..."}}`. A subject of another kind is `422`, a duplicate is `409`, and subjects can only be added while the campaign is a draft.
  </Step>
  <Step title="Open it">
    `POST /api/v1/certification-campaigns/{campaignId}/opening` with no body. A campaign with no subjects is refused with `409`.
  </Step>
  <Step title="Answer each item">
    The reviewer calls `POST /api/v1/certification-campaigns/{campaignId}/items/{itemId}/decision` with `certification:review`:

    ```json
    { "decision": "certified", "note": "Still runs the nightly export; owner confirmed on 9 October" }
    ```

    `decision` is `certified` or `revoked`, and `note` is required for both. There is no bulk decision route and no way to change an answer. A campaign over identities can also be built in one call from a scope; see [Access reviews](/nhi-security/access-reviews).
  </Step>
  <Step title="Close it">
    `POST /api/v1/certification-campaigns/{campaignId}/closure` with `{}` closes it. `{"cancel": true}` cancels one that should not have run. A draft can only be cancelled.
  </Step>
</Steps>

**Who may answer.** Holding `certification:review` is not enough. The item must be assigned to you or to a team you belong to, and you must not be the person who created the campaign. Either failure is `403`, and an attempt on your own campaign is audited as a failure. Hand one item to someone else with `POST .../items/{itemId}/assignment` and `{"assignTo": {"kind": "user", "userId": "..."}}`. A `campaign_review` delegation does not change who may answer: reassign the item.

**What a decision changes.** Only the item. A `revoked` decision is an instruction that something should go. It does not quarantine an identity, revoke a credential, withdraw an entitlement or open a remediation. Act on it yourself, for example through [Remediation](/nhi-security/remediation).

**Reading a campaign.** `GET /api/v1/certification-campaigns` (filter by `state`, `subjectKind` or `overdueOnly=true`), `/{campaignId}`, `/items` and `/events`. A campaign carries `progress` (`total`, `pending`, `certified`, `revoked`, `expired`) and `coverage`, the share of items somebody answered, which is `null` for an empty campaign. Unanswered items never count as approvals.

**Past the due date.** `isOverdue` turns true on the due date, and answers are still accepted. When the in-process scheduler is on (`DISCOVERY_SCHEDULER_ENABLED`), an hourly sweep marks the campaign `overdue` and, seven days after the due date, closes it with every unanswered item `expired`, audited as the platform. A person closing a campaign leaves unanswered items `pending`. Either way an unanswered identity gets a finding; see [When nobody answers](/nhi-security/access-reviews#when-nobody-answers).

Opening, each decision, each reassignment, closing and cancelling are written to the [audit trail](/nhi-security/governance-and-audit).

## The drift report

Drift is the difference between the tool entitlements people **declared** for an agent and the tool use a connector **observed**. It is computed when you ask. There is no drift record, no id and nothing to dismiss: a difference goes away when one of the two facts changes.

```http
GET /api/v1/governance/drift?windowDays=30
```

`windowDays` is 1 to 365 and defaults to 30. `GET /api/v1/governance/drift/agents/{identityId}` runs the same comparison for one agent. Both need `drift:read`.

| Field | Meaning |
|---|---|
| `drift[]` with `kind: "undeclared_use"` | A connector observed the agent using a tool nobody declared for it |
| `drift[]` with `kind: "unused_declaration"` | A declared entitlement was not observed in use while the agent was observed using other tools. A prompt to check it is still needed, not a breach |
| `notAssessable[]` | Agents that could not be compared, each with a `reason` and an `explanation` |
| `agentsCompared` | How many agents the `drift` list is actually about |

**"Nothing could be compared" is not a clean result.** An agent lands in `notAssessable` for one of two reasons:

- `estate_not_surveyed`: no synchronization completed inside the window from connectors that between them collect tools and relationships. Nothing was looked at, so nothing can be said.
- `agent_not_observed_in_window`: the estate was surveyed, the agent has declared entitlements, and it was not seen using any tool. An idle agent and an over-entitled one look the same.

Read an empty `drift` list beside a long `notAssessable` list as an unobserved estate.

<Note>
Only observed agent-to-tool use counts, never an inferred edge. No shipped connector reports that: the MCP connector lists tools and does not know their callers, and no connector reports AI agents. On an estate filled by the shipped connectors and hand registration, the report can therefore return `notAssessable` entries and no differences. It becomes useful when a connector you build reports which agent uses which tool.
</Note>

`POST /api/v1/governance/drift/review` records that someone looked. It needs only `drift:read`, writes one `governance_drift.reviewed` audit record with the window and the counts, returns the same report, and changes nothing. The report covers tool entitlements only: model version, prompt and behaviour are not compared, because nothing collects them.

## The control mapping

`GET /api/v1/governance/compliance` (needs `certification:read`) returns a fixed catalogue that maps what NHI Security implements to controls in three frameworks. Pass `?framework=soc2`, `iso27001` or `nist_ai_rmf` to narrow it.

Each claim carries the `framework`, a `controlId` and `controlName`, a `support` level of `supported` or `partial`, a `statement` of what the product does, the source files that implement it, the tests that verify it, and for every partial claim a `limitation` saying what it does not cover. `coverage` counts supported and partial claims per framework. Controls the product does not address are absent rather than listed as gaps.

The response describes the product, not your organization: it contains no data about your estate, is the same in every deployment and cannot be edited. Its own `disclaimer` says it is not an audit result or an assurance about any deployment. TRUSTIVAN holds no SOC 2 or ISO 27001 certification, and this mapping is not one.

## What expires in the background

Campaigns: the escalation sweep above, when the scheduler is on. Delegations: no job closes one when its date passes. Enforcement of the dates is correct on every read (`isActive`), but the stored state stays as it was, and no `expired` audit record appears. See [Limitations](/nhi-security/limitations).

## Next steps

- [Governance and audit](/nhi-security/governance-and-audit): separation of duties and the audit trail these actions are written to.
- [Agent registry](/nhi-security/agent-registry): registering the agents these records are about.
- [Agent autonomy](/nhi-security/agent-autonomy): declaring the tool entitlements the drift report compares.
- [Administration](/nhi-security/administration): users, teams and roles.
