Repository navigation
Expand file tree
/
Copy pathexecution-grant.schema.json
More file actions
46 lines (46 loc) · 2.51 KB
/
Copy pathexecution-grant.schema.json
File metadata and controls
46 lines (46 loc) · 2.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://a2zsoc.example/schemas/execution-grant.schema.json",
"title": "Short-lived signed execution grant",
"type": "object",
"additionalProperties": false,
"required": ["grant", "signature"],
"properties": {
"grant": {
"type": "object",
"additionalProperties": false,
"required": ["schema_version", "grant_id", "task_id", "tenant_id", "target_id", "operation_id", "environment", "plan_digest", "authorization_mode", "authorization_id", "approval_id", "policy_digest", "impact_assessment_digest", "lease_generation", "runner_id", "lease_token_sha256", "issued_at", "expires_at", "max_runtime_seconds"],
"properties": {
"schema_version": {"const": "a2z-execution-grant-v2"},
"grant_id": {"type": "string", "format": "uuid"},
"task_id": {"type": "string", "format": "uuid"},
"tenant_id": {"type": "string", "minLength": 1, "maxLength": 256, "not": {"const": "*"}},
"target_id": {"type": "string", "minLength": 1, "maxLength": 256, "not": {"const": "*"}},
"operation_id": {"type": "string", "minLength": 1, "maxLength": 256, "not": {"const": "*"}},
"environment": {"enum": ["lab", "development", "staging"]},
"plan_digest": {"type": "string", "pattern": "^[0-9a-f]{64}$"},
"authorization_mode": {"enum": ["operator_approval", "standing_policy"]},
"authorization_id": {"type": "string", "format": "uuid"},
"approval_id": {"type": ["string", "null"], "format": "uuid"},
"policy_digest": {"type": ["string", "null"], "pattern": "^[0-9a-f]{64}$"},
"impact_assessment_digest": {"type": ["string", "null"], "pattern": "^[0-9a-f]{64}$"},
"lease_generation": {"type": "integer", "minimum": 1},
"runner_id": {"type": "string", "minLength": 1, "maxLength": 256, "not": {"const": "*"}},
"lease_token_sha256": {"type": "string", "pattern": "^[0-9a-f]{64}$"},
"issued_at": {"type": "string", "format": "date-time"},
"expires_at": {"type": "string", "format": "date-time"},
"max_runtime_seconds": {"type": "integer", "minimum": 1, "maximum": 300}
}
},
"signature": {
"type": "object",
"additionalProperties": false,
"required": ["algorithm", "key_id", "signature_base64"],
"properties": {
"algorithm": {"const": "ed25519"},
"key_id": {"type": "string", "pattern": "^[A-Za-z0-9._-]{1,128}$"},
"signature_base64": {"type": "string", "minLength": 1}
}
}
}
}