@opensoha/contracts 0.1.26 → 0.1.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (213) hide show
  1. package/COMPATIBILITY.md +14 -3
  2. package/README.md +8 -9
  3. package/auth/catalog_generated.go +2 -2
  4. package/auth/permission-catalog.json +481 -1
  5. package/compat/consumer-revisions.json +1 -1
  6. package/compat/json-schema-ecosystem-0.1.0.json +1 -1
  7. package/compat/openapi-loose-boundaries-0.1.0.json +1 -1
  8. package/endpointcontrol/decode.go +64 -0
  9. package/endpointcontrol/models.go +138 -0
  10. package/endpointcontrol/models_test.go +51 -0
  11. package/endpointcontrol/protocol.schema.json +397 -0
  12. package/fixtures/json-schema/endpoint-controls/invalid/controls.json +16 -0
  13. package/fixtures/json-schema/endpoint-controls/invalid/missing-channel-decision.json +15 -0
  14. package/fixtures/json-schema/endpoint-controls/invalid/receipt-content.json +36 -0
  15. package/fixtures/json-schema/endpoint-controls/valid/controls.json +16 -0
  16. package/fixtures/json-schema/endpoint-controls/valid/receipt.json +35 -0
  17. package/fixtures/json-schema/network-runtime-protocol/invalid/eap-activate-bad-fingerprint.json +14 -0
  18. package/fixtures/json-schema/network-runtime-protocol/invalid/eap-gateway-request.json +14 -0
  19. package/fixtures/json-schema/network-runtime-protocol/invalid/eap-private-key-request.json +15 -0
  20. package/fixtures/json-schema/network-runtime-protocol/invalid/eap-profile-without-eap-credential.json +22 -0
  21. package/fixtures/json-schema/network-runtime-protocol/invalid/endpoint-dns-observation.json +25 -0
  22. package/fixtures/json-schema/network-runtime-protocol/invalid/gateway-presence.json +22 -0
  23. package/fixtures/json-schema/network-runtime-protocol/invalid/mihomo-protection-zero-version.json +45 -0
  24. package/fixtures/json-schema/network-runtime-protocol/invalid/presence-raw-key.json +23 -0
  25. package/fixtures/json-schema/network-runtime-protocol/invalid/presence-zero-sequence.json +22 -0
  26. package/fixtures/json-schema/network-runtime-protocol/invalid/workload-wide-vpn.json +17 -0
  27. package/fixtures/json-schema/network-runtime-protocol/valid/eap-certificate-activate.json +14 -0
  28. package/fixtures/json-schema/network-runtime-protocol/valid/eap-certificate-request.json +14 -0
  29. package/fixtures/json-schema/network-runtime-protocol/valid/eap-profile-enrollment.json +24 -0
  30. package/fixtures/json-schema/network-runtime-protocol/valid/endpoint-presence.json +22 -0
  31. package/fixtures/json-schema/network-runtime-protocol/valid/ipv6-configuration.json +102 -0
  32. package/fixtures/json-schema/network-runtime-protocol/valid/mihomo-protected-policy.json +45 -0
  33. package/fixtures/json-schema/network-runtime-protocol/valid/site-dns-ipv6.json +25 -0
  34. package/fixtures/json-schema/network-runtime-protocol/valid/workload-direct-ztna.json +20 -0
  35. package/fixtures/openapi/DLPShadowDecision/invalid/step-up-type.json +14 -0
  36. package/fixtures/openapi/DLPShadowDecision/valid/archive-v2.json +14 -0
  37. package/fixtures/openapi/DLPShadowDecision/valid/step-up.json +14 -0
  38. package/fixtures/openapi/DLPShadowInput/invalid/self-reported-result.json +7 -0
  39. package/fixtures/openapi/DLPShadowInput/invalid/too-many-samples.json +14 -0
  40. package/fixtures/openapi/DLPShadowInput/valid/bounded.json +7 -0
  41. package/fixtures/openapi/DockerVolumeDLPAppealInput/invalid/p4-response.json +3 -0
  42. package/fixtures/openapi/DockerVolumeDLPAppealInput/valid/p4-response.json +3 -0
  43. package/fixtures/openapi/DockerVolumeDLPAppealReviewInput/invalid/p4-response.json +5 -0
  44. package/fixtures/openapi/DockerVolumeDLPAppealReviewInput/valid/p4-response.json +5 -0
  45. package/fixtures/openapi/DockerVolumeDLPAuthorizationInput/invalid/p4-response.json +3 -0
  46. package/fixtures/openapi/DockerVolumeDLPAuthorizationInput/valid/p4-response.json +3 -0
  47. package/fixtures/openapi/DockerVolumeDLPContent/invalid/archive-unsupported-channel.json +9 -0
  48. package/fixtures/openapi/DockerVolumeDLPContent/invalid/p4.json +6 -0
  49. package/fixtures/openapi/DockerVolumeDLPContent/invalid/step-up-audit.json +9 -0
  50. package/fixtures/openapi/DockerVolumeDLPContent/invalid/unavailable-engine.json +9 -0
  51. package/fixtures/openapi/DockerVolumeDLPContent/invalid/unknown-data-level.json +12 -0
  52. package/fixtures/openapi/DockerVolumeDLPContent/valid/classified-rule.json +16 -0
  53. package/fixtures/openapi/DockerVolumeDLPContent/valid/p4.json +8 -0
  54. package/fixtures/openapi/DockerVolumeDLPContent/valid/step-up.json +9 -0
  55. package/fixtures/openapi/DockerVolumeDLPDecision/invalid/p4.json +9 -0
  56. package/fixtures/openapi/DockerVolumeDLPDecision/invalid/step-up-type.json +12 -0
  57. package/fixtures/openapi/DockerVolumeDLPDecision/valid/archive-v2.json +12 -0
  58. package/fixtures/openapi/DockerVolumeDLPDecision/valid/p4.json +11 -0
  59. package/fixtures/openapi/DockerVolumeDLPDecision/valid/step-up.json +12 -0
  60. package/fixtures/openapi/DockerVolumeDLPSaveInput/invalid/p4.json +11 -0
  61. package/fixtures/openapi/DockerVolumeDLPSaveInput/valid/p4.json +11 -0
  62. package/fixtures/openapi/DockerVolumeFileReadInput/invalid/p4-response.json +5 -0
  63. package/fixtures/openapi/DockerVolumeFileReadInput/valid/p4-response.json +4 -0
  64. package/fixtures/openapi/EndpointDeviceInput/invalid/reported-management.json +5 -0
  65. package/fixtures/openapi/EndpointDeviceInput/valid/management-state.json +5 -0
  66. package/fixtures/openapi/EndpointDeviceRegistrationInput/invalid/self-promote-management.json +5 -0
  67. package/fixtures/openapi/KubernetesClusterRegistrationRequest/invalid/metric-cluster-value-length.json +3 -0
  68. package/fixtures/openapi/KubernetesClusterRegistrationRequest/invalid/metric-cluster-value-type.json +3 -0
  69. package/fixtures/openapi/KubernetesClusterRegistrationRequest/valid/metric-cluster-alias.json +5 -0
  70. package/fixtures/openapi/KubernetesClusterRegistrationRequest/valid/metric-cluster-reset.json +3 -0
  71. package/fixtures/openapi/KubernetesHelmReleaseValuesUpdateInput/invalid/revision-overflow.json +4 -0
  72. package/fixtures/openapi/KubernetesHelmReleaseValuesUpdateInput/valid/legacy.json +3 -0
  73. package/fixtures/openapi/KubernetesHelmReleaseValuesUpdateInput/valid/observed-revision.json +4 -0
  74. package/fixtures/openapi/KubernetesJobDetail/invalid/execution-observation.json +23 -0
  75. package/fixtures/openapi/KubernetesJobDetail/valid/execution-observation.json +23 -0
  76. package/fixtures/openapi/KubernetesNode/invalid/labels.json +10 -0
  77. package/fixtures/openapi/KubernetesNode/valid/labels.json +11 -0
  78. package/fixtures/openapi/KubernetesPodListEnvelope/invalid/empty-uid.json +13 -0
  79. package/fixtures/openapi/KubernetesPodListEnvelope/invalid/invalid-container-state.json +20 -0
  80. package/fixtures/openapi/KubernetesPodListEnvelope/invalid/missing-container-ready.json +19 -0
  81. package/fixtures/openapi/KubernetesPodListEnvelope/valid/container-statuses.json +67 -0
  82. package/fixtures/openapi/KubernetesPodListEnvelope/valid/running-pod.json +1 -0
  83. package/fixtures/openapi/KubernetesPrometheusDetail/invalid/metric-cluster-value-type.json +4 -0
  84. package/fixtures/openapi/KubernetesPrometheusDetail/valid/metric-cluster-alias.json +5 -0
  85. package/fixtures/openapi/KubernetesResourceGraphEnvelope/invalid/network-edge-source-payload.json +73 -0
  86. package/fixtures/openapi/KubernetesResourceGraphEnvelope/valid/network-edge-facts.json +67 -0
  87. package/fixtures/openapi/KubernetesSecretCertificate/invalid/secret-data.json +1 -0
  88. package/fixtures/openapi/KubernetesSecretCertificate/invalid/status.json +1 -0
  89. package/fixtures/openapi/KubernetesSecretCertificate/valid/available.json +1 -0
  90. package/fixtures/openapi/KubernetesSecretCertificate/valid/missing.json +1 -0
  91. package/fixtures/openapi/ManagedContentPasteInput/invalid/boundary.json +5 -0
  92. package/fixtures/openapi/ManagedContentPasteInput/valid/boundary.json +6 -0
  93. package/fixtures/openapi/ManagedContentPolicy/invalid/self-reported-allow.json +8 -0
  94. package/fixtures/openapi/ManagedContentPolicy/invalid/step-up-audit.json +8 -0
  95. package/fixtures/openapi/ManagedContentPolicy/invalid/unknown-extractor.json +8 -0
  96. package/fixtures/openapi/ManagedContentPolicy/valid/archive-v2.json +8 -0
  97. package/fixtures/openapi/ManagedContentPolicy/valid/network-and-level.json +10 -0
  98. package/fixtures/openapi/ManagedContentPolicy/valid/step-up.json +8 -0
  99. package/fixtures/openapi/ManagedContentReviewInput/invalid/boundary.json +5 -0
  100. package/fixtures/openapi/ManagedContentReviewInput/valid/boundary.json +5 -0
  101. package/fixtures/openapi/ManagedContentSaveInput/invalid/boundary.json +14 -0
  102. package/fixtures/openapi/ManagedContentSaveInput/valid/boundary.json +16 -0
  103. package/fixtures/openapi/ManagedContentUploadInput/invalid/boundary.json +7 -0
  104. package/fixtures/openapi/ManagedContentUploadInput/valid/boundary.json +6 -0
  105. package/fixtures/openapi/NetworkAccessPolicyInput/invalid/unknown-management-state.json +35 -0
  106. package/fixtures/openapi/NetworkAccessPolicyInput/valid/managed-device.json +35 -0
  107. package/fixtures/openapi/NetworkAdmissionPreviewRequest/invalid/deviceId-characters.json +4 -0
  108. package/fixtures/openapi/NetworkAdmissionPreviewRequest/invalid/nasBindingId-characters.json +4 -0
  109. package/fixtures/openapi/NetworkAdmissionPreviewRequest/invalid/subject-override.json +1 -0
  110. package/fixtures/openapi/NetworkAdmissionPreviewRequest/valid/device-nas.json +1 -0
  111. package/fixtures/openapi/NetworkAdmissionPreviewResult/invalid/missing-attributeVersion.json +13 -0
  112. package/fixtures/openapi/NetworkAdmissionPreviewResult/invalid/missing-evaluatedAt.json +13 -0
  113. package/fixtures/openapi/NetworkAdmissionPreviewResult/valid/versioned.json +14 -0
  114. package/fixtures/openapi/NetworkConflictAnalysisRequest/invalid/missing-runtime-ranges.json +1 -0
  115. package/fixtures/openapi/NetworkConflictAnalysisRequest/invalid/unknown-source-type.json +9 -0
  116. package/fixtures/openapi/NetworkConflictAnalysisRequest/valid/empty-runtime-ranges.json +3 -0
  117. package/fixtures/openapi/NetworkConflictAnalysisRequest/{invalid → valid}/ipv6-range.json +1 -1
  118. package/fixtures/openapi/NetworkEAPServerTrust/invalid/no-server-validation.json +5 -0
  119. package/fixtures/openapi/NetworkEAPServerTrust/valid/named-server.json +9 -0
  120. package/fixtures/openapi/NetworkEndpointResponsePolicyInput/invalid/all-sites-implicit.json +45 -0
  121. package/fixtures/openapi/NetworkEndpointResponsePolicyInput/invalid/unbounded-stages.json +54 -0
  122. package/fixtures/openapi/NetworkEndpointResponsePolicyInput/invalid/zero-heartbeat.json +47 -0
  123. package/fixtures/openapi/NetworkEndpointResponsePolicyInput/valid/staged-protection.json +47 -0
  124. package/fixtures/openapi/NetworkEndpointResponseRestoreInput/invalid/missing-reason.json +3 -0
  125. package/fixtures/openapi/NetworkEndpointResponseRestoreInput/valid/expected-current.json +4 -0
  126. package/fixtures/openapi/NetworkPolicyPreviewResult/invalid/attribute-version.json +1 -0
  127. package/fixtures/openapi/NetworkPolicyPreviewResult/valid/admission-version.json +1 -0
  128. package/fixtures/openapi/NetworkPolicySubjects/invalid/duplicate-role.json +1 -0
  129. package/fixtures/openapi/NetworkPolicySubjects/invalid/role-characters.json +5 -0
  130. package/fixtures/openapi/NetworkPolicySubjects/valid/role-bound.json +1 -0
  131. package/fixtures/openapi/NetworkProxyConfigurationInput/invalid/missing-content.json +1 -0
  132. package/fixtures/openapi/NetworkProxyConfigurationPatchInput/invalid/bad-binding-id.json +9 -0
  133. package/fixtures/openapi/NetworkProxyConfigurationPatchInput/invalid/empty-content.json +1 -0
  134. package/fixtures/openapi/NetworkProxyConfigurationPatchInput/valid/binding-only.json +11 -0
  135. package/fixtures/openapi/NetworkProxyConfigurationPatchInput/valid/clear-binding-disabled.json +5 -0
  136. package/fixtures/openapi/NetworkProxyConfigurationPatchInput/valid/enabled.json +1 -0
  137. package/fixtures/openapi/NetworkSiteInput/invalid/unknown-governance.json +6 -0
  138. package/fixtures/openapi/NetworkSiteInput/valid/restricted-unmanaged.json +6 -0
  139. package/gen/go/sohaapi/client.go +1 -1
  140. package/gen/go/sohaapi/client_test.go +13 -0
  141. package/gen/go/sohaapi/kubernetes_workload_optional_test.go +40 -0
  142. package/gen/go/sohaapi/pod_status_compat_test.go +36 -0
  143. package/gen/go/sohaapi/proxy_configuration_test.go +38 -0
  144. package/gen/go/sohaapi/types.go +3222 -260
  145. package/gen/ts/sohaapi/index.ts +15506 -10104
  146. package/helmrelease/runtime/values_upgrade.go +78 -0
  147. package/helmrelease/runtime/values_upgrade_test.go +123 -0
  148. package/helmrelease/values_update.go +31 -0
  149. package/network/README.md +34 -0
  150. package/network/network-radius-accounting.schema.json +4 -1
  151. package/network/network-runtime-protocol.schema.json +2166 -317
  152. package/network/proxy-runtime.schema.json +482 -67
  153. package/openapi/network_control_test.go +64 -0
  154. package/openapi/soha-api.json +50412 -41310
  155. package/openapi/soha-api.yaml +16859 -10699
  156. package/openapi/spec_generated.go +3 -3
  157. package/package.json +6 -3
  158. package/proxytransport/handler.go +271 -0
  159. package/proxytransport/probe.go +30 -0
  160. package/proxytransport/scope.go +89 -0
  161. package/proxytransport/transport_test.go +60 -0
  162. package/resource/agent_profiles.go +9 -15
  163. package/resource/agent_profiles_test.go +9 -3
  164. package/resource/custom_graph_page.go +18 -0
  165. package/resource/models.go +102 -57
  166. package/resource/network_topology.go +22 -0
  167. package/resource/network_topology_projection.go +36 -22
  168. package/resource/network_topology_projection_test.go +4 -0
  169. package/resource/network_topology_test.go +20 -0
  170. package/resource/network_topology_validation.go +5 -0
  171. package/resource/observed_workload.go +18 -0
  172. package/resource/pod_status_test.go +22 -0
  173. package/resource/rbac_graph.go +4 -0
  174. package/resource/rollout_optional_test.go +33 -0
  175. package/resource/runtime/network_relationship_primitives.go +66 -0
  176. package/resource/runtime/network_relationship_primitives_test.go +147 -0
  177. package/resource/runtime/network_topology.go +17 -5
  178. package/resource/runtime/network_topology_builder.go +405 -0
  179. package/resource/runtime/network_topology_builder_backends.go +195 -0
  180. package/resource/runtime/network_topology_builder_gateway_l4_test.go +86 -0
  181. package/resource/runtime/network_topology_builder_ingress.go +302 -0
  182. package/resource/runtime/network_topology_builder_legacy.go +66 -0
  183. package/resource/runtime/network_topology_builder_providers.go +242 -0
  184. package/resource/runtime/network_topology_builder_test.go +186 -0
  185. package/resource/runtime/network_topology_declarations.go +329 -0
  186. package/resource/runtime/resource_edit.go +22 -0
  187. package/resource/runtime/resource_edit_test.go +32 -0
  188. package/resource/runtime/resource_graph_collect.go +325 -0
  189. package/resource/runtime/resource_graph_configuration.go +59 -0
  190. package/resource/runtime/resource_graph_configuration_collect.go +198 -0
  191. package/resource/runtime/resource_graph_configuration_test.go +470 -0
  192. package/resource/runtime/resource_graph_custom_page.go +159 -0
  193. package/resource/runtime/resource_graph_custom_root.go +132 -0
  194. package/resource/runtime/resource_graph_custom_root_test.go +197 -0
  195. package/resource/runtime/resource_graph_enrichment.go +417 -0
  196. package/resource/runtime/resource_graph_enrichment_hpa_test.go +117 -0
  197. package/resource/runtime/resource_graph_enrichment_test.go +201 -0
  198. package/resource/runtime/resource_graph_metadata.go +125 -0
  199. package/resource/runtime/resource_graph_metadata_test.go +204 -0
  200. package/resource/runtime/resource_graph_network.go +224 -0
  201. package/resource/runtime/resource_graph_network_collect.go +174 -0
  202. package/resource/runtime/resource_graph_network_collect_test.go +147 -0
  203. package/resource/runtime/resource_graph_network_test.go +342 -0
  204. package/resource/runtime/resource_graph_rbac.go +278 -0
  205. package/resource/runtime/resource_graph_rbac_test.go +372 -0
  206. package/resource/runtime/resource_graph_rules.go +834 -0
  207. package/resource/runtime/resource_graph_storage.go +144 -0
  208. package/resource/runtime/resource_graph_storage_collect.go +163 -0
  209. package/resource/runtime/resource_graph_storage_test.go +397 -0
  210. package/resource/runtime/resource_graph_test.go +627 -0
  211. package/resource/runtime/secret_certificate.go +44 -0
  212. package/resource/runtime/secret_certificate_test.go +87 -0
  213. package/resource/storage_graph.go +4 -0
