Bow Tie Kreative SECURITY Grammar

JSON Schemas

LAKA Guarded Security Change Plan

change-plan 16 required 19 properties

Required properties

  • version
  • change_id
  • authorization_id
  • client_id
  • target
  • environment
  • change_level
  • objective
  • profile
  • risk
  • preconditions
  • steps
  • health_checks
  • rollback
  • evidence
  • status

The schema in full

schemas/change-plan.schema.json · draft 2020-12
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://bowtiekreative.example/schemas/laka-security/change-plan.schema.json",
  "title": "LAKA Guarded Security Change Plan",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "version",
    "change_id",
    "authorization_id",
    "client_id",
    "target",
    "environment",
    "change_level",
    "objective",
    "profile",
    "risk",
    "preconditions",
    "steps",
    "health_checks",
    "rollback",
    "evidence",
    "status"
  ],
  "properties": {
    "version": {
      "type": "string"
    },
    "change_id": {
      "type": "string"
    },
    "authorization_id": {
      "type": "string"
    },
    "client_id": {
      "type": "string"
    },
    "target": {
      "type": "string"
    },
    "environment": {
      "type": "string"
    },
    "change_level": {
      "enum": [
        "baseline",
        "minor",
        "major",
        "structural",
        "paradigm"
      ]
    },
    "objective": {
      "type": "string"
    },
    "profile": {
      "type": "string"
    },
    "approved_diff_hash": {
      "type": "string"
    },
    "risk": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "magnitude",
        "blast_radius",
        "lockout_risk",
        "data_loss_risk",
        "reversibility"
      ],
      "properties": {
        "magnitude": {
          "type": "integer",
          "minimum": 0,
          "maximum": 5
        },
        "blast_radius": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "lockout_risk": {
          "enum": [
            "none",
            "low",
            "medium",
            "high",
            "critical"
          ]
        },
        "data_loss_risk": {
          "enum": [
            "none",
            "low",
            "medium",
            "high",
            "critical"
          ]
        },
        "reversibility": {
          "type": "string"
        },
        "dependencies": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "preconditions": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "authorization_current",
        "ownership_proof_verified",
        "backup_verified",
        "restore_evidence_current",
        "rollback_verified",
        "console_confirmed",
        "maintenance_window_confirmed",
        "kill_switch_configured",
        "health_baseline_captured"
      ],
      "properties": {
        "authorization_current": {
          "type": "boolean"
        },
        "ownership_proof_verified": {
          "type": "boolean"
        },
        "backup_verified": {
          "type": "boolean"
        },
        "restore_evidence_current": {
          "type": "boolean"
        },
        "rollback_verified": {
          "type": "boolean"
        },
        "console_confirmed": {
          "type": "boolean"
        },
        "maintenance_window_confirmed": {
          "type": "boolean"
        },
        "kill_switch_configured": {
          "type": "boolean"
        },
        "health_baseline_captured": {
          "type": "boolean"
        }
      }
    },
    "canary": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "target": {
          "type": "string"
        },
        "required": {
          "type": "boolean"
        },
        "success_criteria": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "steps": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "step_id",
          "action",
          "tool",
          "expected_change",
          "failure_action"
        ],
        "properties": {
          "step_id": {
            "type": "string"
          },
          "action": {
            "type": "string"
          },
          "tool": {
            "type": "string"
          },
          "expected_change": {
            "type": "string"
          },
          "validation": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "failure_action": {
            "enum": [
              "stop",
              "rollback-step",
              "rollback-change",
              "escalate"
            ]
          }
        }
      }
    },
    "health_checks": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "string"
      }
    },
    "rollback": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "trigger_conditions",
        "method",
        "owner",
        "maximum_decision_time",
        "verification"
      ],
      "properties": {
        "trigger_conditions": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "string"
          }
        },
        "method": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "string"
          }
        },
        "owner": {
          "type": "string"
        },
        "maximum_decision_time": {
          "type": "string"
        },
        "verification": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "string"
          }
        }
      }
    },
    "evidence": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "before",
        "during",
        "after",
        "destination",
        "integrity"
      ],
      "properties": {
        "before": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "during": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "after": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "destination": {
          "type": "string"
        },
        "integrity": {
          "type": "string"
        }
      }
    },
    "approval": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "approved_by",
        "approved_at",
        "approval_reference"
      ],
      "properties": {
        "approved_by": {
          "type": "string"
        },
        "approved_at": {
          "type": "string",
          "format": "date-time"
        },
        "approval_reference": {
          "type": "string"
        }
      }
    },
    "status": {
      "enum": [
        "draft",
        "planned",
        "approved",
        "executing",
        "verifying",
        "rolled-back",
        "completed",
        "failed",
        "expired"
      ]
    }
  },
  "allOf": [
    {
      "if": {
        "properties": {
          "status": {
            "enum": [
              "approved",
              "executing",
              "verifying",
              "completed"
            ]
          }
        },
        "required": [
          "status"
        ]
      },
      "then": {
        "required": [
          "approval",
          "approved_diff_hash"
        ]
      }
    }
  ]
}

Validate against it

curl -X POST https://security.bowtiekreative.com/v1/validate \
  -H 'content-type: application/json' \
  --data '{"schema": "change-plan", "document": { … }}'

This schema as JSON →