Create Policy
Learn to create a policy and register the policy
Create a policy
Create a policy.json file that outlines the actions or capabilities and the resources or paths the identity is allowed to access after successful attestation. To create a policy that is attached to a provider see vhsm nitride policy -help command.
Example: Create a policy.json file using an editor of your choice.
{
"name": "nitride-policy",
"identities": {
"provider": "azure-sev-snp-vtpm",
"platform": [
{
"name": "amd-sev-snp-milan-vcek"
}
],
"firmware": [
{
"name": "azure-dc2as-v5"
}
],
"workload": {
"name": "azure-sev-snp-vtpm-ubuntu-jammy",
"policy": {
"hash": false,
"pcrs.0": false
}
},
"metadata": null
}
}Where:
"name": A string uniquely identifying the policy.
"identities": An object specifying the required identities for this policy.
"provider": The provider identity. For example, azure-sev-snp-vtpm.
"platform": An array of platform identity objects, see platform identity structure.
"firmware": An array of firmware identity objects, see firmware identity structure.
"workload": A workload identity object, see workload identity structure.
"metadata": (Optional) Additional metadata for the policy.
Register the policy
Example:
The @policy.json syntax ensures that the CLI can read and embed the file contents directly into the request.
Output
Verify that the policy was created
Example:
Output
You can also reference this policy in your attestation.json to bind it to specific identities. For more information, about updating, reading, or deleting policies, see vHSM Nitride CLI.
Last updated
Was this helpful?