{
"$id": "https://schemas.don.projects.digilab.network/schemas/policy-as-code/policy-base",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": true,
"allOf": [
{
"if": {
"required": [
"validFrom",
"validTo"
]
},
"then": {
"properties": {
"validTo": {
"format": "date-time",
"formatExclusiveMinimum": {
"$data": "1/validFrom"
},
"type": "string"
}
}
}
}
],
"properties": {
"policySource": {
"description": "Source document or RFC used to derive the policy",
"format": "uri",
"type": "string"
},
"referencedAssets": {
"description": "Explicit list of assets this policy applies to",
"items": {
"type": "string"
},
"type": "array"
},
"referencedTags": {
"description": "Tags used to dynamically target assets",
"items": {
"type": "string"
},
"type": "array"
},
"schemaVersion": {
"description": "Immutable schema version identifier",
"type": "string"
},
"standardId": {
"description": "Namespaced identifier for the policy standard (e.g., ietf/hsts)",
"type": "string"
},
"upstreamPolicy": {
"description": "Reference to upstream policy for comparison or synchronization",
"format": "uri",
"type": "string"
},
"validFrom": {
"description": "Date from which the policy becomes effective",
"format": "date-time",
"type": "string"
},
"validTo": {
"description": "Date until which the policy is effective",
"format": "date-time",
"type": "string"
},
"versionId": {
"description": "Incremental version of the policy instance",
"minimum": 1,
"type": "integer"
}
},
"required": [
"standardId",
"schemaVersion",
"versionId"
],
"type": "object"
}