@@ -17,14 +17,20 @@
17
17
  "payload"
18
18
  ],
19
19
  "properties": {
20
- "schemaVersion": { "const": "network-runtime/v1alpha1" },
21
- "messageId": { "$ref": "#/$defs/Identifier" },
20
+ "schemaVersion": {
21
+ "const": "network-runtime/v1alpha1"
22
+ },
23
+ "messageId": {
24
+ "$ref": "#/$defs/Identifier"
25
+ },
22
26
  "messageType": {
23
27
  "enum": [
24
28
  "vpn.managed.prepare.request",
25
29
  "vpn.managed.prepare.result",
26
30
  "vpn.managed.connect.request",
27
31
  "vpn.managed.connect.result",
32
+ "endpoint.presence.request",
33
+ "endpoint.presence.result",
28
34
  "runtime.enroll.request",
29
35
  "runtime.enroll.result",
30
36
  "configuration.desired",
@@ -37,36 +43,155 @@
37
43
  "nas.authorization.request",
38
44
  "nas.authorization.result",
39
45
  "nas.session.command",
40
- "nas.session.command.result"
46
+ "nas.session.command.result",
47
+ "eap.certificate.request",
48
+ "eap.certificate.result",
49
+ "eap.certificate.activate.request",
50
+ "eap.certificate.activate.result",
51
+ "dns.observations"
52
+ ]
53
+ },
54
+ "producerId": {
55
+ "$ref": "#/$defs/Identifier"
56
+ },
57
+ "runtimeId": {
58
+ "$ref": "#/$defs/Identifier"
59
+ },
60
+ "runtimeKind": {
61
+ "enum": [
62
+ "endpoint",
63
+ "gateway",
64
+ "nas",
65
+ "proxy"
41
66
  ]
42
67
  },
43
- "producerId": { "$ref": "#/$defs/Identifier" },
44
- "runtimeId": { "$ref": "#/$defs/Identifier" },
45
- "runtimeKind": { "enum": ["endpoint", "gateway", "nas", "proxy"] },
46
- "occurredAt": { "type": "string", "format": "date-time" },
47
- "expiresAt": { "type": "string", "format": "date-time" },
68
+ "occurredAt": {
69
+ "type": "string",
70
+ "format": "date-time"
71
+ },
72
+ "expiresAt": {
73
+ "type": "string",
74
+ "format": "date-time"
75
+ },
48
76
  "payload": {
49
77
  "oneOf": [
50
- { "$ref": "#/$defs/VPNManagedPrepareResult" },
51
- { "$ref": "#/$defs/VPNManagedConnectRequest" },
52
- { "$ref": "#/$defs/VPNManagedConnectResult" },
53
- { "$ref": "#/$defs/EnrollmentRequest" },
54
- { "$ref": "#/$defs/EnrollmentResult" },
55
- { "$ref": "#/$defs/ConfigurationDesired" },
56
- { "$ref": "#/$defs/ConfigurationApplied" },
57
- { "$ref": "#/$defs/LeaseRenewRequest" },
58
- { "$ref": "#/$defs/LeaseRenewResult" },
59
- { "$ref": "#/$defs/LeaseRevoke" },
60
- { "$ref": "#/$defs/VPNConnectRequest" },
61
- { "$ref": "#/$defs/VPNConnectResult" },
62
- { "$ref": "#/$defs/NASAuthorizationRequest" },
63
- { "$ref": "#/$defs/NASAuthorizationResult" },
64
- { "$ref": "#/$defs/NASSessionCommand" },
65
- { "$ref": "#/$defs/NASSessionCommandResult" }
78
+ {
79
+ "$ref": "#/$defs/VPNManagedPrepareResult"
80
+ },
81
+ {
82
+ "$ref": "#/$defs/VPNManagedConnectRequest"
83
+ },
84
+ {
85
+ "$ref": "#/$defs/VPNManagedConnectResult"
86
+ },
87
+ {
88
+ "$ref": "#/$defs/EndpointPresenceRequest"
89
+ },
90
+ {
91
+ "$ref": "#/$defs/EndpointPresenceResult"
92
+ },
93
+ {
94
+ "$ref": "#/$defs/EnrollmentRequest"
95
+ },
96
+ {
97
+ "$ref": "#/$defs/EnrollmentResult"
98
+ },
99
+ {
100
+ "$ref": "#/$defs/ConfigurationDesired"
101
+ },
102
+ {
103
+ "$ref": "#/$defs/ConfigurationApplied"
104
+ },
105
+ {
106
+ "$ref": "#/$defs/LeaseRenewRequest"
107
+ },
108
+ {
109
+ "$ref": "#/$defs/LeaseRenewResult"
110
+ },
111
+ {
112
+ "$ref": "#/$defs/LeaseRevoke"
113
+ },
114
+ {
115
+ "$ref": "#/$defs/VPNConnectRequest"
116
+ },
117
+ {
118
+ "$ref": "#/$defs/VPNConnectResult"
119
+ },
120
+ {
121
+ "$ref": "#/$defs/NASAuthorizationRequest"
122
+ },
123
+ {
124
+ "$ref": "#/$defs/NASAuthorizationResult"
125
+ },
126
+ {
127
+ "$ref": "#/$defs/NASSessionCommand"
128
+ },
129
+ {
130
+ "$ref": "#/$defs/NASSessionCommandResult"
131
+ },
132
+ {
133
+ "$ref": "#/$defs/EAPCertificateRequest"
134
+ },
135
+ {
136
+ "$ref": "#/$defs/EAPCertificateResult"
137
+ },
138
+ {
139
+ "$ref": "#/$defs/EAPCertificateActivateRequest"
140
+ },
141
+ {
142
+ "$ref": "#/$defs/EAPCertificateActivateResult"
143
+ },
144
+ {
145
+ "$ref": "#/$defs/DNSObservationBatch"
146
+ }
66
147
  ]
67
148
  }
68
149
  },
