> For the complete documentation index, see [llms.txt](https://docs.enclaive.cloud/nitride/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.enclaive.cloud/nitride/tutorials/attestation-blueprint/create-identity.md). Agents can also search and read this documentation through its [MCP server](https://docs.enclaive.cloud/nitride/~gitbook/mcp).

# Create Identity

[Identities](https://docs.enclaive.cloud/nitride/documentation/concepts/identity.md) in this system are versioned by their creation timestamp. For verification purposes, the most recently created identity for a given name is always used. This design allows you to easily update an identity when it becomes outdated without needing to change your policy or the attestation configuration itself. For more information about reading, deleting, or updating identities, see [vHSM nitride CLI](https://docs.enclaive.cloud/nitride/cli/identity.md) .

### Create a new identity  named `test-local` of the type `firmware` :

**Example:** Create a file named `firmware.json`  with these content:

```
{
  "type": "firmware",
  "name": "test-local",
  "values": {
    "measurement": "eb5c02d3ba319e65218994fc47925cf8a5e9a433081c44d4d989434f15a7c6d715d302401b3147da04e49abc99e50aea"
  }
}
```

**Description of `values` field content by Identity type:**

The content you put in the `values` field within the request body depends on the `type` of the identity you are creating or updating.&#x20;

| Identity Type | Description of values Content                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `platform`    | It would typically contain platform-specific attestation data.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `firmware`    | <p>Used for firmware-level identities.<br>- <code>measurement</code>: The OVMF/UEFI measurement (e.g., a SHA256 hash). For more information, see <a href="https://docs.enclaive.cloud/nitride/tutorials/get-firmware-measurement.md">Get Firmware Measurement</a>.<br>- <code>firmware</code>: The firmware version of the platform. Supports <a href="https://semver.org/">semantic versioning</a> constraints like <code>>= 1.55.22</code>.<br>- <code>root\_of\_trust</code>: The certificate chain used in the verification process. </p> |
| `workload`    | <p>Used for workload-level identities.<br>- <code>hash</code>: A human-readable name of the hash function used (e.g., "sha256").<br>- <code>pcrs</code>: A dictionary mapping integer PCR (Platform Configuration Register) indices to their encoded PCR values (strings).</p>                                                                                                                                                                                                                                                                |
| `metadata`    | More details about the identity.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |

### Register the identity

#### Example:&#x20;

```
vhsm nitride identity create @firmware.json
```

**Output**&#x20;

```
Key        Value
---        -----
created    1749465559
name       test-local
type       firmware
values     map[measurement:eb5c02d3ba319e65218994fc47925cf8a5e9a433081c44d4d989434f15a7c6d715d302401b3147da04e49abc99e50aea]
```

#### Possible Error Response:

If there is an issue with the request body, such as unknown identity type, you might receive an error:

```json
{
  "errors": [
    "failed parsing: unknown type"
  ]
}
```
