2026-08-18 12:15:41 +02:00
{
"$schema" : "https://json-schema.org/draft/2020-12/schema" ,
"$id" : "https://policy.coulomb.social/schemas/tenancy-posture/v0.1" ,
"title" : "NetKingdom tenancy posture declaration v0.1" ,
"type" : "object" ,
2026-08-19 22:06:20 +02:00
"required" : [
"schema_version" ,
"framework"
] ,
2026-08-18 12:15:41 +02:00
"properties" : {
2026-08-19 22:06:20 +02:00
"schema_version" : {
"const" : "0.1"
} ,
"framework" : {
"const" : "netkingdom-tenancy-posture"
} ,
"service" : {
"$ref" : "#/$defs/serviceName"
} ,
"role" : {
"type" : "string" ,
"minLength" : 1
} ,
2026-08-23 13:16:34 +02:00
"responsible_repo" : {
"$ref" : "#/$defs/repoName"
} ,
2026-08-22 14:53:31 +02:00
"workload_identity" : {
"$ref" : "#/$defs/workloadIdentity"
} ,
2026-08-19 22:06:20 +02:00
"tenancy" : {
"$ref" : "#/$defs/tenancy"
} ,
"provider" : {
"$ref" : "#/$defs/provider"
} ,
"zones" : {
2026-08-22 14:53:31 +02:00
"$ref" : "#/$defs/zoneDeclaration"
2026-08-19 22:06:20 +02:00
} ,
"evidence" : {
"$ref" : "#/$defs/evidence"
} ,
2026-08-23 13:16:34 +02:00
"evidence_freshness" : {
"$ref" : "#/$defs/evidenceFreshness"
} ,
2026-08-19 22:06:20 +02:00
"notes" : {
"$ref" : "#/$defs/stringList"
} ,
2026-08-18 12:15:41 +02:00
"services" : {
"type" : "array" ,
"minItems" : 1 ,
2026-08-19 22:06:20 +02:00
"items" : {
"$ref" : "#/$defs/service"
}
2026-08-18 12:15:41 +02:00
}
} ,
"oneOf" : [
{
2026-08-19 22:06:20 +02:00
"required" : [
"service" ,
"role" ,
"tenancy"
] ,
"not" : {
"required" : [
"services"
]
}
2026-08-18 12:15:41 +02:00
} ,
{
2026-08-19 22:06:20 +02:00
"required" : [
"services"
] ,
"not" : {
"anyOf" : [
{
"required" : [
"service"
]
} ,
{
"required" : [
"role"
]
} ,
{
"required" : [
"tenancy"
]
} ,
{
"required" : [
"provider"
]
} ,
2026-08-22 14:53:31 +02:00
{
"required" : [
"workload_identity"
]
} ,
{
"required" : [
"zones"
]
} ,
2026-08-19 22:06:20 +02:00
{
"required" : [
"evidence"
]
2026-08-23 13:16:34 +02:00
} ,
{
"required" : [
"responsible_repo"
]
} ,
{
"required" : [
"evidence_freshness"
]
2026-08-19 22:06:20 +02:00
}
]
}
2026-08-18 12:15:41 +02:00
}
] ,
2026-08-22 14:53:31 +02:00
"allOf" : [
{
"if" : {
"required" : [
"zones"
]
} ,
"then" : {
"required" : [
"workload_identity"
]
}
}
] ,
2026-08-18 12:15:41 +02:00
"additionalProperties" : false ,
"$defs" : {
"serviceName" : {
"type" : "string" ,
"pattern" : "^[a-z0-9][a-z0-9._-]*$"
} ,
2026-08-22 14:53:31 +02:00
"repoName" : {
"type" : "string" ,
"pattern" : "^[a-z0-9]+(-[a-z0-9]+)*$"
} ,
2026-08-18 12:15:41 +02:00
"axisName" : {
2026-08-19 22:06:20 +02:00
"enum" : [
"I" ,
"A" ,
"E" ,
"P" ,
"R" ,
"V"
]
2026-08-18 12:15:41 +02:00
} ,
"level" : {
"oneOf" : [
2026-08-19 22:06:20 +02:00
{
"type" : "integer" ,
"minimum" : 0 ,
"maximum" : 4
} ,
{
"const" : "n/a"
}
2026-08-18 12:15:41 +02:00
]
} ,
"axisVector" : {
"type" : "object" ,
2026-08-19 22:06:20 +02:00
"required" : [
"I" ,
"A" ,
"E" ,
"P" ,
"R" ,
"V"
] ,
2026-08-18 12:15:41 +02:00
"properties" : {
2026-08-19 22:06:20 +02:00
"I" : {
"oneOf" : [
{
"type" : "integer" ,
"minimum" : 0 ,
"maximum" : 3
} ,
{
"const" : "n/a"
}
]
} ,
"A" : {
"$ref" : "#/$defs/level"
} ,
"E" : {
"$ref" : "#/$defs/level"
} ,
"P" : {
"$ref" : "#/$defs/level"
} ,
"R" : {
"$ref" : "#/$defs/level"
} ,
"V" : {
"$ref" : "#/$defs/level"
}
2026-08-18 12:15:41 +02:00
} ,
"additionalProperties" : false
} ,
"partialAxisVector" : {
"type" : "object" ,
"minProperties" : 1 ,
"properties" : {
2026-08-19 22:06:20 +02:00
"I" : {
"oneOf" : [
{
"type" : "integer" ,
"minimum" : 0 ,
"maximum" : 3
} ,
{
"const" : "n/a"
}
]
} ,
"A" : {
"$ref" : "#/$defs/level"
} ,
"E" : {
"$ref" : "#/$defs/level"
} ,
"P" : {
"$ref" : "#/$defs/level"
} ,
"R" : {
"$ref" : "#/$defs/level"
} ,
"V" : {
"$ref" : "#/$defs/level"
}
2026-08-18 12:15:41 +02:00
} ,
"additionalProperties" : false
} ,
"stringMap" : {
"type" : "object" ,
2026-08-19 22:06:20 +02:00
"additionalProperties" : {
"type" : "string" ,
"minLength" : 1
}
2026-08-18 12:15:41 +02:00
} ,
"stringList" : {
"type" : "array" ,
2026-08-19 22:06:20 +02:00
"items" : {
"type" : "string" ,
"minLength" : 1
}
2026-08-18 12:15:41 +02:00
} ,
2026-08-22 14:53:31 +02:00
"identityBinding" : {
"type" : "object" ,
"required" : [
"scheme" ,
"authority" ,
"subject" ,
"principal_type"
] ,
"properties" : {
"scheme" : {
"type" : "string" ,
"pattern" : "^[a-z0-9]+(-[a-z0-9]+)*$" ,
"description" : "Identity mechanism, for example iam-profile, kubernetes-service-account, ssh-certificate, or openbao-auth-role."
} ,
"authority" : {
"type" : "string" ,
"minLength" : 1 ,
"description" : "Authoritative issuer or registry for this principal."
} ,
"subject" : {
"type" : "string" ,
"minLength" : 1 ,
"description" : "Exact principal value asserted by the authority."
} ,
"principal_type" : {
"enum" : [
"service" ,
"agent"
] ,
"description" : "IAM Profile principal type. A human identity is caller context and cannot be the sole workload identity."
} ,
"environment" : {
"type" : "string" ,
"minLength" : 1
} ,
"evidence" : {
"$ref" : "#/$defs/stringList"
}
} ,
"additionalProperties" : false
} ,
"workloadIdentity" : {
"type" : "object" ,
"required" : [
"name" ,
"kind" ,
"responsible_repo" ,
"identity_bindings"
] ,
"properties" : {
"name" : {
"$ref" : "#/$defs/serviceName" ,
"description" : "Stable workload id. It must equal the containing service field."
} ,
"kind" : {
"enum" : [
"application" ,
"platform-service" ,
"automation" ,
"operational-control-plane" ,
"maintenance-job"
]
} ,
"responsible_repo" : {
"$ref" : "#/$defs/repoName" ,
"description" : "Repository accountable for the workload identity and zone declaration."
} ,
"declaration_ref" : {
"type" : "string" ,
"minLength" : 1 ,
"description" : "Authoritative owner declaration. Required by RMGR-ADR-004 for a managed deployable, for example rapp-user-engine/declarations/rapp.yaml."
} ,
"identity_bindings" : {
"type" : "array" ,
"minItems" : 1 ,
"items" : {
"$ref" : "#/$defs/identityBinding"
}
}
} ,
"additionalProperties" : false
} ,
"zoneEvidence" : {
"type" : "object" ,
"required" : [
"ref" ,
"supports"
] ,
"properties" : {
"ref" : {
"type" : "string" ,
"minLength" : 1
} ,
"supports" : {
"type" : "array" ,
"minItems" : 1 ,
"uniqueItems" : true ,
"items" : {
"type" : "string" ,
"minLength" : 1
}
}
} ,
"additionalProperties" : false
} ,
"zoneDeclaration" : {
"type" : "object" ,
"required" : [
"standard" ,
"membership" ,
"responsible_party" ,
"justification" ,
"context" ,
"evidence" ,
"reviewed" ,
"review_due"
] ,
"properties" : {
"standard" : {
"const" : "security-zones_v0.1"
} ,
"membership" : {
"enum" : [
"z0-experimental" ,
"z1-operational" ,
"z2-protected" ,
"z3-critical" ,
"z2-continuity"
]
} ,
"responsible_party" : {
"type" : "string" ,
"minLength" : 1
} ,
"justification" : {
"type" : "string" ,
"minLength" : 1
} ,
"context" : {
"type" : "object" ,
"required" : [
"maturity" ,
"criticality" ,
"data_classification"
] ,
"properties" : {
"maturity" : {
"enum" : [ "M0" , "M1" , "M2" , "M3" ]
} ,
"criticality" : {
"enum" : [ "low" , "medium" , "high" , "critical" , "n/a" ]
} ,
"data_classification" : {
"type" : "string" ,
"minLength" : 1
}
} ,
"additionalProperties" : false
} ,
"evidence" : {
"type" : "array" ,
"minItems" : 1 ,
"items" : {
"$ref" : "#/$defs/zoneEvidence"
}
} ,
"reviewed" : {
"type" : "string" ,
"format" : "date"
} ,
"review_due" : {
"type" : "string" ,
"format" : "date"
}
} ,
"additionalProperties" : false
} ,
2026-08-18 12:15:41 +02:00
"paths" : {
"type" : "object" ,
2026-08-19 22:06:20 +02:00
"propertyNames" : {
"$ref" : "#/$defs/axisName"
} ,
2026-08-18 12:15:41 +02:00
"additionalProperties" : {
"type" : "object" ,
"minProperties" : 1 ,
2026-08-19 22:06:20 +02:00
"additionalProperties" : {
"$ref" : "#/$defs/level"
}
2026-08-18 12:15:41 +02:00
}
} ,
"placementException" : {
"type" : "object" ,
2026-08-19 22:06:20 +02:00
"required" : [
"tenants" ,
"P" ,
"reason"
] ,
2026-08-18 12:15:41 +02:00
"properties" : {
2026-08-19 22:06:20 +02:00
"tenants" : {
"$ref" : "#/$defs/stringList"
} ,
"P" : {
"type" : "integer" ,
"minimum" : 0 ,
"maximum" : 4
} ,
"reason" : {
"type" : "string" ,
"minLength" : 1
} ,
"tier_ref" : {
"type" : "string" ,
"minLength" : 1
}
2026-08-18 12:15:41 +02:00
} ,
"additionalProperties" : false
} ,
"tenancy" : {
"type" : "object" ,
2026-08-19 22:06:20 +02:00
"required" : [
"current" ,
"target" ,
"reviewed" ,
"review_due" ,
"service_class"
] ,
2026-08-18 12:15:41 +02:00
"properties" : {
2026-08-19 22:06:20 +02:00
"current" : {
"$ref" : "#/$defs/axisVector"
} ,
"implemented" : {
"$ref" : "#/$defs/partialAxisVector"
} ,
"target" : {
"$ref" : "#/$defs/axisVector"
} ,
"reviewed" : {
"type" : "string" ,
"format" : "date"
} ,
"review_due" : {
"type" : "string" ,
"format" : "date"
} ,
"service_class" : {
"enum" : [
"latency-critical" ,
"interactive" ,
"batch"
]
} ,
2026-08-18 12:15:41 +02:00
"permanent" : {
"type" : "array" ,
"uniqueItems" : true ,
2026-08-19 22:06:20 +02:00
"items" : {
"$ref" : "#/$defs/axisName"
}
} ,
"reason" : {
"$ref" : "#/$defs/stringMap"
} ,
"gap" : {
"$ref" : "#/$defs/stringMap"
} ,
"paths" : {
"$ref" : "#/$defs/paths"
2026-08-18 12:15:41 +02:00
} ,
"placement_exceptions" : {
"type" : "array" ,
2026-08-19 22:06:20 +02:00
"items" : {
"$ref" : "#/$defs/placementException"
}
2026-08-18 12:15:41 +02:00
} ,
2026-08-19 22:06:20 +02:00
"secondary_stores" : {
"$ref" : "#/$defs/stringList"
}
2026-08-18 12:15:41 +02:00
} ,
"additionalProperties" : false
} ,
"providerAxis" : {
"type" : "object" ,
2026-08-19 22:06:20 +02:00
"required" : [
"available" ,
"maximum"
] ,
2026-08-18 12:15:41 +02:00
"properties" : {
2026-08-19 22:06:20 +02:00
"available" : {
"$ref" : "#/$defs/level"
} ,
"maximum" : {
"$ref" : "#/$defs/level"
} ,
"conditions" : {
"$ref" : "#/$defs/stringList"
} ,
"evidence" : {
"$ref" : "#/$defs/stringList"
} ,
"reason" : {
"type" : "string" ,
"minLength" : 1
}
2026-08-18 12:15:41 +02:00
} ,
"additionalProperties" : false
} ,
"provider" : {
"type" : "object" ,
2026-08-19 22:06:20 +02:00
"required" : [
"axes"
] ,
2026-08-18 12:15:41 +02:00
"properties" : {
2026-08-19 22:06:20 +02:00
"capability" : {
"type" : "string" ,
"minLength" : 1
} ,
"profile" : {
"type" : "string" ,
"minLength" : 1
} ,
2026-08-18 12:15:41 +02:00
"axes" : {
"type" : "object" ,
"minProperties" : 1 ,
"properties" : {
2026-08-19 22:06:20 +02:00
"I" : {
"$ref" : "#/$defs/providerAxis"
} ,
"A" : {
"$ref" : "#/$defs/providerAxis"
} ,
"E" : {
"$ref" : "#/$defs/providerAxis"
} ,
"P" : {
"$ref" : "#/$defs/providerAxis"
} ,
"R" : {
"$ref" : "#/$defs/providerAxis"
} ,
"V" : {
"$ref" : "#/$defs/providerAxis"
}
2026-08-18 12:15:41 +02:00
} ,
"additionalProperties" : false
}
} ,
"additionalProperties" : false
} ,
"evidence" : {
"type" : "object" ,
"additionalProperties" : {
"oneOf" : [
2026-08-19 22:06:20 +02:00
{
"type" : "string" ,
"minLength" : 1
} ,
{
"$ref" : "#/$defs/stringList"
}
2026-08-18 12:15:41 +02:00
]
}
} ,
2026-08-23 13:16:34 +02:00
"evidenceFreshnessEntry" : {
"type" : "object" ,
"required" : [
"kind" ,
"observed_at" ,
"responsible_repo" ,
"scope" ,
"remediation"
] ,
"properties" : {
"kind" : {
"enum" : [
"mechanical" ,
"adversarial"
]
} ,
"observed_at" : {
"type" : "string" ,
"format" : "date-time"
} ,
"valid_until" : {
"type" : "string" ,
"format" : "date-time"
} ,
"responsible_repo" : {
"$ref" : "#/$defs/repoName"
} ,
"scope" : {
"type" : "string" ,
"minLength" : 1
} ,
"remediation" : {
"type" : "string" ,
"minLength" : 1
} ,
"source_revision" : {
"type" : "string" ,
"minLength" : 1
}
} ,
"allOf" : [
{
"if" : {
"properties" : {
"kind" : {
"const" : "adversarial"
}
} ,
"required" : [
"kind"
]
} ,
"then" : {
"required" : [
"valid_until"
]
}
}
] ,
"additionalProperties" : false
} ,
"evidenceFreshness" : {
"type" : "object" ,
"patternProperties" : {
"^[IAEPRV][0-4]$" : {
"$ref" : "#/$defs/evidenceFreshnessEntry"
}
} ,
"additionalProperties" : false
} ,
2026-08-18 12:15:41 +02:00
"service" : {
"type" : "object" ,
2026-08-19 22:06:20 +02:00
"required" : [
"service" ,
"role" ,
"tenancy"
] ,
2026-08-18 12:15:41 +02:00
"properties" : {
2026-08-19 22:06:20 +02:00
"service" : {
"$ref" : "#/$defs/serviceName"
} ,
"role" : {
"type" : "string" ,
"minLength" : 1
} ,
2026-08-23 13:16:34 +02:00
"responsible_repo" : {
"$ref" : "#/$defs/repoName"
} ,
2026-08-22 14:53:31 +02:00
"workload_identity" : {
"$ref" : "#/$defs/workloadIdentity"
} ,
2026-08-19 22:06:20 +02:00
"tenancy" : {
"$ref" : "#/$defs/tenancy"
} ,
"provider" : {
"$ref" : "#/$defs/provider"
} ,
"evidence" : {
"$ref" : "#/$defs/evidence"
} ,
2026-08-23 13:16:34 +02:00
"evidence_freshness" : {
"$ref" : "#/$defs/evidenceFreshness"
} ,
2026-08-19 22:06:20 +02:00
"notes" : {
"$ref" : "#/$defs/stringList"
2026-08-22 14:53:31 +02:00
} ,
"zones" : {
"$ref" : "#/$defs/zoneDeclaration"
2026-08-19 22:06:20 +02:00
}
2026-08-18 12:15:41 +02:00
} ,
2026-08-22 14:53:31 +02:00
"allOf" : [
{
"if" : {
"required" : [
"zones"
]
} ,
"then" : {
"required" : [
"workload_identity"
]
}
}
] ,
2026-08-18 12:15:41 +02:00
"additionalProperties" : false
}
}
}