69
150
  "allOf": [
151
+ {
152
+ "if": {
153
+ "properties": {
154
+ "messageType": {
155
+ "const": "endpoint.presence.request"
156
+ }
157
+ },
158
+ "required": [
159
+ "messageType"
160
+ ]
161
+ },
162
+ "then": {
163
+ "properties": {
164
+ "runtimeKind": {
165
+ "const": "endpoint"
166
+ },
167
+ "payload": {
168
+ "$ref": "#/$defs/EndpointPresenceRequest"
169
+ }
170
+ }
171
+ }
172
+ },
173
+ {
174
+ "if": {
175
+ "properties": {
176
+ "messageType": {
177
+ "const": "endpoint.presence.result"
178
+ }
179
+ },
180
+ "required": [
181
+ "messageType"
182
+ ]
183
+ },
184
+ "then": {
185
+ "properties": {
186
+ "runtimeKind": {
187
+ "const": "endpoint"
188
+ },
189
+ "payload": {
190
+ "$ref": "#/$defs/EndpointPresenceResult"
191
+ }
192
+ }
193
+ }
194
+ },
70
195
  {
71
196
  "if": {
72
197
  "properties": {
@@ -156,90 +281,570 @@
156
281
  }
157
282
  },
158
283
  {
159
- "if": { "properties": { "messageType": { "const": "runtime.enroll.request" } }, "required": ["messageType"] },
160
- "then": { "properties": { "payload": { "$ref": "#/$defs/EnrollmentRequest" } } }
161
- },
162
- {
163
- "if": { "properties": { "messageType": { "const": "runtime.enroll.result" } }, "required": ["messageType"] },
164
- "then": { "properties": { "payload": { "$ref": "#/$defs/EnrollmentResult" } } }
165
- },
166
- {
167
- "if": { "properties": { "messageType": { "const": "configuration.desired" } }, "required": ["messageType"] },
168
- "then": { "properties": { "payload": { "$ref": "#/$defs/ConfigurationDesired" } } }
284
+ "if": {
285
+ "properties": {
286
+ "messageType": {
287
+ "const": "runtime.enroll.request"
288
+ }
289
+ },
290
+ "required": [
291
+ "messageType"
292
+ ]
293
+ },
294
+ "then": {
295
+ "properties": {
296
+ "payload": {
297
+ "$ref": "#/$defs/EnrollmentRequest"
298
+ }
299
+ }
300
+ }
169
301
  },
170
302
  {
171
- "if": { "properties": { "messageType": { "const": "configuration.applied" } }, "required": ["messageType"] },
172
- "then": { "properties": { "payload": { "$ref": "#/$defs/ConfigurationApplied" } } }
303
+ "if": {
304
+ "properties": {
305
+ "messageType": {
306
+ "const": "runtime.enroll.result"
307
+ }
308
+ },
309
+ "required": [
310
+ "messageType"
311
+ ]
312
+ },
313
+ "then": {
314
+ "properties": {
315
+ "payload": {
316
+ "$ref": "#/$defs/EnrollmentResult"
317
+ }
318
+ }
319
+ }
173
320
  },
174
321
  {
175
- "if": { "properties": { "messageType": { "const": "lease.renew.request" } }, "required": ["messageType"] },
176
- "then": { "properties": { "payload": { "$ref": "#/$defs/LeaseRenewRequest" } } }
322
+ "if": {
323
+ "properties": {
324
+ "messageType": {
325
+ "const": "configuration.desired"
326
+ }
327
+ },
328
+ "required": [
329
+ "messageType"
330
+ ]
331
+ },
332
+ "then": {
333
+ "properties": {
334
+ "payload": {
335
+ "$ref": "#/$defs/ConfigurationDesired"
336
+ }
337
+ }
338
+ }
177
339
  },
178
340
  {
179
- "if": { "properties": { "messageType": { "const": "lease.renew.result" } }, "required": ["messageType"] },
180
- "then": { "properties": { "payload": { "$ref": "#/$defs/LeaseRenewResult" } } }
341
+ "if": {
342
+ "properties": {
343
+ "messageType": {
344
+ "const": "configuration.applied"
345
+ }
346
+ },
347
+ "required": [
348
+ "messageType"
349
+ ]
350
+ },
351
+ "then": {
352
+ "properties": {
353
+ "payload": {
354
+ "$ref": "#/$defs/ConfigurationApplied"
355
+ }
356
+ }
357
+ }
181
358
  },
182
359
  {
183
- "if": { "properties": { "messageType": { "const": "lease.revoke" } }, "required": ["messageType"] },
184
- "then": { "properties": { "payload": { "$ref": "#/$defs/LeaseRevoke" } } }
360
+ "if": {
361
+ "properties": {
362
+ "messageType": {
363
+ "const": "lease.renew.request"
364
+ }
365
+ },
366
+ "required": [
367
+ "messageType"
368
+ ]
369
+ },
370
+ "then": {
371
+ "properties": {
372
+ "payload": {
373
+ "$ref": "#/$defs/LeaseRenewRequest"
374
+ }
375
+ }
376
+ }
185
377
  },
186
378
  {
187
- "if": { "properties": { "messageType": { "const": "vpn.connect.request" } }, "required": ["messageType"] },
379
+ "if": {
380
+ "properties": {
381
+ "messageType": {
382
+ "const": "lease.renew.result"
383
+ }
384
+ },
385
+ "required": [
386
+ "messageType"
387
+ ]
388
+ },
188
389
  "then": {
189
390
  "properties": {
190
- "runtimeKind": { "const": "endpoint" },
191
- "payload": { "$ref": "#/$defs/VPNConnectRequest" }
391
+ "payload": {
392
+ "$ref": "#/$defs/LeaseRenewResult"
393
+ }
192
394
  }
193
395
  }
194
396
  },
195
397
  {
196
- "if": { "properties": { "messageType": { "const": "vpn.connect.result" } }, "required": ["messageType"] },
398
+ "if": {
399
+ "properties": {
400
+ "messageType": {
401
+ "const": "lease.revoke"
402
+ }
403
+ },
404
+ "required": [
405
+ "messageType"
406
+ ]
407
+ },
197
408
  "then": {
198
409
  "properties": {
199
- "runtimeKind": { "const": "endpoint" },
200
- "payload": { "$ref": "#/$defs/VPNConnectResult" }
410
+ "payload": {
411
+ "$ref": "#/$defs/LeaseRevoke"
412
+ }
201
413
  }
202
414
  }
203
415
  },
204
416
  {
205
- "if": { "properties": { "messageType": { "const": "nas.authorization.request" } }, "required": ["messageType"] },
417
+ "if": {
418
+ "properties": {
419
+ "messageType": {
420
+ "const": "vpn.connect.request"
421
+ }
422
+ },
423
+ "required": [
424
+ "messageType"
425
+ ]
426
+ },
206
427
  "then": {
207
428
  "properties": {
208
- "runtimeKind": { "const": "nas" },
209
- "payload": { "$ref": "#/$defs/NASAuthorizationRequest" }
429
+ "runtimeKind": {
430
+ "const": "endpoint"
431
+ },
432
+ "payload": {
433
+ "$ref": "#/$defs/VPNConnectRequest"
434
+ }
210
435
  }
211
436
  }
212
437
  },
213
438
  {
214
- "if": { "properties": { "messageType": { "const": "nas.authorization.result" } }, "required": ["messageType"] },
439
+ "if": {
440
+ "properties": {
441
+ "messageType": {
442
+ "const": "vpn.connect.result"
443
+ }
444
+ },
445
+ "required": [
446
+ "messageType"
447
+ ]
448
+ },
215
449
  "then": {
216
450
  "properties": {
217
- "runtimeKind": { "const": "nas" },
218
- "payload": { "$ref": "#/$defs/NASAuthorizationResult" }
451
+ "runtimeKind": {
452
+ "const": "endpoint"
453
+ },
454
+ "payload": {
455
+ "$ref": "#/$defs/VPNConnectResult"
456
+ }
219
457
  }
220
458
  }
221
459
  },
222
460
  {
223
- "if": { "properties": { "messageType": { "const": "nas.session.command" } }, "required": ["messageType"] },
461
+ "if": {
462
+ "properties": {
463
+ "messageType": {
464
+ "const": "nas.authorization.request"
465
+ }
466
+ },
467
+ "required": [
468
+ "messageType"
469
+ ]
470
+ },
224
471
  "then": {
225
472
  "properties": {
226
- "runtimeKind": { "const": "nas" },
227
- "payload": { "$ref": "#/$defs/NASSessionCommand" }
473
+ "runtimeKind": {
474
+ "const": "nas"
475
+ },
476
+ "payload": {
477
+ "$ref": "#/$defs/NASAuthorizationRequest"
478
+ }
228
479
  }
229
480
  }
230
481
  },
231
482
  {
232
- "if": { "properties": { "messageType": { "const": "nas.session.command.result" } }, "required": ["messageType"] },
483
+ "if": {
484
+ "properties": {
485
+ "messageType": {
486
+ "const": "nas.authorization.result"
487
+ }
488
+ },
489
+ "required": [
490
+ "messageType"
491
+ ]
492
+ },
233
493
  "then": {
234
494
  "properties": {
235
- "runtimeKind": { "const": "nas" },
236
- "payload": { "$ref": "#/$defs/NASSessionCommandResult" }
495
+ "runtimeKind": {
496
+ "const": "nas"
497
+ },
498
+ "payload": {
499
+ "$ref": "#/$defs/NASAuthorizationResult"
500
+ }
237
501
  }
238
502
  }
239
- }
240
- ],
241
- "$defs": {
242
- "VPNManagedPrepareRequest": {
503
+ },
504
+ {
505
+ "if": {
506
+ "properties": {
507
+ "messageType": {
508
+ "const": "nas.session.command"
509
+ }
510
+ },
511
+ "required": [
512
+ "messageType"
513
+ ]
514
+ },
515
+ "then": {
516
+ "properties": {
517
+ "runtimeKind": {
518
+ "const": "nas"
519
+ },
520
+ "payload": {
521
+ "$ref": "#/$defs/NASSessionCommand"
522
+ }
523
+ }
524
+ }
525
+ },
526
+ {
527
+ "if": {
528
+ "properties": {
529
+ "messageType": {
530
+ "const": "nas.session.command.result"
531
+ }
532
+ },
533
+ "required": [
534
+ "messageType"
535
+ ]
536
+ },
537
+ "then": {
538
+ "properties": {
539
+ "runtimeKind": {
540
+ "const": "nas"
541
+ },
542
+ "payload": {
543
+ "$ref": "#/$defs/NASSessionCommandResult"
544
+ }
545
+ }
546
+ }
547
+ },
548
+ {
549
+ "if": {
550
+ "properties": {
551
+ "messageType": {
552
+ "const": "eap.certificate.request"
553
+ }
554
+ },
555
+ "required": [
556
+ "messageType"
557
+ ]
558
+ },
559
+ "then": {
560
+ "properties": {
561
+ "runtimeKind": {
562
+ "const": "endpoint"
563
+ },
564
+ "payload": {
565
+ "$ref": "#/$defs/EAPCertificateRequest"
566
+ }
567
+ }
568
+ }
569
+ },
570
+ {
571
+ "if": {
572
+ "properties": {
573
+ "messageType": {
574
+ "const": "eap.certificate.result"
575
+ }
576
+ },
577
+ "required": [
578
+ "messageType"
579
+ ]
580
+ },
581
+ "then": {
582
+ "properties": {
583
+ "runtimeKind": {
584
+ "const": "endpoint"
585
+ },
586
+ "payload": {
587
+ "$ref": "#/$defs/EAPCertificateResult"
588
+ }
589
+ }
590
+ }
591
+ },
592
+ {
593
+ "if": {
594
+ "properties": {
595
+ "messageType": {
596
+ "const": "eap.certificate.activate.request"
597
+ }
598
+ },
599
+ "required": [
600
+ "messageType"
601
+ ]
602
+ },
603
+ "then": {
604
+ "properties": {
605
+ "runtimeKind": {
606
+ "const": "endpoint"
607
+ },
608
+ "payload": {
609
+ "$ref": "#/$defs/EAPCertificateActivateRequest"
610
+ }
611
+ }
612
+ }
613
+ },
614
+ {
615
+ "if": {
616
+ "properties": {
617
+ "messageType": {
618
+ "const": "eap.certificate.activate.result"
619
+ }
620
+ },
621
+ "required": [
622
+ "messageType"
623
+ ]
624
+ },
625
+ "then": {
626
+ "properties": {
627
+ "runtimeKind": {
628
+ "const": "endpoint"
629
+ },
630
+ "payload": {
631
+ "$ref": "#/$defs/EAPCertificateActivateResult"
632
+ }
633
+ }
634
+ }
635
+ },
636
+ {
637
+ "if": {
638
+ "properties": {
639
+ "messageType": {
640
+ "const": "dns.observations"
641
+ }
642
+ },
643
+ "required": [
644
+ "messageType"
645
+ ]
646
+ },
647
+ "then": {
648
+ "properties": {
649
+ "payload": {
650
+ "$ref": "#/$defs/DNSObservationBatch"
651
+ },
652
+ "runtimeKind": {
653
+ "const": "gateway"
654
+ }
655
+ }
656
+ }
657
+ }
658
+ ],
659
+ "$defs": {
660
+ "EndpointPresenceRequest": {
661
+ "type": "object",
662
+ "additionalProperties": false,
663
+ "required": [
664
+ "deviceId",
665
+ "bootId",
666
+ "sequence",
667
+ "status",
668
+ "configurationVersion",
669
+ "policyVersion"
670
+ ],
671
+ "properties": {
672
+ "deviceId": {
673
+ "$ref": "#/$defs/Identifier"
674
+ },
675
+ "bootId": {
676
+ "$ref": "#/$defs/Identifier"
677
+ },
678
+ "sequence": {
679
+ "type": "integer",
680
+ "minimum": 1
681
+ },
682
+ "status": {
683
+ "enum": [
684
+ "healthy",
685
+ "unhealthy"
686
+ ]
687
+ },
688
+ "configurationVersion": {
689
+ "type": "integer",
690
+ "minimum": 0
691
+ },
692
+ "policyVersion": {
693
+ "type": "integer",
694
+ "minimum": 0
695
+ },
696
+ "uiState": {
697
+ "enum": [
698
+ "online",
699
+ "offline",
700
+ "unknown"
701
+ ]
702
+ },
703
+ "uiObservedAt": {
704
+ "type": "string",
705
+ "format": "date-time"
706
+ },
707
+ "capabilities": {
708
+ "type": "array",
709
+ "maxItems": 16,
710
+ "uniqueItems": true,
711
+ "items": {
712
+ "type": "string",
713
+ "minLength": 1,
714
+ "maxLength": 64
715
+ }
716
+ },
717
+ "admissionPolicyVersion": {
718
+ "type": "integer",
719
+ "minimum": 0,
720
+ "description": "Admission policy version last read from Core, independent of applied VPN configuration."
721
+ }
722
+ }
723
+ },
724
+ "EndpointPresenceResult": {
725
+ "type": "object",
726
+ "additionalProperties": false,
727
+ "required": [
728
+ "accepted",
729
+ "presenceEpoch",
730
+ "receivedAt",
731
+ "nextHeartbeatSeconds"
732
+ ],
733
+ "properties": {
734
+ "accepted": {
735
+ "const": true
736
+ },
737
+ "presenceEpoch": {
738
+ "type": "integer",
739
+ "minimum": 1
740
+ },
741
+ "receivedAt": {
742
+ "type": "string",
743
+ "format": "date-time"
744
+ },
745
+ "nextHeartbeatSeconds": {
746
+ "type": "integer",
747
+ "minimum": 30,
748
+ "maximum": 300
749
+ },
750
+ "admissionPolicyVersion": {
751
+ "type": "integer",
752
+ "minimum": 0,
753
+ "description": "Admission policy version last read from Core, independent of applied VPN configuration."
754
+ }
755
+ }
756
+ },
757
+ "AdmissionConfiguration": {
758
+ "type": "object",
759
+ "additionalProperties": false,
760
+ "required": [
761
+ "profiles",
762
+ "restrictionEpoch"
763
+ ],
764
+ "properties": {
765
+ "profiles": {
766
+ "type": "array",
767
+ "maxItems": 64,
768
+ "items": {
769
+ "$ref": "#/$defs/AdmissionProfile"
770
+ }
771
+ },
772
+ "restrictionEpoch": {
773
+ "type": "integer",
774
+ "minimum": 0
775
+ }
776
+ }
777
+ },
778
+ "AdmissionProfile": {
779
+ "type": "object",
780
+ "additionalProperties": false,
781
+ "required": [
782
+ "id",
783
+ "siteId",
784
+ "accessMedium",
785
+ "identity",
786
+ "serverNames",
787
+ "caCertificates",
788
+ "wifiSecurity"
789
+ ],
790
+ "properties": {
791
+ "id": {
792
+ "$ref": "#/$defs/Identifier"
793
+ },
794
+ "siteId": {
795
+ "$ref": "#/$defs/Identifier"
796
+ },
797
+ "accessMedium": {
798
+ "enum": [
799
+ "wifi",
800
+ "wired"
801
+ ]
802
+ },
803
+ "ssid": {
804
+ "type": "string",
805
+ "minLength": 1,
806
+ "maxLength": 32
807
+ },
808
+ "identity": {
809
+ "$ref": "#/$defs/Identifier"
810
+ },
811
+ "serverNames": {
812
+ "type": "array",
813
+ "minItems": 1,
814
+ "maxItems": 16,
815
+ "uniqueItems": true,
816
+ "items": {
817
+ "type": "string",
818
+ "minLength": 1,
819
+ "maxLength": 253,
820
+ "pattern": "^[A-Za-z0-9](?:[A-Za-z0-9.-]*[A-Za-z0-9])?$"
821
+ }
822
+ },
823
+ "caCertificates": {
824
+ "type": "array",
825
+ "minItems": 1,
826
+ "maxItems": 8,
827
+ "uniqueItems": true,
828
+ "items": {
829
+ "type": "string",
830
+ "minLength": 64,
831
+ "maxLength": 16384,
832
+ "pattern": "^-----BEGIN CERTIFICATE-----"
833
+ }
834
+ },
835
+ "wifiSecurity": {
836
+ "enum": [
837
+ "wpa2-enterprise",
838
+ "wpa3-enterprise"
839
+ ]
840
+ },
841
+ "clientCertificateFingerprint": {
842
+ "type": "string",
843
+ "pattern": "^sha256:[a-f0-9]{64}$"
844
+ }
845
+ }
846
+ },
847
+ "VPNManagedPrepareRequest": {
243
848
  "type": "object",
244
849
  "additionalProperties": false,
245
850
  "required": [
@@ -598,7 +1203,13 @@
598
1203
  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
599
1204
  },
600
1205
  "AccessProfile": {
601
- "enum": ["onboarding", "full", "restricted", "quarantine", "deny"]
1206
+ "enum": [
1207
+ "onboarding",
1208
+ "full",
1209
+ "restricted",
1210
+ "quarantine",
1211
+ "deny"
1212
+ ]
602
1213
  },
603
1214
  "IPv4Address": {
604
1215
  "type": "string",
@@ -609,13 +1220,22 @@
609
1220
  "type": "string",
610
1221
  "maxLength": 18,
611
1222
  "pattern": "^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])/(?:[0-9]|[12][0-9]|3[0-2])$",
612
- "description": "Canonical IPv4 CIDR. IPv6 is intentionally deferred beyond network-runtime/v1alpha1."
1223
+ "description": "Canonical IPv4 CIDR; use IPCIDR for either supported address family."
613
1224
  },
614
1225
  "SplitRoute": {
615
1226
  "allOf": [
616
- { "$ref": "#/$defs/IPv4CIDR" },
617
- { "not": { "const": "0.0.0.0/0" } }
618
- ]
1227
+ {
1228
+ "$ref": "#/$defs/IPCIDR"
1229
+ },
1230
+ {
1231
+ "not": {
1232
+ "enum": [
1233
+ "0.0.0.0/0",
1234
+ "::/0"
1235
+ ]
1236
+ }
1237
+ }
1238
+ ]
619
1239
  },
620
1240
  "WireGuardPublicKey": {
621
1241
  "type": "string",
@@ -626,11 +1246,25 @@
626
1246
  "RadiusAttributes": {
627
1247
  "type": "object",
628
1248
  "additionalProperties": false,
629
- "required": ["sessionTimeoutSeconds"],
1249
+ "required": [
1250
+ "sessionTimeoutSeconds"
1251
+ ],
630
1252
  "properties": {
631
- "vlanId": { "type": "integer", "minimum": 1, "maximum": 4094 },
632
- "filterId": { "type": "string", "minLength": 1, "maxLength": 128 },
633
- "sessionTimeoutSeconds": { "type": "integer", "minimum": 1, "maximum": 86400 }
1253
+ "vlanId": {
1254
+ "type": "integer",
1255
+ "minimum": 1,
1256
+ "maximum": 4094
1257
+ },
1258
+ "filterId": {
1259
+ "type": "string",
1260
+ "minLength": 1,
1261
+ "maxLength": 128
1262
+ },
1263
+ "sessionTimeoutSeconds": {
1264
+ "type": "integer",
1265
+ "minimum": 1,
1266
+ "maximum": 86400
1267
+ }
634
1268
  }
635
1269
  },
636
1270
  "NetworkLease": {
@@ -648,21 +1282,42 @@
648
1282
  "expiresAt"
649
1283
  ],
650
1284
  "properties": {
651
- "id": { "$ref": "#/$defs/Identifier" },
652
- "sessionId": { "$ref": "#/$defs/Identifier" },
653
- "subjectId": { "$ref": "#/$defs/Identifier" },
654
- "deviceId": { "$ref": "#/$defs/Identifier" },
655
- "networkSpaceId": { "$ref": "#/$defs/Identifier" },
1285
+ "id": {
1286
+ "$ref": "#/$defs/Identifier"
1287
+ },
1288
+ "sessionId": {
1289
+ "$ref": "#/$defs/Identifier"
1290
+ },
1291
+ "subjectId": {
1292
+ "$ref": "#/$defs/Identifier"
1293
+ },
1294
+ "deviceId": {
1295
+ "$ref": "#/$defs/Identifier"
1296
+ },
1297
+ "networkSpaceId": {
1298
+ "$ref": "#/$defs/Identifier"
1299
+ },
656
1300
  "cidrs": {
657
1301
  "type": "array",
658
1302
  "minItems": 1,
659
1303
  "maxItems": 128,
660
1304
  "uniqueItems": true,
661
- "items": { "$ref": "#/$defs/IPv4CIDR" }
1305
+ "items": {
1306
+ "$ref": "#/$defs/IPCIDR"
1307
+ }
1308
+ },
1309
+ "policyVersion": {
1310
+ "type": "integer",
1311
+ "minimum": 1
1312
+ },
1313
+ "issuedAt": {
1314
+ "type": "string",
1315
+ "format": "date-time"
662
1316
  },
663
- "policyVersion": { "type": "integer", "minimum": 1 },
664
- "issuedAt": { "type": "string", "format": "date-time" },
665
- "expiresAt": { "type": "string", "format": "date-time" }
1317
+ "expiresAt": {
1318
+ "type": "string",
1319
+ "format": "date-time"
1320
+ }
666
1321
  }
667
1322
  },
668
1323
  "ResourceLease": {
@@ -679,75 +1334,202 @@
679
1334
  "expiresAt"
680
1335
  ],
681
1336
  "properties": {
682
- "id": { "$ref": "#/$defs/Identifier" },
683
- "sessionId": { "$ref": "#/$defs/Identifier" },
684
- "subjectId": { "$ref": "#/$defs/Identifier" },
685
- "deviceId": { "$ref": "#/$defs/Identifier" },
1337
+ "id": {
1338
+ "$ref": "#/$defs/Identifier"
1339
+ },
1340
+ "sessionId": {
1341
+ "$ref": "#/$defs/Identifier"
1342
+ },
1343
+ "subjectId": {
1344
+ "$ref": "#/$defs/Identifier"
1345
+ },
1346
+ "deviceId": {
1347
+ "$ref": "#/$defs/Identifier"
1348
+ },
686
1349
  "resourceIds": {
687
1350
  "type": "array",
688
1351
  "minItems": 1,
689
1352
  "maxItems": 256,
690
1353
  "uniqueItems": true,
691
- "items": { "$ref": "#/$defs/Identifier" }
1354
+ "items": {
1355
+ "$ref": "#/$defs/Identifier"
1356
+ }
1357
+ },
1358
+ "policyVersion": {
1359
+ "type": "integer",
1360
+ "minimum": 1
1361
+ },
1362
+ "issuedAt": {
1363
+ "type": "string",
1364
+ "format": "date-time"
692
1365
  },
693
- "policyVersion": { "type": "integer", "minimum": 1 },
694
- "issuedAt": { "type": "string", "format": "date-time" },
695
- "expiresAt": { "type": "string", "format": "date-time" }
1366
+ "expiresAt": {
1367
+ "type": "string",
1368
+ "format": "date-time"
1369
+ }
696
1370
  }
697
1371
  },
698
1372
  "EnrollmentRequest": {
699
1373
  "type": "object",
700
1374
  "additionalProperties": false,
701
- "required": ["enrollmentId", "challengeId", "deviceId", "devicePublicKey", "platform", "clientVersion", "capabilities"],
1375
+ "required": [
1376
+ "enrollmentId",
1377
+ "challengeId",
1378
+ "deviceId",
1379
+ "devicePublicKey",
1380
+ "platform",
1381
+ "clientVersion",
1382
+ "capabilities"
1383
+ ],
702
1384
  "properties": {
703
- "enrollmentId": { "$ref": "#/$defs/Identifier" },
704
- "challengeId": { "$ref": "#/$defs/Identifier" },
705
- "deviceId": { "$ref": "#/$defs/Identifier" },
706
- "devicePublicKey": { "type": "string", "minLength": 32, "maxLength": 4096 },
707
- "wireguardPublicKey": { "$ref": "#/$defs/WireGuardPublicKey" },
708
- "platform": { "enum": ["windows", "linux", "macos"] },
709
- "clientVersion": { "type": "string", "minLength": 1, "maxLength": 64 },
1385
+ "enrollmentId": {
1386
+ "$ref": "#/$defs/Identifier"
1387
+ },
1388
+ "challengeId": {
1389
+ "$ref": "#/$defs/Identifier"
1390
+ },
1391
+ "deviceId": {
1392
+ "$ref": "#/$defs/Identifier"
1393
+ },
1394
+ "devicePublicKey": {
1395
+ "type": "string",
1396
+ "minLength": 32,
1397
+ "maxLength": 4096
1398
+ },
1399
+ "wireguardPublicKey": {
1400
+ "$ref": "#/$defs/WireGuardPublicKey"
1401
+ },
1402
+ "platform": {
1403
+ "enum": [
1404
+ "windows",
1405
+ "linux",
1406
+ "macos"
1407
+ ]
1408
+ },
1409
+ "clientVersion": {
1410
+ "type": "string",
1411
+ "minLength": 1,
1412
+ "maxLength": 64
1413
+ },
710
1414
  "capabilities": {
711
1415
  "type": "array",
712
1416
  "minItems": 1,
713
1417
  "maxItems": 32,
714
1418
  "uniqueItems": true,
715
- "items": { "enum": ["wireguard", "mihomo", "route-coordinator", "dns-coordinator", "managed-vpn-v1", "vpn-probe-v1", "vpn-metrics-v1", "proxy-runtime-v1"] }
1419
+ "items": {
1420
+ "enum": [
1421
+ "wireguard",
1422
+ "mihomo",
1423
+ "mihomo-policy-v1",
1424
+ "route-coordinator",
1425
+ "dns-coordinator",
1426
+ "managed-vpn-v1",
1427
+ "vpn-probe-v1",
1428
+ "vpn-metrics-v1",
1429
+ "proxy-runtime-v1",
1430
+ "proxy-policy-v1",
1431
+ "radius-eap-tls-v1",
1432
+ "eap-profile-v1",
1433
+ "radius-aaa-v1",
1434
+ "endpoint-presence-v1",
1435
+ "nas-session-accounting-v1",
1436
+ "endpoint-ui-presence-v1",
1437
+ "windows-channel-controls-v1"
1438
+ ]
1439
+ }
716
1440
  }
717
1441
  },
718
- "allOf": [{
719
- "if": {
720
- "properties": {
721
- "capabilities": { "contains": { "const": "wireguard" } }
1442
+ "allOf": [
1443
+ {
1444
+ "if": {
1445
+ "properties": {
1446
+ "capabilities": {
1447
+ "contains": {
1448
+ "const": "wireguard"
1449
+ }
1450
+ }
1451
+ },
1452
+ "required": [
1453
+ "capabilities"
1454
+ ]
722
1455
  },
723
- "required": ["capabilities"]
1456
+ "then": {
1457
+ "required": [
1458
+ "wireguardPublicKey"
1459
+ ]
1460
+ }
724
1461
  },
725
- "then": { "required": ["wireguardPublicKey"] }
726
- }]
1462
+ {
1463
+ "if": {
1464
+ "properties": {
1465
+ "capabilities": {
1466
+ "contains": {
1467
+ "const": "eap-profile-v1"
1468
+ }
1469
+ }
1470
+ },
1471
+ "required": [
1472
+ "capabilities"
1473
+ ]
1474
+ },
1475
+ "then": {
1476
+ "properties": {
1477
+ "capabilities": {
1478
+ "contains": {
1479
+ "const": "radius-eap-tls-v1"
1480
+ }
1481
+ }
1482
+ }
1483
+ }
1484
+ }
1485
+ ]
727
1486
  },
728
1487
  "EnrollmentResult": {
729
1488
  "type": "object",
730
1489
  "additionalProperties": false,
731
- "required": ["accepted", "reasonCode"],
1490
+ "required": [
1491
+ "accepted",
1492
+ "reasonCode"
1493
+ ],
732
1494
  "properties": {
733
- "accepted": { "type": "boolean" },
734
- "reasonCode": { "type": "string", "minLength": 1, "maxLength": 128 },
1495
+ "accepted": {
1496
+ "type": "boolean"
1497
+ },
1498
+ "reasonCode": {
1499
+ "type": "string",
1500
+ "minLength": 1,
1501
+ "maxLength": 128
1502
+ },
735
1503
  "credentialReference": {
736
1504
  "type": "string",
737
1505
  "maxLength": 266,
738
1506
  "pattern": "^secretref:[A-Za-z0-9][A-Za-z0-9._:/-]{0,255}$",
739
1507
  "description": "Opaque reference to runtime-local protected storage, never raw credential material."
740
1508
  },
741
- "credentialExpiresAt": { "type": "string", "format": "date-time" }
1509
+ "credentialExpiresAt": {
1510
+ "type": "string",
1511
+ "format": "date-time"
1512
+ }
742
1513
  }
743
1514
  },
744
1515
  "RuntimeIntervals": {
745
1516
  "type": "object",
746
1517
  "additionalProperties": false,
747
- "required": ["heartbeatIntervalSeconds", "configurationPollIntervalSeconds"],
1518
+ "required": [
1519
+ "heartbeatIntervalSeconds",
1520
+ "configurationPollIntervalSeconds"
1521
+ ],
748
1522
  "properties": {
749
- "heartbeatIntervalSeconds": { "type": "integer", "minimum": 30, "maximum": 300 },
750
- "configurationPollIntervalSeconds": { "type": "integer", "minimum": 30, "maximum": 300 }
1523
+ "heartbeatIntervalSeconds": {
1524
+ "type": "integer",
1525
+ "minimum": 30,
1526
+ "maximum": 300
1527
+ },
1528
+ "configurationPollIntervalSeconds": {
1529
+ "type": "integer",
1530
+ "minimum": 30,
1531
+ "maximum": 300
1532
+ }
751
1533
  }
752
1534
  },
753
1535
  "ConfigurationDesired": {
@@ -766,29 +1548,62 @@
766
1548
  "vpnProbe": {
767
1549
  "$ref": "#/$defs/VPNProbeConfiguration"
768
1550
  },
769
- "configurationVersion": { "type": "integer", "minimum": 1 },
770
- "policyVersion": { "type": "integer", "minimum": 1 },
771
- "validUntil": { "type": "string", "format": "date-time" },
772
- "accessProfile": { "$ref": "#/$defs/AccessProfile" },
1551
+ "configurationVersion": {
1552
+ "type": "integer",
1553
+ "minimum": 1
1554
+ },
1555
+ "policyVersion": {
1556
+ "type": "integer",
1557
+ "minimum": 1
1558
+ },
1559
+ "validUntil": {
1560
+ "type": "string",
1561
+ "format": "date-time"
1562
+ },
1563
+ "accessProfile": {
1564
+ "$ref": "#/$defs/AccessProfile"
1565
+ },
773
1566
  "protectedResourceIds": {
774
1567
  "type": "array",
775
1568
  "maxItems": 2048,
776
1569
  "uniqueItems": true,
777
- "items": { "$ref": "#/$defs/Identifier" }
1570
+ "items": {
1571
+ "$ref": "#/$defs/Identifier"
1572
+ }
778
1573
  },
779
1574
  "networkLeases": {
780
1575
  "type": "array",
781
1576
  "maxItems": 256,
782
- "items": { "$ref": "#/$defs/NetworkLease" }
1577
+ "items": {
1578
+ "$ref": "#/$defs/NetworkLease"
1579
+ }
783
1580
  },
784
1581
  "resourceLeases": {
785
1582
  "type": "array",
786
1583
  "maxItems": 512,
787
- "items": { "$ref": "#/$defs/ResourceLease" }
1584
+ "items": {
1585
+ "$ref": "#/$defs/ResourceLease"
1586
+ }
1587
+ },
1588
+ "admission": {
1589
+ "$ref": "#/$defs/AdmissionConfiguration"
1590
+ },
1591
+ "runtimeIntervals": {
1592
+ "$ref": "#/$defs/RuntimeIntervals"
1593
+ },
1594
+ "wireguard": {
1595
+ "$ref": "#/$defs/WireGuardConfiguration"
1596
+ },
1597
+ "mihomo": {
1598
+ "$ref": "#/$defs/MihomoConfiguration"
788
1599
  },
789
- "runtimeIntervals": { "$ref": "#/$defs/RuntimeIntervals" },
790
- "wireguard": { "$ref": "#/$defs/WireGuardConfiguration" },
791
- "mihomo": { "$ref": "#/$defs/MihomoConfiguration" }
1600
+ "dnsRequests": {
1601
+ "type": "array",
1602
+ "maxItems": 128,
1603
+ "items": {
1604
+ "$ref": "#/$defs/DNSResolutionRequest"
1605
+ }
1606
+ }
792
1607
  }
793
1608
  },
794
1609
  "MihomoBypassHost": {
@@ -797,6 +1612,37 @@
797
1612
  "maxLength": 253,
798
1613
  "pattern": "^(?:[A-Za-z0-9](?:[A-Za-z0-9.-]{0,251}[A-Za-z0-9])?|[A-Za-z0-9])$"
799
1614
  },
1615
+ "MihomoProtection": {
1616
+ "type": "object",
1617
+ "additionalProperties": false,
1618
+ "required": [
1619
+ "policyVersion",
1620
+ "cidrs",
1621
+ "hosts"
1622
+ ],
1623
+ "properties": {
1624
+ "policyVersion": {
1625
+ "type": "integer",
1626
+ "minimum": 1
1627
+ },
1628
+ "cidrs": {
1629
+ "type": "array",
1630
+ "maxItems": 4096,
1631
+ "uniqueItems": true,
1632
+ "items": {
1633
+ "$ref": "#/$defs/SplitRoute"
1634
+ }
1635
+ },
1636
+ "hosts": {
1637
+ "type": "array",
1638
+ "maxItems": 2048,
1639
+ "uniqueItems": true,
1640
+ "items": {
1641
+ "$ref": "#/$defs/MihomoBypassHost"
1642
+ }
1643
+ }
1644
+ }
1645
+ },
800
1646
  "MihomoConfiguration": {
801
1647
  "type": "object",
802
1648
  "additionalProperties": false,
@@ -813,60 +1659,200 @@
813
1659
  "failClosed"
814
1660
  ],
815
1661
  "properties": {
816
- "mode": { "enum": ["managed_follow", "app_subscription"] },
817
- "sourceType": { "enum": ["managed_subscription", "manual_node"] },
818
- "profileId": { "$ref": "#/$defs/Identifier" },
819
- "profileRevision": { "type": "integer", "minimum": 1 },
820
- "mixedPort": { "type": "integer", "minimum": 1, "maximum": 65535 },
821
- "controllerPort": { "type": "integer", "minimum": 1, "maximum": 65535 },
822
- "dnsMode": { "enum": ["disabled", "fake_ip"] },
823
- "fakeIpRange": { "$ref": "#/$defs/SplitRoute" },
824
- "selectorGroup": { "type": "string", "minLength": 1, "maxLength": 128 },
825
- "selectedProxy": { "type": "string", "minLength": 1, "maxLength": 128 },
1662
+ "protection": {
1663
+ "$ref": "#/$defs/MihomoProtection"
1664
+ },
1665
+ "mode": {
1666
+ "enum": [
1667
+ "managed_follow",
1668
+ "app_subscription"
1669
+ ]
1670
+ },
1671
+ "sourceType": {
1672
+ "enum": [
1673
+ "managed_subscription",
1674
+ "manual_node"
1675
+ ]
1676
+ },
1677
+ "profileId": {
1678
+ "$ref": "#/$defs/Identifier"
1679
+ },
1680
+ "profileRevision": {
1681
+ "type": "integer",
1682
+ "minimum": 1
1683
+ },
1684
+ "mixedPort": {
1685
+ "type": "integer",
1686
+ "minimum": 1,
1687
+ "maximum": 65535
1688
+ },
1689
+ "controllerPort": {
1690
+ "type": "integer",
1691
+ "minimum": 1,
1692
+ "maximum": 65535
1693
+ },
1694
+ "dnsMode": {
1695
+ "enum": [
1696
+ "disabled",
1697
+ "fake_ip"
1698
+ ]
1699
+ },
1700
+ "fakeIpRange": {
1701
+ "$ref": "#/$defs/SplitRoute"
1702
+ },
1703
+ "selectorGroup": {
1704
+ "type": "string",
1705
+ "minLength": 1,
1706
+ "maxLength": 128
1707
+ },
1708
+ "selectedProxy": {
1709
+ "type": "string",
1710
+ "minLength": 1,
1711
+ "maxLength": 128
1712
+ },
826
1713
  "bypassCidrs": {
827
1714
  "type": "array",
828
1715
  "maxItems": 256,
829
1716
  "uniqueItems": true,
830
- "items": { "$ref": "#/$defs/SplitRoute" }
1717
+ "items": {
1718
+ "$ref": "#/$defs/SplitRoute"
1719
+ }
831
1720
  },
832
1721
  "bypassHosts": {
833
1722
  "type": "array",
834
1723
  "maxItems": 128,
835
1724
  "uniqueItems": true,
836
- "items": { "$ref": "#/$defs/MihomoBypassHost" }
1725
+ "items": {
1726
+ "$ref": "#/$defs/MihomoBypassHost"
1727
+ }
837
1728
  },
838
- "failClosed": { "type": "boolean" }
1729
+ "failClosed": {
1730
+ "type": "boolean"
1731
+ }
839
1732
  },
840
1733
  "allOf": [
841
- {
842
- "if": { "properties": { "mode": { "const": "managed_follow" } }, "required": ["mode"] },
843
- "then": { "properties": { "failClosed": { "const": true } } },
844
- "else": { "not": { "anyOf": [{ "required": ["sourceType"] }, { "required": ["selectedProxy"] }] } }
845
- },
846
1734
  {
847
1735
  "if": {
848
- "allOf": [
849
- { "properties": { "mode": { "const": "managed_follow" } }, "required": ["mode"] },
850
- { "not": { "properties": { "sourceType": { "const": "manual_node" } }, "required": ["sourceType"] } }
1736
+ "properties": {
1737
+ "mode": {
1738
+ "const": "managed_follow"
1739
+ }
1740
+ },
1741
+ "required": [
1742
+ "mode"
851
1743
  ]
852
1744
  },
853
- "then": { "required": ["selectedProxy"] }
854
- },
855
- {
856
- "if": { "properties": { "sourceType": { "const": "manual_node" } }, "required": ["sourceType"] },
857
- "then": { "not": { "required": ["selectedProxy"] } }
1745
+ "then": {
1746
+ "properties": {
1747
+ "failClosed": {
1748
+ "const": true
1749
+ }
1750
+ }
1751
+ },
1752
+ "else": {
1753
+ "not": {
1754
+ "anyOf": [
1755
+ {
1756
+ "required": [
1757
+ "sourceType"
1758
+ ]
1759
+ },
1760
+ {
1761
+ "required": [
1762
+ "selectedProxy"
1763
+ ]
1764
+ }
1765
+ ]
1766
+ }
1767
+ }
858
1768
  },
859
1769
  {
860
- "if": { "properties": { "dnsMode": { "const": "fake_ip" } }, "required": ["dnsMode"] },
861
- "then": { "required": ["fakeIpRange"] },
862
- "else": { "not": { "required": ["fakeIpRange"] } }
1770
+ "if": {
1771
+ "allOf": [
1772
+ {
1773
+ "properties": {
1774
+ "mode": {
1775
+ "const": "managed_follow"
1776
+ }
1777
+ },
1778
+ "required": [
1779
+ "mode"
1780
+ ]
1781
+ },
1782
+ {
1783
+ "not": {
1784
+ "properties": {
1785
+ "sourceType": {
1786
+ "const": "manual_node"
1787
+ }
1788
+ },
1789
+ "required": [
1790
+ "sourceType"
1791
+ ]
1792
+ }
1793
+ }
1794
+ ]
1795
+ },
1796
+ "then": {
1797
+ "required": [
1798
+ "selectedProxy"
1799
+ ]
1800
+ }
1801
+ },
1802
+ {
1803
+ "if": {
1804
+ "properties": {
1805
+ "sourceType": {
1806
+ "const": "manual_node"
1807
+ }
1808
+ },
1809
+ "required": [
1810
+ "sourceType"
1811
+ ]
1812
+ },
1813
+ "then": {
1814
+ "not": {
1815
+ "required": [
1816
+ "selectedProxy"
1817
+ ]
1818
+ }
1819
+ }
1820
+ },
1821
+ {
1822
+ "if": {
1823
+ "properties": {
1824
+ "dnsMode": {
1825
+ "const": "fake_ip"
1826
+ }
1827
+ },
1828
+ "required": [
1829
+ "dnsMode"
1830
+ ]
1831
+ },
1832
+ "then": {
1833
+ "required": [
1834
+ "fakeIpRange"
1835
+ ]
1836
+ },
1837
+ "else": {
1838
+ "not": {
1839
+ "required": [
1840
+ "fakeIpRange"
1841
+ ]
1842
+ }
1843
+ }
863
1844
  }
864
1845
  ]
865
1846
  },
866
1847
  "WireGuardPeer": {
867
1848
  "type": "object",
868
1849
  "additionalProperties": false,
869
- "required": ["runtimeId", "publicKey", "allowedIPs", "persistentKeepaliveSeconds"],
1850
+ "required": [
1851
+ "runtimeId",
1852
+ "publicKey",
1853
+ "allowedIPs",
1854
+ "persistentKeepaliveSeconds"
1855
+ ],
870
1856
  "properties": {
871
1857
  "sessionId": {
872
1858
  "$ref": "#/$defs/Identifier"
@@ -874,334 +1860,1197 @@
874
1860
  "vpnProfileId": {
875
1861
  "$ref": "#/$defs/Identifier"
876
1862
  },
877
- "runtimeId": { "$ref": "#/$defs/Identifier" },
878
- "deviceId": { "$ref": "#/$defs/Identifier" },
879
- "publicKey": { "$ref": "#/$defs/WireGuardPublicKey" },
1863
+ "runtimeId": {
1864
+ "$ref": "#/$defs/Identifier"
1865
+ },
1866
+ "deviceId": {
1867
+ "$ref": "#/$defs/Identifier"
1868
+ },
1869
+ "publicKey": {
1870
+ "$ref": "#/$defs/WireGuardPublicKey"
1871
+ },
880
1872
  "endpointHost": {
881
1873
  "type": "string",
882
- "minLength": 1,
883
1874
  "maxLength": 253,
884
- "pattern": "^[A-Za-z0-9](?:[A-Za-z0-9.-]{0,251}[A-Za-z0-9])?$"
1875
+ "anyOf": [
1876
+ {
1877
+ "format": "hostname"
1878
+ },
1879
+ {
1880
+ "format": "ipv4"
1881
+ },
1882
+ {
1883
+ "format": "ipv6"
1884
+ }
1885
+ ]
1886
+ },
1887
+ "endpointPort": {
1888
+ "type": "integer",
1889
+ "minimum": 1,
1890
+ "maximum": 65535
885
1891
  },
886
- "endpointPort": { "type": "integer", "minimum": 1, "maximum": 65535 },
887
1892
  "allowedIPs": {
888
1893
  "type": "array",
889
1894
  "minItems": 1,
890
1895
  "maxItems": 128,
891
1896
  "uniqueItems": true,
892
- "items": { "$ref": "#/$defs/SplitRoute" }
1897
+ "items": {
1898
+ "$ref": "#/$defs/SplitRoute"
1899
+ }
893
1900
  },
894
- "persistentKeepaliveSeconds": { "type": "integer", "minimum": 0, "maximum": 300 }
1901
+ "persistentKeepaliveSeconds": {
1902
+ "type": "integer",
1903
+ "minimum": 0,
1904
+ "maximum": 300
1905
+ }
895
1906
  },
896
1907
  "dependentRequired": {
897
- "endpointHost": ["endpointPort"],
898
- "endpointPort": ["endpointHost"]
1908
+ "endpointHost": [
1909
+ "endpointPort"
1910
+ ],
1911
+ "endpointPort": [
1912
+ "endpointHost"
1913
+ ]
899
1914
  }
900
1915
  },
901
1916
  "WireGuardFirewallRule": {
902
1917
  "type": "object",
903
1918
  "additionalProperties": false,
904
- "required": ["id", "effect", "sourceCidr", "destinationCidr", "protocol"],
1919
+ "required": [
1920
+ "id",
1921
+ "effect",
1922
+ "sourceCidr",
1923
+ "destinationCidr",
1924
+ "protocol"
1925
+ ],
905
1926
  "properties": {
906
- "id": { "$ref": "#/$defs/Identifier" },
907
- "effect": { "enum": ["allow", "deny"] },
908
- "leaseId": { "$ref": "#/$defs/Identifier" },
909
- "siteLinkRuntimeId": { "$ref": "#/$defs/Identifier" },
910
- "direction": { "enum": ["from_wireguard", "to_wireguard"] },
911
- "sourceCidr": { "$ref": "#/$defs/SplitRoute" },
912
- "destinationCidr": { "$ref": "#/$defs/SplitRoute" },
913
- "protocol": { "enum": ["any", "tcp", "udp", "icmp"] },
1927
+ "id": {
1928
+ "$ref": "#/$defs/Identifier"
1929
+ },
1930
+ "effect": {
1931
+ "enum": [
1932
+ "allow",
1933
+ "deny"
1934
+ ]
1935
+ },
1936
+ "leaseId": {
1937
+ "$ref": "#/$defs/Identifier"
1938
+ },
1939
+ "siteLinkRuntimeId": {
1940
+ "$ref": "#/$defs/Identifier"
1941
+ },
1942
+ "direction": {
1943
+ "enum": [
1944
+ "from_wireguard",
1945
+ "to_wireguard"
1946
+ ]
1947
+ },
1948
+ "sourceCidr": {
1949
+ "$ref": "#/$defs/SplitRoute"
1950
+ },
1951
+ "destinationCidr": {
1952
+ "$ref": "#/$defs/SplitRoute"
1953
+ },
1954
+ "protocol": {
1955
+ "enum": [
1956
+ "any",
1957
+ "tcp",
1958
+ "udp",
1959
+ "icmp"
1960
+ ]
1961
+ },
914
1962
  "ports": {
915
1963
  "type": "array",
916
1964
  "minItems": 1,
917
1965
  "maxItems": 64,
918
1966
  "uniqueItems": true,
919
- "items": { "type": "integer", "minimum": 1, "maximum": 65535 }
1967
+ "items": {
1968
+ "type": "integer",
1969
+ "minimum": 1,
1970
+ "maximum": 65535
1971
+ }
920
1972
  },
921
- "expiresAt": { "type": "string", "format": "date-time" }
1973
+ "expiresAt": {
1974
+ "type": "string",
1975
+ "format": "date-time"
1976
+ }
922
1977
  },
923
1978
  "allOf": [
924
1979
  {
925
- "if": { "properties": { "effect": { "const": "allow" } }, "required": ["effect"] },
1980
+ "if": {
1981
+ "properties": {
1982
+ "effect": {
1983
+ "const": "allow"
1984
+ }
1985
+ },
1986
+ "required": [
1987
+ "effect"
1988
+ ]
1989
+ },
926
1990
  "then": {
927
- "required": ["expiresAt"],
1991
+ "required": [
1992
+ "expiresAt"
1993
+ ],
928
1994
  "oneOf": [
929
- { "required": ["leaseId"], "not": { "required": ["siteLinkRuntimeId"] } },
930
- { "required": ["siteLinkRuntimeId", "direction"], "not": { "required": ["leaseId"] } }
1995
+ {
1996
+ "required": [
1997
+ "leaseId"
1998
+ ],
1999
+ "not": {
2000
+ "required": [
2001
+ "siteLinkRuntimeId"
2002
+ ]
2003
+ }
2004
+ },
2005
+ {
2006
+ "required": [
2007
+ "siteLinkRuntimeId",
2008
+ "direction"
2009
+ ],
2010
+ "not": {
2011
+ "required": [
2012
+ "leaseId"
2013
+ ]
2014
+ }
2015
+ }
931
2016
  ]
932
2017
  }
933
2018
  },
934
2019
  {
935
- "if": { "properties": { "protocol": { "enum": ["any", "icmp"] } }, "required": ["protocol"] },
936
- "then": { "not": { "required": ["ports"] } }
2020
+ "if": {
2021
+ "properties": {
2022
+ "protocol": {
2023
+ "enum": [
2024
+ "any",
2025
+ "icmp"
2026
+ ]
2027
+ }
2028
+ },
2029
+ "required": [
2030
+ "protocol"
2031
+ ]
2032
+ },
2033
+ "then": {
2034
+ "not": {
2035
+ "required": [
2036
+ "ports"
2037
+ ]
2038
+ }
2039
+ }
937
2040
  },
938
- { "not": { "required": ["leaseId", "siteLinkRuntimeId"] } }
2041
+ {
2042
+ "not": {
2043
+ "required": [
2044
+ "leaseId",
2045
+ "siteLinkRuntimeId"
2046
+ ]
2047
+ }
2048
+ }
939
2049
  ],
940
2050
  "dependentRequired": {
941
- "siteLinkRuntimeId": ["direction", "expiresAt"],
942
- "direction": ["siteLinkRuntimeId"]
2051
+ "siteLinkRuntimeId": [
2052
+ "direction",
2053
+ "expiresAt"
2054
+ ],
2055
+ "direction": [
2056
+ "siteLinkRuntimeId"
2057
+ ]
943
2058
  }
944
2059
  },
945
2060
  "WireGuardConfiguration": {
946
2061
  "type": "object",
947
2062
  "additionalProperties": false,
948
- "required": ["role", "interfaceName", "publicKey", "addresses", "mtu", "routingMode", "firewallDefault", "peers", "routes", "firewallRules"],
2063
+ "required": [
2064
+ "role",
2065
+ "interfaceName",
2066
+ "publicKey",
2067
+ "addresses",
2068
+ "mtu",
2069
+ "routingMode",
2070
+ "firewallDefault",
2071
+ "peers",
2072
+ "routes",
2073
+ "firewallRules"
2074
+ ],
949
2075
  "properties": {
950
- "role": { "enum": ["endpoint", "gateway"] },
951
- "interfaceName": { "type": "string", "minLength": 1, "maxLength": 15, "pattern": "^[A-Za-z][A-Za-z0-9_.-]*$" },
952
- "publicKey": { "$ref": "#/$defs/WireGuardPublicKey" },
2076
+ "role": {
2077
+ "enum": [
2078
+ "endpoint",
2079
+ "gateway"
2080
+ ]
2081
+ },
2082
+ "interfaceName": {
2083
+ "type": "string",
2084
+ "minLength": 1,
2085
+ "maxLength": 15,
2086
+ "pattern": "^[A-Za-z][A-Za-z0-9_.-]*$"
2087
+ },
2088
+ "publicKey": {
2089
+ "$ref": "#/$defs/WireGuardPublicKey"
2090
+ },
953
2091
  "addresses": {
954
2092
  "type": "array",
955
2093
  "minItems": 1,
956
2094
  "maxItems": 8,
957
2095
  "uniqueItems": true,
958
- "items": { "$ref": "#/$defs/SplitRoute" }
2096
+ "items": {
2097
+ "$ref": "#/$defs/SplitRoute"
2098
+ }
2099
+ },
2100
+ "listenPort": {
2101
+ "type": "integer",
2102
+ "minimum": 1,
2103
+ "maximum": 65535
2104
+ },
2105
+ "mtu": {
2106
+ "type": "integer",
2107
+ "minimum": 1280,
2108
+ "maximum": 1500
2109
+ },
2110
+ "routingMode": {
2111
+ "enum": [
2112
+ "routed",
2113
+ "snat"
2114
+ ]
2115
+ },
2116
+ "firewallDefault": {
2117
+ "const": "deny"
959
2118
  },
960
- "listenPort": { "type": "integer", "minimum": 1, "maximum": 65535 },
961
- "mtu": { "type": "integer", "minimum": 1280, "maximum": 1500 },
962
- "routingMode": { "enum": ["routed", "snat"] },
963
- "firewallDefault": { "const": "deny" },
964
2119
  "peers": {
965
2120
  "type": "array",
966
2121
  "maxItems": 1024,
967
- "items": { "$ref": "#/$defs/WireGuardPeer" }
2122
+ "items": {
2123
+ "$ref": "#/$defs/WireGuardPeer"
2124
+ }
968
2125
  },
969
2126
  "routes": {
970
2127
  "type": "array",
971
2128
  "maxItems": 256,
972
2129
  "uniqueItems": true,
973
- "items": { "$ref": "#/$defs/SplitRoute" }
2130
+ "items": {
2131
+ "$ref": "#/$defs/SplitRoute"
2132
+ }
974
2133
  },
975
2134
  "dnsServers": {
976
2135
  "type": "array",
977
2136
  "maxItems": 8,
978
2137
  "uniqueItems": true,
979
- "items": { "$ref": "#/$defs/IPv4Address" }
2138
+ "items": {
2139
+ "$ref": "#/$defs/IPAddress"
2140
+ }
980
2141
  },
981
2142
  "firewallRules": {
982
2143
  "type": "array",
983
2144
  "maxItems": 4096,
984
- "items": { "$ref": "#/$defs/WireGuardFirewallRule" }
2145
+ "items": {
2146
+ "$ref": "#/$defs/WireGuardFirewallRule"
2147
+ }
2148
+ },
2149
+ "dnsRecords": {
2150
+ "type": "array",
2151
+ "maxItems": 128,
2152
+ "items": {
2153
+ "$ref": "#/$defs/DNSRecord"
2154
+ }
985
2155
  }
986
2156
  },
987
- "allOf": [{
988
- "if": { "properties": { "role": { "const": "gateway" } }, "required": ["role"] },
989
- "then": { "required": ["listenPort"] }
990
- }]
2157
+ "allOf": [
2158
+ {
2159
+ "if": {
2160
+ "properties": {
2161
+ "role": {
2162
+ "const": "gateway"
2163
+ }
2164
+ },
2165
+ "required": [
2166
+ "role"
2167
+ ]
2168
+ },
2169
+ "then": {
2170
+ "required": [
2171
+ "listenPort"
2172
+ ]
2173
+ }
2174
+ }
2175
+ ]
991
2176
  },
992
2177
  "ConfigurationApplied": {
993
2178
  "type": "object",
994
2179
  "additionalProperties": false,
995
- "required": ["configurationVersion", "policyVersion", "status", "readbackHash"],
2180
+ "required": [
2181
+ "configurationVersion",
2182
+ "policyVersion",
2183
+ "status",
2184
+ "readbackHash"
2185
+ ],
996
2186
  "properties": {
997
- "configurationVersion": { "type": "integer", "minimum": 1 },
998
- "policyVersion": { "type": "integer", "minimum": 1 },
999
- "status": { "enum": ["applied", "rejected", "rolled-back"] },
1000
- "readbackHash": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
1001
- "reasonCode": { "type": "string", "minLength": 1, "maxLength": 128 }
2187
+ "configurationVersion": {
2188
+ "type": "integer",
2189
+ "minimum": 1
2190
+ },
2191
+ "policyVersion": {
2192
+ "type": "integer",
2193
+ "minimum": 1
2194
+ },
2195
+ "status": {
2196
+ "enum": [
2197
+ "applied",
2198
+ "rejected",
2199
+ "rolled-back"
2200
+ ]
2201
+ },
2202
+ "readbackHash": {
2203
+ "type": "string",
2204
+ "pattern": "^sha256:[a-f0-9]{64}$"
2205
+ },
2206
+ "reasonCode": {
2207
+ "type": "string",
2208
+ "minLength": 1,
2209
+ "maxLength": 128
2210
+ }
1002
2211
  }
1003
2212
  },
1004
2213
  "LeaseRenewRequest": {
1005
2214
  "type": "object",
1006
2215
  "additionalProperties": false,
1007
- "required": ["sessionId", "leaseIds", "observedConfigurationVersion"],
2216
+ "required": [
2217
+ "sessionId",
2218
+ "leaseIds",
2219
+ "observedConfigurationVersion"
2220
+ ],
1008
2221
  "properties": {
1009
- "sessionId": { "$ref": "#/$defs/Identifier" },
2222
+ "sessionId": {
2223
+ "$ref": "#/$defs/Identifier"
2224
+ },
1010
2225
  "leaseIds": {
1011
2226
  "type": "array",
1012
2227
  "minItems": 1,
1013
2228
  "maxItems": 512,
1014
2229
  "uniqueItems": true,
1015
- "items": { "$ref": "#/$defs/Identifier" }
2230
+ "items": {
2231
+ "$ref": "#/$defs/Identifier"
2232
+ }
2233
+ },
2234
+ "observedConfigurationVersion": {
2235
+ "type": "integer",
2236
+ "minimum": 1
1016
2237
  },
1017
- "observedConfigurationVersion": { "type": "integer", "minimum": 1 },
1018
- "postureVersion": { "type": "integer", "minimum": 0 }
2238
+ "postureVersion": {
2239
+ "type": "integer",
2240
+ "minimum": 0
2241
+ }
1019
2242
  }
1020
2243
  },
1021
2244
  "LeaseRenewResult": {
1022
2245
  "type": "object",
1023
2246
  "additionalProperties": false,
1024
- "required": ["policyVersion", "validUntil", "networkLeases", "resourceLeases", "revokedLeaseIds"],
2247
+ "required": [
2248
+ "policyVersion",
2249
+ "validUntil",
2250
+ "networkLeases",
2251
+ "resourceLeases",
2252
+ "revokedLeaseIds"
2253
+ ],
1025
2254
  "properties": {
1026
- "policyVersion": { "type": "integer", "minimum": 1 },
1027
- "validUntil": { "type": "string", "format": "date-time" },
1028
- "networkLeases": { "type": "array", "maxItems": 256, "items": { "$ref": "#/$defs/NetworkLease" } },
1029
- "resourceLeases": { "type": "array", "maxItems": 512, "items": { "$ref": "#/$defs/ResourceLease" } },
2255
+ "policyVersion": {
2256
+ "type": "integer",
2257
+ "minimum": 1
2258
+ },
2259
+ "validUntil": {
2260
+ "type": "string",
2261
+ "format": "date-time"
2262
+ },
2263
+ "networkLeases": {
2264
+ "type": "array",
2265
+ "maxItems": 256,
2266
+ "items": {
2267
+ "$ref": "#/$defs/NetworkLease"
2268
+ }
2269
+ },
2270
+ "resourceLeases": {
2271
+ "type": "array",
2272
+ "maxItems": 512,
2273
+ "items": {
2274
+ "$ref": "#/$defs/ResourceLease"
2275
+ }
2276
+ },
1030
2277
  "revokedLeaseIds": {
1031
2278
  "type": "array",
1032
2279
  "maxItems": 512,
1033
2280
  "uniqueItems": true,
1034
- "items": { "$ref": "#/$defs/Identifier" }
2281
+ "items": {
2282
+ "$ref": "#/$defs/Identifier"
2283
+ }
1035
2284
  }
1036
2285
  }
1037
2286
  },
1038
2287
  "LeaseRevoke": {
1039
2288
  "type": "object",
1040
2289
  "additionalProperties": false,
1041
- "required": ["sessionId", "leaseIds", "reasonCode", "effectiveAt"],
2290
+ "required": [
2291
+ "sessionId",
2292
+ "leaseIds",
2293
+ "reasonCode",
2294
+ "effectiveAt"
2295
+ ],
1042
2296
  "properties": {
1043
- "sessionId": { "$ref": "#/$defs/Identifier" },
2297
+ "sessionId": {
2298
+ "$ref": "#/$defs/Identifier"
2299
+ },
1044
2300
  "leaseIds": {
1045
2301
  "type": "array",
1046
2302
  "minItems": 1,
1047
2303
  "maxItems": 512,
1048
2304
  "uniqueItems": true,
1049
- "items": { "$ref": "#/$defs/Identifier" }
2305
+ "items": {
2306
+ "$ref": "#/$defs/Identifier"
2307
+ }
1050
2308
  },
1051
- "reasonCode": { "type": "string", "minLength": 1, "maxLength": 128 },
1052
- "effectiveAt": { "type": "string", "format": "date-time" }
1053
- }
1054
- },
1055
- "VPNConnectRequest": {
2309
+ "reasonCode": {
2310
+ "type": "string",
2311
+ "minLength": 1,
2312
+ "maxLength": 128
2313
+ },
2314
+ "effectiveAt": {
2315
+ "type": "string",
2316
+ "format": "date-time"
2317
+ }
2318
+ }
2319
+ },
2320
+ "VPNConnectRequest": {
1056
2321
  "type": "object",
1057
2322
  "additionalProperties": false,
1058
- "required": ["requestId", "siteId", "networkSpaceId", "mode"],
2323
+ "required": [
2324
+ "requestId",
2325
+ "siteId",
2326
+ "networkSpaceId",
2327
+ "mode"
2328
+ ],
1059
2329
  "properties": {
1060
- "requestId": { "$ref": "#/$defs/Identifier" },
1061
- "siteId": { "$ref": "#/$defs/Identifier" },
1062
- "networkSpaceId": { "$ref": "#/$defs/Identifier" },
1063
- "gatewayId": { "$ref": "#/$defs/Identifier" },
1064
- "mode": { "enum": ["internal_ztna", "external_vpn", "external_vpn_ztna", "external_direct_ztna"] },
2330
+ "requestId": {
2331
+ "$ref": "#/$defs/Identifier"
2332
+ },
2333
+ "siteId": {
2334
+ "$ref": "#/$defs/Identifier"
2335
+ },
2336
+ "networkSpaceId": {
2337
+ "$ref": "#/$defs/Identifier"
2338
+ },
2339
+ "gatewayId": {
2340
+ "$ref": "#/$defs/Identifier"
2341
+ },
2342
+ "mode": {
2343
+ "enum": [
2344
+ "internal_ztna",
2345
+ "external_vpn",
2346
+ "external_vpn_ztna",
2347
+ "external_direct_ztna"
2348
+ ]
2349
+ },
1065
2350
  "resourceIds": {
1066
2351
  "type": "array",
1067
2352
  "maxItems": 256,
1068
2353
  "uniqueItems": true,
1069
- "items": { "$ref": "#/$defs/Identifier" }
2354
+ "items": {
2355
+ "$ref": "#/$defs/Identifier"
2356
+ }
2357
+ },
2358
+ "accessGrantId": {
2359
+ "$ref": "#/$defs/Identifier"
1070
2360
  },
1071
- "accessGrantId": { "$ref": "#/$defs/Identifier" },
1072
2361
  "accessGrantToken": {
1073
2362
  "type": "string",
1074
2363
  "minLength": 32,
1075
2364
  "maxLength": 512
2365
+ },
2366
+ "workloadId": {
2367
+ "$ref": "#/$defs/Identifier"
1076
2368
  }
1077
2369
  },
1078
- "allOf": [{
1079
- "if": { "properties": { "mode": { "const": "external_vpn" } }, "required": ["mode"] },
1080
- "then": {
1081
- "properties": { "resourceIds": { "maxItems": 0 } },
1082
- "not": { "anyOf": [{ "required": ["accessGrantId"] }, { "required": ["accessGrantToken"] }] }
1083
- },
1084
- "else": {
1085
- "required": ["resourceIds", "accessGrantId", "accessGrantToken"],
1086
- "properties": { "resourceIds": { "minItems": 1 } }
2370
+ "allOf": [
2371
+ {
2372
+ "if": {
2373
+ "properties": {
2374
+ "mode": {
2375
+ "const": "external_vpn"
2376
+ }
2377
+ },
2378
+ "required": [
2379
+ "mode"
2380
+ ]
2381
+ },
2382
+ "then": {
2383
+ "properties": {
2384
+ "resourceIds": {
2385
+ "maxItems": 0
2386
+ }
2387
+ },
2388
+ "not": {
2389
+ "anyOf": [
2390
+ {
2391
+ "required": [
2392
+ "accessGrantId"
2393
+ ]
2394
+ },
2395
+ {
2396
+ "required": [
2397
+ "accessGrantToken"
2398
+ ]
2399
+ },
2400
+ {
2401
+ "required": [
2402
+ "workloadId"
2403
+ ]
2404
+ }
2405
+ ]
2406
+ }
2407
+ },
2408
+ "else": {
2409
+ "anyOf": [
2410
+ {
2411
+ "required": [
2412
+ "resourceIds",
2413
+ "accessGrantId",
2414
+ "accessGrantToken"
2415
+ ],
2416
+ "properties": {
2417
+ "resourceIds": {
2418
+ "minItems": 1
2419
+ }
2420
+ },
2421
+ "not": {
2422
+ "required": [
2423
+ "workloadId"
2424
+ ]
2425
+ }
2426
+ },
2427
+ {
2428
+ "required": [
2429
+ "workloadId",
2430
+ "resourceIds"
2431
+ ],
2432
+ "properties": {
2433
+ "mode": {
2434
+ "const": "external_direct_ztna"
2435
+ },
2436
+ "resourceIds": {
2437
+ "minItems": 1
2438
+ }
2439
+ },
2440
+ "not": {
2441
+ "anyOf": [
2442
+ {
2443
+ "required": [
2444
+ "accessGrantId"
2445
+ ]
2446
+ },
2447
+ {
2448
+ "required": [
2449
+ "accessGrantToken"
2450
+ ]
2451
+ }
2452
+ ]
2453
+ }
2454
+ }
2455
+ ]
2456
+ }
1087
2457
  }
1088
- }]
2458
+ ]
1089
2459
  },
1090
2460
  "VPNConnectResult": {
1091
2461
  "type": "object",
1092
2462
  "additionalProperties": false,
1093
- "required": ["requestId", "decision", "reasonCode", "policyVersion", "validUntil", "networkLeases", "resourceLeases"],
2463
+ "required": [
2464
+ "requestId",
2465
+ "decision",
2466
+ "reasonCode",
2467
+ "policyVersion",
2468
+ "validUntil",
2469
+ "networkLeases",
2470
+ "resourceLeases"
2471
+ ],
1094
2472
  "properties": {
1095
- "requestId": { "$ref": "#/$defs/Identifier" },
1096
- "decision": { "enum": ["allow", "deny"] },
1097
- "reasonCode": { "type": "string", "minLength": 1, "maxLength": 128 },
1098
- "sessionId": { "$ref": "#/$defs/Identifier" },
1099
- "gatewayId": { "$ref": "#/$defs/Identifier" },
1100
- "configurationVersion": { "type": "integer", "minimum": 1 },
1101
- "policyVersion": { "type": "integer", "minimum": 1 },
1102
- "validUntil": { "type": "string", "format": "date-time" },
2473
+ "requestId": {
2474
+ "$ref": "#/$defs/Identifier"
2475
+ },
2476
+ "decision": {
2477
+ "enum": [
2478
+ "allow",
2479
+ "deny"
2480
+ ]
2481
+ },
2482
+ "reasonCode": {
2483
+ "type": "string",
2484
+ "minLength": 1,
2485
+ "maxLength": 128
2486
+ },
2487
+ "sessionId": {
2488
+ "$ref": "#/$defs/Identifier"
2489
+ },
2490
+ "gatewayId": {
2491
+ "$ref": "#/$defs/Identifier"
2492
+ },
2493
+ "configurationVersion": {
2494
+ "type": "integer",
2495
+ "minimum": 1
2496
+ },
2497
+ "policyVersion": {
2498
+ "type": "integer",
2499
+ "minimum": 1
2500
+ },
2501
+ "validUntil": {
2502
+ "type": "string",
2503
+ "format": "date-time"
2504
+ },
1103
2505
  "networkLeases": {
1104
2506
  "type": "array",
1105
2507
  "maxItems": 256,
1106
- "items": { "$ref": "#/$defs/NetworkLease" }
2508
+ "items": {
2509
+ "$ref": "#/$defs/NetworkLease"
2510
+ }
1107
2511
  },
1108
2512
  "resourceLeases": {
1109
2513
  "type": "array",
1110
2514
  "maxItems": 512,
1111
- "items": { "$ref": "#/$defs/ResourceLease" }
2515
+ "items": {
2516
+ "$ref": "#/$defs/ResourceLease"
2517
+ }
1112
2518
  }
1113
2519
  },
1114
- "allOf": [{
1115
- "if": { "properties": { "decision": { "const": "allow" } }, "required": ["decision"] },
1116
- "then": {
1117
- "required": ["sessionId", "gatewayId", "configurationVersion"],
1118
- "anyOf": [
1119
- { "properties": { "networkLeases": { "minItems": 1 } } },
1120
- { "properties": { "resourceLeases": { "minItems": 1 } } }
1121
- ]
1122
- },
1123
- "else": {
1124
- "properties": {
1125
- "networkLeases": { "maxItems": 0 },
1126
- "resourceLeases": { "maxItems": 0 }
2520
+ "allOf": [
2521
+ {
2522
+ "if": {
2523
+ "properties": {
2524
+ "decision": {
2525
+ "const": "allow"
2526
+ }
2527
+ },
2528
+ "required": [
2529
+ "decision"
2530
+ ]
2531
+ },
2532
+ "then": {
2533
+ "required": [
2534
+ "sessionId",
2535
+ "gatewayId",
2536
+ "configurationVersion"
2537
+ ],
2538
+ "anyOf": [
2539
+ {
2540
+ "properties": {
2541
+ "networkLeases": {
2542
+ "minItems": 1
2543
+ }
2544
+ }
2545
+ },
2546
+ {
2547
+ "properties": {
2548
+ "resourceLeases": {
2549
+ "minItems": 1
2550
+ }
2551
+ }
2552
+ }
2553
+ ]
2554
+ },
2555
+ "else": {
2556
+ "properties": {
2557
+ "networkLeases": {
2558
+ "maxItems": 0
2559
+ },
2560
+ "resourceLeases": {
2561
+ "maxItems": 0
2562
+ }
2563
+ }
1127
2564
  }
1128
2565
  }
1129
- }]
2566
+ ]
1130
2567
  },
1131
2568
  "NASAuthorizationRequest": {
1132
2569
  "type": "object",
1133
2570
  "additionalProperties": false,
1134
- "required": ["requestId", "nasId", "subjectId", "authenticationMethod"],
2571
+ "required": [
2572
+ "requestId",
2573
+ "nasId",
2574
+ "subjectId",
2575
+ "authenticationMethod"
2576
+ ],
1135
2577
  "properties": {
1136
- "requestId": { "$ref": "#/$defs/Identifier" },
1137
- "nasId": { "$ref": "#/$defs/Identifier" },
1138
- "subjectId": { "$ref": "#/$defs/Identifier" },
1139
- "deviceId": { "$ref": "#/$defs/Identifier" },
1140
- "stationId": { "$ref": "#/$defs/Identifier" },
1141
- "authenticationMethod": { "enum": ["eap-tls", "password-compatible"] },
1142
- "clientCertificateSerial": { "type": "string", "pattern": "^[A-Fa-f0-9]{1,40}$" },
1143
- "clientCertificateAuthorityKeyId": { "type": "string", "minLength": 16, "maxLength": 191, "pattern": "^[A-Fa-f0-9:]+$" }
2578
+ "requestId": {
2579
+ "$ref": "#/$defs/Identifier"
2580
+ },
2581
+ "nasId": {
2582
+ "$ref": "#/$defs/Identifier"
2583
+ },
2584
+ "subjectId": {
2585
+ "$ref": "#/$defs/Identifier"
2586
+ },
2587
+ "deviceId": {
2588
+ "$ref": "#/$defs/Identifier"
2589
+ },
2590
+ "stationId": {
2591
+ "$ref": "#/$defs/Identifier"
2592
+ },
2593
+ "authenticationMethod": {
2594
+ "enum": [
2595
+ "eap-tls",
2596
+ "password-compatible"
2597
+ ]
2598
+ },
2599
+ "clientCertificateSerial": {
2600
+ "type": "string",
2601
+ "pattern": "^[A-Fa-f0-9]{1,40}$"
2602
+ },
2603
+ "clientCertificateAuthorityKeyId": {
2604
+ "type": "string",
2605
+ "minLength": 16,
2606
+ "maxLength": 191,
2607
+ "pattern": "^[A-Fa-f0-9:]+$"
2608
+ }
1144
2609
  },
1145
- "allOf": [{
1146
- "if": { "properties": { "authenticationMethod": { "const": "eap-tls" } }, "required": ["authenticationMethod"] },
1147
- "then": {
1148
- "required": ["stationId", "clientCertificateSerial", "clientCertificateAuthorityKeyId"],
1149
- "not": { "required": ["deviceId"] }
1150
- },
1151
- "else": {
1152
- "required": ["deviceId"],
1153
- "not": {
1154
- "anyOf": [
1155
- { "required": ["clientCertificateSerial"] },
1156
- { "required": ["clientCertificateAuthorityKeyId"] }
2610
+ "allOf": [
2611
+ {
2612
+ "if": {
2613
+ "properties": {
2614
+ "authenticationMethod": {
2615
+ "const": "eap-tls"
2616
+ }
2617
+ },
2618
+ "required": [
2619
+ "authenticationMethod"
1157
2620
  ]
2621
+ },
2622
+ "then": {
2623
+ "required": [
2624
+ "stationId",
2625
+ "clientCertificateSerial",
2626
+ "clientCertificateAuthorityKeyId"
2627
+ ],
2628
+ "not": {
2629
+ "required": [
2630
+ "deviceId"
2631
+ ]
2632
+ }
2633
+ },
2634
+ "else": {
2635
+ "required": [
2636
+ "deviceId"
2637
+ ],
2638
+ "not": {
2639
+ "anyOf": [
2640
+ {
2641
+ "required": [
2642
+ "clientCertificateSerial"
2643
+ ]
2644
+ },
2645
+ {
2646
+ "required": [
2647
+ "clientCertificateAuthorityKeyId"
2648
+ ]
2649
+ }
2650
+ ]
2651
+ }
1158
2652
  }
1159
2653
  }
1160
- }]
2654
+ ]
1161
2655
  },
1162
2656
  "NASAuthorizationResult": {
1163
2657
  "type": "object",
1164
2658
  "additionalProperties": false,
1165
- "required": ["requestId", "sessionId", "decision", "accessProfile", "policyVersion", "validUntil", "reasonCode"],
2659
+ "required": [
2660
+ "requestId",
2661
+ "sessionId",
2662
+ "decision",
2663
+ "accessProfile",
2664
+ "policyVersion",
2665
+ "validUntil",
2666
+ "reasonCode"
2667
+ ],
1166
2668
  "properties": {
1167
- "requestId": { "$ref": "#/$defs/Identifier" },
1168
- "sessionId": { "$ref": "#/$defs/Identifier" },
1169
- "decision": { "enum": ["allow", "deny"] },
1170
- "accessProfile": { "$ref": "#/$defs/AccessProfile" },
1171
- "policyVersion": { "type": "integer", "minimum": 1 },
1172
- "validUntil": { "type": "string", "format": "date-time" },
1173
- "reasonCode": { "type": "string", "minLength": 1, "maxLength": 128 },
1174
- "radiusAttributes": { "$ref": "#/$defs/RadiusAttributes" }
2669
+ "requestId": {
2670
+ "$ref": "#/$defs/Identifier"
2671
+ },
2672
+ "sessionId": {
2673
+ "$ref": "#/$defs/Identifier"
2674
+ },
2675
+ "decision": {
2676
+ "enum": [
2677
+ "allow",
2678
+ "deny"
2679
+ ]
2680
+ },
2681
+ "accessProfile": {
2682
+ "$ref": "#/$defs/AccessProfile"
2683
+ },
2684
+ "policyVersion": {
2685
+ "type": "integer",
2686
+ "minimum": 1
2687
+ },
2688
+ "validUntil": {
2689
+ "type": "string",
2690
+ "format": "date-time"
2691
+ },
2692
+ "reasonCode": {
2693
+ "type": "string",
2694
+ "minLength": 1,
2695
+ "maxLength": 128
2696
+ },
2697
+ "radiusAttributes": {
2698
+ "$ref": "#/$defs/RadiusAttributes"
2699
+ }
1175
2700
  }
1176
2701
  },
1177
2702
  "NASSessionCommand": {
1178
2703
  "type": "object",
1179
2704
  "additionalProperties": false,
1180
- "required": ["commandId", "sessionId", "nasId", "subjectId", "deviceId", "action", "targetAccessProfile", "policyVersion", "effectiveAt", "reasonCode"],
2705
+ "required": [
2706
+ "commandId",
2707
+ "sessionId",
2708
+ "nasId",
2709
+ "subjectId",
2710
+ "deviceId",
2711
+ "action",
2712
+ "targetAccessProfile",
2713
+ "policyVersion",
2714
+ "effectiveAt",
2715
+ "reasonCode"
2716
+ ],
1181
2717
  "properties": {
1182
- "commandId": { "$ref": "#/$defs/Identifier" },
1183
- "sessionId": { "$ref": "#/$defs/Identifier" },
1184
- "nasId": { "$ref": "#/$defs/Identifier" },
1185
- "subjectId": { "$ref": "#/$defs/Identifier" },
1186
- "deviceId": { "$ref": "#/$defs/Identifier" },
1187
- "action": { "enum": ["coa", "disconnect"] },
1188
- "targetAccessProfile": { "$ref": "#/$defs/AccessProfile" },
1189
- "policyVersion": { "type": "integer", "minimum": 1 },
1190
- "effectiveAt": { "type": "string", "format": "date-time" },
1191
- "reasonCode": { "type": "string", "minLength": 1, "maxLength": 128 },
1192
- "radiusAttributes": { "$ref": "#/$defs/RadiusAttributes" }
2718
+ "commandId": {
2719
+ "$ref": "#/$defs/Identifier"
2720
+ },
2721
+ "sessionId": {
2722
+ "$ref": "#/$defs/Identifier"
2723
+ },
2724
+ "nasId": {
2725
+ "$ref": "#/$defs/Identifier"
2726
+ },
2727
+ "subjectId": {
2728
+ "$ref": "#/$defs/Identifier"
2729
+ },
2730
+ "deviceId": {
2731
+ "$ref": "#/$defs/Identifier"
2732
+ },
2733
+ "action": {
2734
+ "enum": [
2735
+ "coa",
2736
+ "disconnect"
2737
+ ]
2738
+ },
2739
+ "targetAccessProfile": {
2740
+ "$ref": "#/$defs/AccessProfile"
2741
+ },
2742
+ "policyVersion": {
2743
+ "type": "integer",
2744
+ "minimum": 1
2745
+ },
2746
+ "effectiveAt": {
2747
+ "type": "string",
2748
+ "format": "date-time"
2749
+ },
2750
+ "reasonCode": {
2751
+ "type": "string",
2752
+ "minLength": 1,
2753
+ "maxLength": 128
2754
+ },
2755
+ "radiusAttributes": {
2756
+ "$ref": "#/$defs/RadiusAttributes"
2757
+ },
2758
+ "stationId": {
2759
+ "$ref": "#/$defs/Identifier"
2760
+ },
2761
+ "accountingSessionId": {
2762
+ "$ref": "#/$defs/Identifier"
2763
+ },
2764
+ "nasPortId": {
2765
+ "type": "string",
2766
+ "minLength": 1,
2767
+ "maxLength": 128,
2768
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
2769
+ }
1193
2770
  }
1194
2771
  },
1195
2772
  "NASSessionCommandResult": {
1196
2773
  "type": "object",
1197
2774
  "additionalProperties": false,
1198
- "required": ["commandId", "sessionId", "status", "reasonCode", "completedAt"],
2775
+ "required": [
2776
+ "commandId",
2777
+ "sessionId",
2778
+ "status",
2779
+ "reasonCode",
2780
+ "completedAt"
2781
+ ],
2782
+ "properties": {
2783
+ "commandId": {
2784
+ "$ref": "#/$defs/Identifier"
2785
+ },
2786
+ "sessionId": {
2787
+ "$ref": "#/$defs/Identifier"
2788
+ },
2789
+ "status": {
2790
+ "enum": [
2791
+ "applied",
2792
+ "rejected",
2793
+ "unsupported",
2794
+ "timed-out"
2795
+ ]
2796
+ },
2797
+ "reasonCode": {
2798
+ "type": "string",
2799
+ "minLength": 1,
2800
+ "maxLength": 128
2801
+ },
2802
+ "completedAt": {
2803
+ "type": "string",
2804
+ "format": "date-time"
2805
+ }
2806
+ }
2807
+ },
2808
+ "EAPCertificateRequest": {
2809
+ "type": "object",
2810
+ "additionalProperties": false,
2811
+ "required": [
2812
+ "requestId",
2813
+ "csrPem"
2814
+ ],
2815
+ "properties": {
2816
+ "requestId": {
2817
+ "$ref": "#/$defs/Identifier"
2818
+ },
2819
+ "csrPem": {
2820
+ "type": "string",
2821
+ "minLength": 64,
2822
+ "maxLength": 4096,
2823
+ "pattern": "^-----BEGIN CERTIFICATE REQUEST-----"
2824
+ }
2825
+ }
2826
+ },
2827
+ "EAPCertificateResult": {
2828
+ "type": "object",
2829
+ "additionalProperties": false,
2830
+ "required": [
2831
+ "credentialId",
2832
+ "certificatePem",
2833
+ "caCertificatePem",
2834
+ "fingerprint",
2835
+ "expiresAt",
2836
+ "status"
2837
+ ],
2838
+ "properties": {
2839
+ "credentialId": {
2840
+ "$ref": "#/$defs/Identifier"
2841
+ },
2842
+ "certificatePem": {
2843
+ "type": "string",
2844
+ "minLength": 64,
2845
+ "maxLength": 16384,
2846
+ "pattern": "^-----BEGIN CERTIFICATE-----"
2847
+ },
2848
+ "caCertificatePem": {
2849
+ "type": "string",
2850
+ "minLength": 64,
2851
+ "maxLength": 16384,
2852
+ "pattern": "^-----BEGIN CERTIFICATE-----"
2853
+ },
2854
+ "fingerprint": {
2855
+ "type": "string",
2856
+ "pattern": "^sha256:[a-f0-9]{64}$"
2857
+ },
2858
+ "expiresAt": {
2859
+ "type": "string",
2860
+ "format": "date-time"
2861
+ },
2862
+ "status": {
2863
+ "enum": [
2864
+ "pending",
2865
+ "active"
2866
+ ]
2867
+ }
2868
+ }
2869
+ },
2870
+ "EAPCertificateActivateRequest": {
2871
+ "type": "object",
2872
+ "additionalProperties": false,
2873
+ "required": [
2874
+ "credentialId",
2875
+ "fingerprint"
2876
+ ],
1199
2877
  "properties": {
1200
- "commandId": { "$ref": "#/$defs/Identifier" },
1201
- "sessionId": { "$ref": "#/$defs/Identifier" },
1202
- "status": { "enum": ["applied", "rejected", "unsupported", "timed-out"] },
1203
- "reasonCode": { "type": "string", "minLength": 1, "maxLength": 128 },
1204
- "completedAt": { "type": "string", "format": "date-time" }
2878
+ "credentialId": {
2879
+ "$ref": "#/$defs/Identifier"
2880
+ },
2881
+ "fingerprint": {
2882
+ "type": "string",
2883
+ "pattern": "^sha256:[a-f0-9]{64}$"
2884
+ }
2885
+ }
2886
+ },
2887
+ "EAPCertificateActivateResult": {
2888
+ "type": "object",
2889
+ "additionalProperties": false,
2890
+ "required": [
2891
+ "credentialId",
2892
+ "fingerprint",
2893
+ "expiresAt",
2894
+ "status"
2895
+ ],
2896
+ "properties": {
2897
+ "credentialId": {
2898
+ "$ref": "#/$defs/Identifier"
2899
+ },
2900
+ "fingerprint": {
2901
+ "type": "string",
2902
+ "pattern": "^sha256:[a-f0-9]{64}$"
2903
+ },
2904
+ "expiresAt": {
2905
+ "type": "string",
2906
+ "format": "date-time"
2907
+ },
2908
+ "status": {
2909
+ "const": "active"
2910
+ }
2911
+ }
2912
+ },
2913
+ "IPAddress": {
2914
+ "anyOf": [
2915
+ {
2916
+ "$ref": "#/$defs/IPv4Address"
2917
+ },
2918
+ {
2919
+ "type": "string",
2920
+ "format": "ipv6"
2921
+ }
2922
+ ]
2923
+ },
2924
+ "IPCIDR": {
2925
+ "type": "string",
2926
+ "maxLength": 64,
2927
+ "pattern": "^(?:(?:(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])/(?:[1-9]|[12][0-9]|3[0-2])|(?:(?:(?:0|[1-9a-f][0-9a-f]{0,3}):){7}(?:0|[1-9a-f][0-9a-f]{0,3})|(?:(?:0|[1-9a-f][0-9a-f]{0,3}):){1,7}:|(?:(?:0|[1-9a-f][0-9a-f]{0,3}):){1,6}:(?:0|[1-9a-f][0-9a-f]{0,3})|(?:(?:0|[1-9a-f][0-9a-f]{0,3}):){1,5}(?::(?:0|[1-9a-f][0-9a-f]{0,3})){1,2}|(?:(?:0|[1-9a-f][0-9a-f]{0,3}):){1,4}(?::(?:0|[1-9a-f][0-9a-f]{0,3})){1,3}|(?:(?:0|[1-9a-f][0-9a-f]{0,3}):){1,3}(?::(?:0|[1-9a-f][0-9a-f]{0,3})){1,4}|(?:(?:0|[1-9a-f][0-9a-f]{0,3}):){1,2}(?::(?:0|[1-9a-f][0-9a-f]{0,3})){1,5}|(?:0|[1-9a-f][0-9a-f]{0,3}):(?:(?::(?:0|[1-9a-f][0-9a-f]{0,3})){1,6})|:(?:(?::(?:0|[1-9a-f][0-9a-f]{0,3})){1,7}|:))/(?:[1-9]|[1-9][0-9]|1[01][0-9]|12[0-8]))$",
2928
+ "description": "Non-default IPv4 or IPv6 CIDR syntax. Core additionally validates canonical network-address bits and compressed address spelling with netip."
2929
+ },
2930
+ "DNSResolutionRequest": {
2931
+ "type": "object",
2932
+ "additionalProperties": false,
2933
+ "required": [
2934
+ "resourceId",
2935
+ "siteId",
2936
+ "hostname",
2937
+ "resolvers"
2938
+ ],
2939
+ "properties": {
2940
+ "resourceId": {
2941
+ "$ref": "#/$defs/Identifier"
2942
+ },
2943
+ "siteId": {
2944
+ "$ref": "#/$defs/Identifier"
2945
+ },
2946
+ "hostname": {
2947
+ "type": "string",
2948
+ "format": "hostname",
2949
+ "maxLength": 253
2950
+ },
2951
+ "resolvers": {
2952
+ "type": "array",
2953
+ "maxItems": 8,
2954
+ "items": {
2955
+ "$ref": "#/$defs/IPAddress"
2956
+ },
2957
+ "minItems": 1,
2958
+ "uniqueItems": true
2959
+ }
2960
+ }
2961
+ },
2962
+ "DNSResolutionObservation": {
2963
+ "type": "object",
2964
+ "additionalProperties": false,
2965
+ "required": [
2966
+ "resourceId",
2967
+ "hostname",
2968
+ "addresses",
2969
+ "observedAt",
2970
+ "ttlSeconds"
2971
+ ],
2972
+ "properties": {
2973
+ "resourceId": {
2974
+ "$ref": "#/$defs/Identifier"
2975
+ },
2976
+ "hostname": {
2977
+ "type": "string",
2978
+ "format": "hostname",
2979
+ "maxLength": 253
2980
+ },
2981
+ "addresses": {
2982
+ "type": "array",
2983
+ "maxItems": 32,
2984
+ "items": {
2985
+ "$ref": "#/$defs/IPAddress"
2986
+ },
2987
+ "minItems": 1,
2988
+ "uniqueItems": true
2989
+ },
2990
+ "observedAt": {
2991
+ "type": "string",
2992
+ "format": "date-time"
2993
+ },
2994
+ "ttlSeconds": {
2995
+ "type": "integer",
2996
+ "minimum": 1,
2997
+ "maximum": 300
2998
+ }
2999
+ }
3000
+ },
3001
+ "DNSObservationBatch": {
3002
+ "type": "object",
3003
+ "additionalProperties": false,
3004
+ "required": [
3005
+ "configurationVersion",
3006
+ "policyVersion",
3007
+ "observations"
3008
+ ],
3009
+ "properties": {
3010
+ "configurationVersion": {
3011
+ "type": "integer",
3012
+ "minimum": 1
3013
+ },
3014
+ "policyVersion": {
3015
+ "type": "integer",
3016
+ "minimum": 1
3017
+ },
3018
+ "observations": {
3019
+ "type": "array",
3020
+ "maxItems": 128,
3021
+ "items": {
3022
+ "$ref": "#/$defs/DNSResolutionObservation"
3023
+ }
3024
+ }
3025
+ }
3026
+ },
3027
+ "DNSRecord": {
3028
+ "type": "object",
3029
+ "additionalProperties": false,
3030
+ "required": [
3031
+ "hostname",
3032
+ "addresses",
3033
+ "expiresAt"
3034
+ ],
3035
+ "properties": {
3036
+ "hostname": {
3037
+ "type": "string",
3038
+ "format": "hostname",
3039
+ "maxLength": 253
3040
+ },
3041
+ "addresses": {
3042
+ "type": "array",
3043
+ "minItems": 1,
3044
+ "maxItems": 32,
3045
+ "uniqueItems": true,
3046
+ "items": {
3047
+ "$ref": "#/$defs/IPAddress"
3048
+ }
3049
+ },
3050
+ "expiresAt": {
3051
+ "type": "string",
3052
+ "format": "date-time"
3053
+ }
1205
3054
  }
1206
3055
  }
1207
3056
  }