- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- PayloadSchema
- Decision
- Try it!
Authorizes an operation proposal payload against active policies.
HTTP request
POST https://mpc.googleapis.com/v1alpha1/{instance=projects/*/locations/*/instances/*}/policyEngine:authorizePayload
The URL uses gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
instance |
Required. The unique resource name of the MPC instance evaluating the policies. Format: projects/{project}/locations/{location}/instances/{instance} It takes the form |
Request body
The request body contains data with the following structure:
| JSON representation |
|---|
{
"principal": string,
"action": string,
"resource": string,
"schema": enum ( |
| Fields | |
|---|---|
principal |
Required. The entity requesting authorization (e.g., |
action |
Required. The specific Cedar action being authorized. Since Cedar actions are dynamic and user-defined in custom policy sets, they are represented as strings (e.g., |
resource |
Required. The target asset or context of the operation, formatted as a Cedar entity reference (e.g., |
schema |
Required. The schema identifier of the payload. |
payload |
Required. The representation of the operation proposal (e.g. hex-encoded or raw JSON string) to parse and verify. |
Response body
Response from authorizing an operation proposal payload.
If successful, the response body contains data with the following structure:
| JSON representation |
|---|
{
"decision": enum ( |
| Fields | |
|---|---|
decision |
The outcome of the policy evaluation. |
token |
The JWS signature policy token (only populated on PERMIT). |
digest |
The hex-encoded SHA-256 digest computed from the raw transaction payload. |
evaluatedPolicyIds[] |
The list of active Cedar policy IDs that authorized or triggered the decision. |
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.
PayloadSchema
PayloadSchema identifies the parser needed to decode the raw bytes. This enum is not frozen; new payload schemas may be added in the future.
| Enums | |
|---|---|
PAYLOAD_SCHEMA_UNSPECIFIED |
Unspecified payload schema. |
DKG_INTENT_V1 |
DKG Key Generation Intent V1. |
ETHEREUM_TX_V1 |
Ethereum Transaction V1. |
BITCOIN_TX_V1 |
Deprecated: Use Bitcoin Transaction V1. |
BITCOIN_TX_V2 |
Bitcoin Transaction V2 (BIP 174 PSBT v0). |
ETHEREUM_TX_V2 |
Ethereum Transaction V2 (Protocol-Agnostic). |
Decision
Decision represents the result of the policy evaluation. This enum is frozen; no new decisions are expected to be added.
| Enums | |
|---|---|
DECISION_UNSPECIFIED |
Unspecified decision. |
PERMIT |
The operation is explicitly permitted. |
DENY |
The operation is explicitly denied. |