Resource: Policy
Represents a single policy rule within the Quorum Policy Engine. Policies are immutable, append-only and require an M-of-N cryptographic quorum of Policy Authors for all state transitions (e.g. creation, deletion).
| JSON representation |
|---|
{ "name": string, "displayName": string, "state": enum ( |
| Fields | |
|---|---|
name |
Identifier. The resource name of the policy. Format: projects/{project}/locations/{location}/instances/{instance}/policyEngine/policies/{policy} |
displayName |
Optional. The user-provided display name for the policy. |
state |
Output only. The state of the policy. |
createTime |
Output only. The timestamp when the policy was created. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
updateTime |
Output only. The timestamp when the policy was last updated. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
rule |
Immutable. The core policy rule definition. |
authorId |
Output only. The identifier of the Policy Author who initially created this policy draft. This policy must be signed by a quorum of Policy Authors before it becomes ACTIVE. |
deleteInitiatorId |
Output only. The identifier of the Policy Author who initiated the deletion process. This is set when the state transitions to PENDING_DELETED. |
activationSignatures[] |
Output only. The M-of-N cryptographic signatures collected from Policy Authors to activate the policy. |
createAuthorSignature |
Required. Input only. The signature from the Policy Author requesting the initial policy creation. This field is input-only and is validated during resource creation. |
revocationSignatures[] |
Output only. The M-of-N cryptographic signatures collected from Policy Authors to revoke the policy. |
globalSequence |
Output only. A globally incrementing sequence mapped to the Spanner transaction order. |
State
The current state of the policy.
| Enums | |
|---|---|
STATE_UNSPECIFIED |
State is unspecified. |
PENDING_ACTIVE |
The policy is pending approval from the required quorum of authors to become ACTIVE. |
ACTIVE |
The policy is active and being enforced. |
PENDING_DELETED |
Indicates the policy is active, but an author has submitted a delete request that is awaiting M-of-N signatures. |
DELETED |
The policy has been deleted. |
Rule
Defines the actual policy logic.
| JSON representation |
|---|
{ // Union field |
| Fields | |
|---|---|
Union field engine. Contains the policy engine rule content. engine can be only one of the following: |
|
cedarDocument |
Optional. The policy content, written in the Cedar policy language syntax. |
QuorumSignature
A quorum signature from a policy root admin.
| JSON representation |
|---|
{ "authorId": string, "signature": string, "approvalTime": string } |
| Fields | |
|---|---|
authorId |
Required. The identifier of the Policy Author providing the signature. |
signature |
Required. The author's signature. The signature must be generated over a SHA-256 digest of: UTF8(" SECURITY NOTE: For initial creation or revocation proposals, the initiator signs with a placeholder globalSequence of '0' because the server assigns the real monotonic sequence number at commit time. Subsequent co-authors must sign over the actual assigned sequence number to bind their final approval to that specific version. This prevents replay attacks. Where ACTION_NAME corresponds to the target policy state: - Where serializeRuleCanonical is defined as: - For Cedar engines: UTF8(" A base64-encoded string. |
approvalTime |
Required. The exact timestamp when the Policy Root Admin approved and generated this signature. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
Methods |
|
|---|---|
|
Custom Method: Appends a software-backed author signature to a policy. |
|
Creates a new policy in a given instance. |
|
Gets details of a single policy. |
|
Lists policies in a given instance. |
|
Custom Method: Revokes (deletes) a policy. |