@opensoha/contracts 0.1.16 → 0.1.18
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.
- package/COMPATIBILITY.md +91 -0
- package/README.md +49 -3
- package/auth/catalog_generated.go +2 -2
- package/auth/catalog_test.go +32 -0
- package/auth/outpost_headers.go +17 -0
- package/auth/outpost_headers_test.go +16 -0
- package/auth/permission-catalog.json +1097 -187
- package/compat/consumer-revisions.json +3 -0
- package/compat/json-schema-ecosystem-0.1.0.json +1 -1
- package/compat/openapi-loose-boundaries-0.1.0.json +78 -46
- package/delivery/canonical.go +136 -0
- package/delivery/document.go +203 -0
- package/delivery/document.schema.json +1527 -0
- package/delivery/document_test.go +191 -0
- package/delivery/parser.go +155 -0
- package/evaluation/evaluation-run.schema.json +64 -10
- package/fixtures/json-schema/gateway-manifest/invalid/bad-execution-mode.json +73 -0
- package/fixtures/json-schema/gateway-manifest/invalid/unversioned-check.json +85 -0
- package/fixtures/json-schema/gateway-manifest/valid/checks.json +86 -0
- package/fixtures/json-schema/gateway-manifest/valid/versioned-task.json +73 -0
- package/fixtures/json-schema/network-ingest-event/invalid/duplicate-event.json +33 -0
- package/fixtures/json-schema/network-ingest-event/invalid/message-payload-mismatch.json +23 -0
- package/fixtures/json-schema/network-ingest-event/invalid/password.json +22 -0
- package/fixtures/json-schema/network-ingest-event/invalid/proxy-flow-destination.json +28 -0
- package/fixtures/json-schema/network-ingest-event/invalid/vpn-probe-negative-rtt.json +34 -0
- package/fixtures/json-schema/network-ingest-event/invalid/vpn-stats-secret.json +27 -0
- package/fixtures/json-schema/network-ingest-event/valid/endpoint-proxy-flow.json +27 -0
- package/fixtures/json-schema/network-ingest-event/valid/freeradius-accounting.json +25 -0
- package/fixtures/json-schema/network-ingest-event/valid/gateway.json +53 -0
- package/fixtures/json-schema/network-ingest-event/valid/vpn-probe-batch.json +45 -0
- package/fixtures/json-schema/network-ingest-event/valid/vpn-tunnel-stats.json +26 -0
- package/fixtures/json-schema/network-radius-accounting/invalid/password.json +9 -0
- package/fixtures/json-schema/network-radius-accounting/valid/accounting.json +16 -0
- package/fixtures/json-schema/network-runtime-protocol/invalid/invalid-cidr.json +31 -0
- package/fixtures/json-schema/network-runtime-protocol/invalid/message-payload-mismatch.json +19 -0
- package/fixtures/json-schema/network-runtime-protocol/invalid/mihomo-raw-subscription.json +33 -0
- package/fixtures/json-schema/network-runtime-protocol/invalid/nas-authorization-password.json +18 -0
- package/fixtures/json-schema/network-runtime-protocol/invalid/nas-eap-without-certificate.json +17 -0
- package/fixtures/json-schema/network-runtime-protocol/invalid/private-key.json +20 -0
- package/fixtures/json-schema/network-runtime-protocol/invalid/raw-credential-reference.json +16 -0
- package/fixtures/json-schema/network-runtime-protocol/invalid/runtime-interval-too-short.json +23 -0
- package/fixtures/json-schema/network-runtime-protocol/invalid/vpn-managed-bad-token.json +15 -0
- package/fixtures/json-schema/network-runtime-protocol/invalid/vpn-managed-mode-override.json +16 -0
- package/fixtures/json-schema/network-runtime-protocol/invalid/wireguard-capability-without-key.json +19 -0
- package/fixtures/json-schema/network-runtime-protocol/invalid/wireguard-default-route.json +31 -0
- package/fixtures/json-schema/network-runtime-protocol/invalid/ztna-without-access-grant.json +17 -0
- package/fixtures/json-schema/network-runtime-protocol/valid/configuration-desired.json +86 -0
- package/fixtures/json-schema/network-runtime-protocol/valid/direct-ztna-connect.json +19 -0
- package/fixtures/json-schema/network-runtime-protocol/valid/direct-ztna-result.json +33 -0
- package/fixtures/json-schema/network-runtime-protocol/valid/internal-ztna-connect.json +19 -0
- package/fixtures/json-schema/network-runtime-protocol/valid/managed-vpn-macos-enrollment.json +27 -0
- package/fixtures/json-schema/network-runtime-protocol/valid/mihomo-app-subscription-configuration.json +32 -0
- package/fixtures/json-schema/network-runtime-protocol/valid/mihomo-manual-node-configuration.json +32 -0
- package/fixtures/json-schema/network-runtime-protocol/valid/mihomo-wireguard-configuration.json +70 -0
- package/fixtures/json-schema/network-runtime-protocol/valid/nas-authorization-request.json +19 -0
- package/fixtures/json-schema/network-runtime-protocol/valid/nas-authorization-result.json +24 -0
- package/fixtures/json-schema/network-runtime-protocol/valid/nas-session-command-result.json +17 -0
- package/fixtures/json-schema/network-runtime-protocol/valid/nas-session-command.json +27 -0
- package/fixtures/json-schema/network-runtime-protocol/valid/vpn-connect-request.json +17 -0
- package/fixtures/json-schema/network-runtime-protocol/valid/vpn-connect-result.json +34 -0
- package/fixtures/json-schema/network-runtime-protocol/valid/vpn-managed-connect.json +15 -0
- package/fixtures/json-schema/network-runtime-protocol/valid/wireguard-enrollment.json +20 -0
- package/fixtures/json-schema/network-runtime-protocol/valid/wireguard-site-link.json +48 -0
- package/fixtures/openapi/AgentChatInput/invalid/empty-question.json +4 -0
- package/fixtures/openapi/AgentChatInput/invalid/system-role.json +9 -0
- package/fixtures/openapi/AgentChatInput/valid/authorized-background.json +5 -0
- package/fixtures/openapi/AgentChatInput/valid/conversation.json +15 -0
- package/fixtures/openapi/AgentRunnerToolCallRequest/invalid/model-identity.json +1 -0
- package/fixtures/openapi/AgentRunnerToolCallRequest/valid/search.json +1 -0
- package/fixtures/openapi/AnnouncementReceiptPageEnvelope/invalid/missing-read-count.json +9 -0
- package/fixtures/openapi/AnnouncementReceiptPageEnvelope/valid/read-and-unread.json +28 -0
- package/fixtures/openapi/ApplicationInput/invalid/negative-version.json +6 -0
- package/fixtures/openapi/ApplicationInput/invalid/zero-version.json +6 -0
- package/fixtures/openapi/ApplicationInput/valid/versioned.json +6 -0
- package/fixtures/openapi/ApprovalRequest/invalid/resolved-scopes.json +20 -0
- package/fixtures/openapi/ApprovalRequest/valid/resolved-scopes.json +21 -0
- package/fixtures/openapi/BuildTemplateInput/invalid/negative-revision.json +6 -0
- package/fixtures/openapi/BuildTemplateInput/valid/draft.json +11 -0
- package/fixtures/openapi/BuildTriggerRequest/invalid/no-ref.json +1 -0
- package/fixtures/openapi/BuildTriggerRequest/valid/no-environment.json +1 -0
- package/fixtures/openapi/BuildpacksConfiguration/invalid/mutable-builder.json +5 -0
- package/fixtures/openapi/BuildpacksConfiguration/invalid/privilege-override.json +6 -0
- package/fixtures/openapi/BuildpacksConfiguration/invalid/unsupported-platform.json +5 -0
- package/fixtures/openapi/BuildpacksConfiguration/valid/pinned.json +5 -0
- package/fixtures/openapi/CapabilityAssessment/invalid/contract.json +16 -0
- package/fixtures/openapi/CapabilityAssessment/valid/contract.json +16 -0
- package/fixtures/openapi/CapabilityPlan/invalid/contract.json +16 -0
- package/fixtures/openapi/CapabilityPlan/valid/contract.json +19 -0
- package/fixtures/openapi/CapabilityPlanValidation/invalid/contract.json +5 -0
- package/fixtures/openapi/CapabilityPlanValidation/valid/contract.json +11 -0
- package/fixtures/openapi/CapabilityTask/invalid/contract.json +33 -0
- package/fixtures/openapi/CapabilityTask/valid/contract.json +34 -0
- package/fixtures/openapi/CapabilityTaskInput/invalid/contract.json +22 -0
- package/fixtures/openapi/CapabilityTaskInput/valid/contract.json +22 -0
- package/fixtures/openapi/CapabilityValueSemantic/invalid/contract.json +4 -0
- package/fixtures/openapi/CapabilityValueSemantic/valid/contract.json +7 -0
- package/fixtures/openapi/DeliveryAccessResult/invalid/release-verification.json +8 -0
- package/fixtures/openapi/DeliveryAccessResult/valid/release-verification.json +8 -0
- package/fixtures/openapi/DeliveryBatchAssessment/invalid/release-verification.json +11 -0
- package/fixtures/openapi/DeliveryBatchAssessment/valid/release-verification.json +11 -0
- package/fixtures/openapi/DeliveryBatchAssessmentInput/invalid/release-verification.json +9 -0
- package/fixtures/openapi/DeliveryBatchAssessmentInput/valid/release-verification.json +8 -0
- package/fixtures/openapi/DeliveryBatchInput/invalid/ambiguous-source.json +19 -0
- package/fixtures/openapi/DeliveryBatchInput/invalid/missing-idempotency.json +16 -0
- package/fixtures/openapi/DeliveryBatchInput/valid/quick-deploy.json +17 -0
- package/fixtures/openapi/DeliveryBatchInput/valid/saved-workflow.json +5 -0
- package/fixtures/openapi/DeliveryBlueprintInput/invalid/unversioned-preset.json +31 -0
- package/fixtures/openapi/DeliveryBlueprintInput/valid/service-preset.json +32 -0
- package/fixtures/openapi/DeliveryDocument/invalid/unknown-field.json +24 -0
- package/fixtures/openapi/DeliveryDocument/invalid/unknown-kind.json +23 -0
- package/fixtures/openapi/DeliveryDocument/invalid/unknown-version.json +23 -0
- package/fixtures/openapi/DeliveryDocument/valid/build-template.json +26 -0
- package/fixtures/openapi/DeliveryDocument/valid/deployment-template.json +26 -0
- package/fixtures/openapi/DeliveryDocument/valid/legacy-dag.json +39 -0
- package/fixtures/openapi/DeliveryDocument/valid/workflow-template.json +23 -0
- package/fixtures/openapi/DeliveryDocument/valid/workflow.json +20 -0
- package/fixtures/openapi/DeliveryDraftInput/invalid/short-idempotency-key.json +30 -0
- package/fixtures/openapi/DeliveryDraftInput/valid/idempotent-create.json +30 -0
- package/fixtures/openapi/DeliveryDraftService/invalid/zero-version.json +7 -0
- package/fixtures/openapi/DeliveryDraftService/valid/versioned-template.json +9 -0
- package/fixtures/openapi/DeliveryExecutionHistoryPage/invalid-kind.json +9 -0
- package/fixtures/openapi/DeliveryExecutionHistoryPage/valid-build.json +16 -0
- package/fixtures/openapi/DeliveryExecutionHistoryPage/valid-empty.json +3 -0
- package/fixtures/openapi/DeliveryPlanApprovalInput/invalid/confirm.json +1 -0
- package/fixtures/openapi/DeliveryPlanApprovalInput/valid/approve.json +1 -0
- package/fixtures/openapi/DeliveryPlanInput/invalid/draft-manifest-revision.json +1 -0
- package/fixtures/openapi/DeliveryPlanInput/valid/manifest-revision.json +1 -0
- package/fixtures/openapi/DeliveryTargetInput/invalid/deploy-without-environment.json +7 -0
- package/fixtures/openapi/DeliveryTargetInput/valid/build-without-environment.json +6 -0
- package/fixtures/openapi/DeliveryTemplateSourceInput/invalid/duplicate-kind.json +13 -0
- package/fixtures/openapi/DeliveryTemplateSourceInput/invalid/embedded-credentials.json +16 -0
- package/fixtures/openapi/DeliveryTemplateSourceInput/invalid/empty-kinds.json +10 -0
- package/fixtures/openapi/DeliveryTemplateSourceInput/invalid/negative-generation.json +15 -0
- package/fixtures/openapi/DeliveryTemplateSourceInput/invalid/unknown-kind.json +12 -0
- package/fixtures/openapi/DeliveryTemplateSourceInput/valid/manual-source.json +15 -0
- package/fixtures/openapi/DeliveryWorkflowDefinition/invalid/unversioned-template.json +15 -0
- package/fixtures/openapi/DeliveryWorkflowDefinition/valid/cross-app.json +24 -0
- package/fixtures/openapi/DeliveryWorkflowInput/invalid/short-key.json +1 -0
- package/fixtures/openapi/DeliveryWorkflowInput/valid/idempotent-create.json +1 -0
- package/fixtures/openapi/DeploymentTemplatePreviewInput/invalid/invalid-target-override.json +7 -0
- package/fixtures/openapi/DeploymentTemplatePreviewInput/invalid/invalid-zero-version.json +6 -0
- package/fixtures/openapi/DeploymentTemplatePreviewInput/valid/valid.json +6 -0
- package/fixtures/openapi/DockerDeliveryConfiguration/invalid/empty-mappings.json +5 -0
- package/fixtures/openapi/DockerDeliveryConfiguration/valid/compose.json +7 -0
- package/fixtures/openapi/DockerDeliverySnapshot/invalid/missing-required-field.json +19 -0
- package/fixtures/openapi/DockerDeliverySnapshot/valid/frozen-project.json +20 -0
- package/fixtures/openapi/DockerOperationCallbackRequest/invalid/cancellation-acknowledged-not-boolean.json +13 -0
- package/fixtures/openapi/DockerOperationCallbackRequest/valid/cancellation-acknowledged.json +13 -0
- package/fixtures/openapi/DockerProjectInput/invalid/empty-host.json +4 -0
- package/fixtures/openapi/DockerProjectInput/valid/inline-idempotent.json +7 -0
- package/fixtures/openapi/DockerQuickCreateHostInput/invalid/capacity-type.json +1 -0
- package/fixtures/openapi/DockerQuickCreateHostInput/valid/capacity.json +1 -0
- package/fixtures/openapi/EndpointDevice/invalid/missing-owner.json +8 -0
- package/fixtures/openapi/EndpointDevice/valid/active.json +35 -0
- package/fixtures/openapi/EndpointDeviceRegistrationInput/invalid/client-owned-status.json +5 -0
- package/fixtures/openapi/EndpointDeviceRegistrationInput/invalid/oversized-network-inventory.json +18 -0
- package/fixtures/openapi/EndpointDeviceRegistrationInput/valid/macos.json +28 -0
- package/fixtures/openapi/HelmDeliveryConfiguration/invalid/plain-credential.json +21 -0
- package/fixtures/openapi/HelmDeliveryConfiguration/invalid/release-name.json +20 -0
- package/fixtures/openapi/HelmDeliveryConfiguration/valid/private-oci.json +20 -0
- package/fixtures/openapi/HelmDeliverySnapshot/invalid/secret-plan.json +31 -0
- package/fixtures/openapi/HelmDeliverySnapshot/invalid/unknown-operation.json +28 -0
- package/fixtures/openapi/HelmDeliverySnapshot/valid/first-install.json +28 -0
- package/fixtures/openapi/IdentityApplication/invalid/outpost-status.json +1 -0
- package/fixtures/openapi/IdentityApplicationOnboardingInput/invalid/missing-access.json +12 -0
- package/fixtures/openapi/IdentityApplicationOnboardingInput/valid/link.json +13 -0
- package/fixtures/openapi/IdentityOutpost/invalid/missing-runtime-status.json +9 -0
- package/fixtures/openapi/IdentityOutpost/valid/healthy.json +17 -0
- package/fixtures/openapi/IdentityOutpost/valid/unregistered.json +12 -0
- package/fixtures/openapi/IdentityOutpostDeployment/invalid/missing-protocol.json +3 -0
- package/fixtures/openapi/IdentityOutpostDeployment/valid/remote.json +6 -0
- package/fixtures/openapi/IdentityOutpostInput/invalid/forged-observation.json +7 -0
- package/fixtures/openapi/IdentityOutpostInput/valid/forward-auth.json +6 -0
- package/fixtures/openapi/IdentityOutpostInput/valid/legacy.json +8 -0
- package/fixtures/openapi/IdentityProviderSetup/invalid/fake-verification.json +1 -0
- package/fixtures/openapi/IdentityProviderSetup/valid/incomplete.json +1 -0
- package/fixtures/openapi/IdentityProviderSetup/valid/remote.json +1 -0
- package/fixtures/openapi/IdentityProviderUserMetadata/invalid/attributes.json +8 -0
- package/fixtures/openapi/IdentityProviderUserMetadata/valid/attributes.json +13 -0
- package/fixtures/openapi/KubernetesCustomResource/invalid/negative-generation.json +1 -0
- package/fixtures/openapi/KubernetesCustomResource/valid/deleting-operator.json +1 -0
- package/fixtures/openapi/KubernetesResourceCreationReceipt/invalid/manifest-content.json +20 -0
- package/fixtures/openapi/KubernetesResourceCreationReceipt/valid/confirmed.json +20 -0
- package/fixtures/openapi/KubernetesResourceCreationReceipt/valid/unknown.json +19 -0
- package/fixtures/openapi/LLMUpstreamTestResultEnvelope/invalid/models-not-array.json +9 -0
- package/fixtures/openapi/LLMUpstreamTestResultEnvelope/valid/discovered-models.json +11 -0
- package/fixtures/openapi/ManifestDeploymentEnvelope/invalid/negative-resource-observation.json +57 -0
- package/fixtures/openapi/ManifestDeploymentEnvelope/valid/operator-deleting.json +57 -0
- package/fixtures/openapi/ManifestExecutionTaskPayload/invalid/gitops-empty.json +7 -0
- package/fixtures/openapi/ManifestExecutionTaskPayload/valid/gitops-frozen-children.json +18 -0
- package/fixtures/openapi/ManifestKustomizeOptions/invalid/escaping-entry.json +1 -0
- package/fixtures/openapi/ManifestKustomizeOptions/invalid/mutable-image.json +1 -0
- package/fixtures/openapi/ManifestKustomizeOptions/valid/overlay-images.json +7 -0
- package/fixtures/openapi/ManifestRevisionInput/invalid/missing-version.json +1 -0
- package/fixtures/openapi/ManifestRevisionInput/valid/current-draft.json +1 -0
- package/fixtures/openapi/ManifestServiceTemplateInputs/invalid/mutable-image.json +8 -0
- package/fixtures/openapi/ManifestServiceTemplateInputs/valid/frozen-service-image.json +9 -0
- package/fixtures/openapi/NetworkAccessGrant/invalid/token-digest.json +15 -0
- package/fixtures/openapi/NetworkAccessGrant/valid/issued.json +14 -0
- package/fixtures/openapi/NetworkAccessGrantInput/invalid/no-resources.json +7 -0
- package/fixtures/openapi/NetworkAccessGrantInput/valid/direct-ztna.json +8 -0
- package/fixtures/openapi/NetworkAccessGrantSecret/invalid/short-token.json +17 -0
- package/fixtures/openapi/NetworkAccessGrantSecret/valid/issued.json +17 -0
- package/fixtures/openapi/NetworkAccessPolicy/invalid/missing-version.json +20 -0
- package/fixtures/openapi/NetworkAccessPolicy/valid/published-draft.json +21 -0
- package/fixtures/openapi/NetworkAccessPolicyInput/invalid/duplicate-team.json +17 -0
- package/fixtures/openapi/NetworkAccessPolicyInput/valid/team-and-tag-allow.json +17 -0
- package/fixtures/openapi/NetworkConflictAnalysisRequest/invalid/ipv6-range.json +9 -0
- package/fixtures/openapi/NetworkConflictAnalysisRequest/valid/runtime-ranges.json +15 -0
- package/fixtures/openapi/NetworkConnectionOption/invalid/secret.json +10 -0
- package/fixtures/openapi/NetworkConnectionOption/valid/wifi.json +9 -0
- package/fixtures/openapi/NetworkConnectionOption/valid/wired.json +8 -0
- package/fixtures/openapi/NetworkGateway/invalid/missing-site.json +7 -0
- package/fixtures/openapi/NetworkGateway/valid/online.json +23 -0
- package/fixtures/openapi/NetworkGatewayInput/invalid/default-route-overlay.json +13 -0
- package/fixtures/openapi/NetworkGatewayInput/valid/routed.json +14 -0
- package/fixtures/openapi/NetworkLease/invalid/empty-cidrs.json +12 -0
- package/fixtures/openapi/NetworkLease/valid/active.json +12 -0
- package/fixtures/openapi/NetworkMihomoProfile/invalid/subscription-leak.json +20 -0
- package/fixtures/openapi/NetworkMihomoProfile/valid/managed.json +21 -0
- package/fixtures/openapi/NetworkMihomoProfileInput/invalid/app-subscription-secret.json +14 -0
- package/fixtures/openapi/NetworkMihomoProfileInput/invalid/manual-node-with-subscription.json +20 -0
- package/fixtures/openapi/NetworkMihomoProfileInput/valid/app-subscription.json +14 -0
- package/fixtures/openapi/NetworkMihomoProfileInput/valid/managed.json +16 -0
- package/fixtures/openapi/NetworkMihomoProfileInput/valid/manual-node.json +21 -0
- package/fixtures/openapi/NetworkNASBinding/invalid/secret.json +13 -0
- package/fixtures/openapi/NetworkNASBinding/valid/default.json +16 -0
- package/fixtures/openapi/NetworkNASBindingInput/invalid/secret.json +10 -0
- package/fixtures/openapi/NetworkNASBindingInput/valid/default.json +13 -0
- package/fixtures/openapi/NetworkPolicyPreviewRequest/invalid/unknown-mode.json +6 -0
- package/fixtures/openapi/NetworkPolicyPreviewRequest/valid/external-direct-ztna.json +6 -0
- package/fixtures/openapi/NetworkPolicyPreviewRequest/valid/external-vpn-ztna.json +6 -0
- package/fixtures/openapi/NetworkPolicyPreviewRequest/valid/external-vpn.json +6 -0
- package/fixtures/openapi/NetworkPolicyPreviewRequest/valid/internal-direct.json +7 -0
- package/fixtures/openapi/NetworkPolicyPreviewRequest/valid/internal-ztna.json +7 -0
- package/fixtures/openapi/NetworkPolicyPreviewResult/invalid/bypass-path.json +9 -0
- package/fixtures/openapi/NetworkPolicyPreviewResult/valid/onboarding.json +10 -0
- package/fixtures/openapi/NetworkPolicyPreviewResult/valid/protected-broad-path-denied.json +9 -0
- package/fixtures/openapi/NetworkPolicyPreviewResult/valid/protected-resource.json +9 -0
- package/fixtures/openapi/NetworkPolicyPreviewResult/valid/quarantine.json +10 -0
- package/fixtures/openapi/NetworkPolicyPreviewResult/valid/restricted.json +10 -0
- package/fixtures/openapi/NetworkPolicySnapshot/invalid/zero-version.json +7 -0
- package/fixtures/openapi/NetworkPolicySnapshot/valid/published.json +7 -0
- package/fixtures/openapi/NetworkResourceInput/invalid/invalid-port.json +10 -0
- package/fixtures/openapi/NetworkResourceInput/valid/protected-cidr.json +10 -0
- package/fixtures/openapi/NetworkRuntimeEnrollmentInput/invalid/excessive-ttl.json +7 -0
- package/fixtures/openapi/NetworkRuntimeEnrollmentInput/valid/endpoint.json +7 -0
- package/fixtures/openapi/NetworkRuntimeEnrollmentSecret/invalid/short-token.json +15 -0
- package/fixtures/openapi/NetworkRuntimeEnrollmentSecret/valid/pending.json +15 -0
- package/fixtures/openapi/NetworkSession/invalid/unknown-status.json +14 -0
- package/fixtures/openapi/NetworkSession/valid/restricted-vpn-ztna.json +16 -0
- package/fixtures/openapi/NetworkSessionActionExecuteInput/invalid/short-hash.json +6 -0
- package/fixtures/openapi/NetworkSessionActionExecuteInput/valid/restrict.json +6 -0
- package/fixtures/openapi/NetworkSessionActionInput/invalid/unknown-action.json +5 -0
- package/fixtures/openapi/NetworkSessionActionInput/valid/restrict.json +5 -0
- package/fixtures/openapi/NetworkSessionActionPlan/invalid/missing-hash.json +12 -0
- package/fixtures/openapi/NetworkSessionActionPlan/valid/fallback-disconnect.json +13 -0
- package/fixtures/openapi/NetworkSessionCommand/invalid/unknown-status.json +14 -0
- package/fixtures/openapi/NetworkSessionCommand/valid/pending.json +14 -0
- package/fixtures/openapi/NetworkSiteInput/invalid/unknown-status.json +4 -0
- package/fixtures/openapi/NetworkSiteInput/valid/shanghai.json +5 -0
- package/fixtures/openapi/NetworkSiteProfileBinding/invalid/vlan.json +9 -0
- package/fixtures/openapi/NetworkSiteProfileBinding/valid/default.json +10 -0
- package/fixtures/openapi/NetworkSiteProfileBindingInput/invalid/timeout.json +7 -0
- package/fixtures/openapi/NetworkSiteProfileBindingInput/valid/default.json +7 -0
- package/fixtures/openapi/NetworkSpaceInput/invalid/empty-cidrs.json +6 -0
- package/fixtures/openapi/NetworkSpaceInput/invalid/malformed-cidr.json +6 -0
- package/fixtures/openapi/NetworkSpaceInput/valid/corp.json +6 -0
- package/fixtures/openapi/NetworkTelemetrySummary/invalid/raw-destination.json +29 -0
- package/fixtures/openapi/NetworkTelemetrySummary/valid/proxy-flow.json +36 -0
- package/fixtures/openapi/NetworkVPNConnectionIntentInput/invalid/auto-with-gateway.json +6 -0
- package/fixtures/openapi/NetworkVPNConnectionIntentInput/invalid/missing-manual-gateway.json +5 -0
- package/fixtures/openapi/NetworkVPNConnectionIntentInput/invalid/mode-override.json +7 -0
- package/fixtures/openapi/NetworkVPNConnectionIntentInput/valid/auto-intent.json +5 -0
- package/fixtures/openapi/NetworkVPNConnectionIntentInput/valid/manual-intent.json +6 -0
- package/fixtures/openapi/NetworkVPNProfileInput/invalid/unknown-private-key.json +25 -0
- package/fixtures/openapi/NetworkVPNProfileInput/valid/assigned-profile.json +24 -0
- package/fixtures/openapi/NetworkVPNSelectionPolicyInput/invalid/unbounded-attempts.json +21 -0
- package/fixtures/openapi/NetworkVPNSelectionPolicyInput/valid/provider-policy.json +21 -0
- package/fixtures/openapi/ObservabilityMetricAssessmentInput/invalid/arbitrary-expression.json +10 -0
- package/fixtures/openapi/ObservabilityMetricAssessmentInput/valid/metric-window.json +10 -0
- package/fixtures/openapi/PluginManifest/valid/hermes-api.json +53 -0
- package/fixtures/openapi/ProgressiveRolloutControlInput/invalid/missing-identity.json +5 -0
- package/fixtures/openapi/ProgressiveRolloutControlInput/invalid/skip-analysis.json +5 -0
- package/fixtures/openapi/ProgressiveRolloutControlInput/valid/pause.json +5 -0
- package/fixtures/openapi/ReleaseTargetInput/invalid/missing-required-field.json +15 -0
- package/fixtures/openapi/ReleaseTargetInput/valid/docker-compose.json +16 -0
- package/fixtures/openapi/RepositoryAnalysis/invalid/moving-ref.json +11 -0
- package/fixtures/openapi/RepositoryAnalysis/valid/go.json +29 -0
- package/fixtures/openapi/RepositoryAnalysisInput/invalid/arbitrary-source-url.json +6 -0
- package/fixtures/openapi/RepositoryAnalysisInput/invalid/missing-ref.json +4 -0
- package/fixtures/openapi/RepositoryAnalysisInput/valid/nested-project.json +6 -0
- package/fixtures/openapi/ResourceLease/invalid/missing-session.json +10 -0
- package/fixtures/openapi/ResourceLease/valid/active.json +11 -0
- package/fixtures/openapi/ServiceDeploymentTemplateBinding/invalid/invalid-unpinned.json +4 -0
- package/fixtures/openapi/ServiceDeploymentTemplateBinding/valid/valid.json +7 -0
- package/fixtures/openapi/ServiceDeploymentTemplateInput/invalid/invalid-executable-schema.json +25 -0
- package/fixtures/openapi/ServiceDeploymentTemplateInput/invalid/invalid-missing-schema.json +21 -0
- package/fixtures/openapi/ServiceDeploymentTemplateInput/invalid/invalid-mixed-renderers.json +40 -0
- package/fixtures/openapi/ServiceDeploymentTemplateInput/valid/valid-nested-parameters.json +41 -0
- package/fixtures/openapi/ServiceDeploymentTemplateInput/valid/valid-yaml.json +34 -0
- package/fixtures/openapi/TemplatePublishInput/invalid/missing-revision.json +1 -0
- package/fixtures/openapi/TemplatePublishInput/invalid/unknown-field.json +4 -0
- package/fixtures/openapi/TemplatePublishInput/invalid/zero-revision.json +3 -0
- package/fixtures/openapi/TemplatePublishInput/valid/revision.json +3 -0
- package/fixtures/openapi/ToolCapability/invalid/bad-idempotency.json +35 -0
- package/fixtures/openapi/ToolCapability/invalid/unversioned-check.json +47 -0
- package/fixtures/openapi/ToolCapability/valid/checks.json +48 -0
- package/fixtures/openapi/ToolCapability/valid/versioned-task.json +35 -0
- package/fixtures/openapi/ToolInvocationRequest/invalid/empty-version.json +8 -0
- package/fixtures/openapi/ToolInvocationRequest/valid/versioned.json +8 -0
- package/fixtures/openapi/ToolInvocationResult/invalid/missing-status-call.json +13 -0
- package/fixtures/openapi/ToolInvocationResult/valid/task.json +20 -0
- package/fixtures/openapi/VirtualMachineCreateInput/invalid/capacity-type.json +1 -0
- package/fixtures/openapi/VirtualMachineCreateInput/valid/capacity.json +1 -0
- package/fixtures/openapi/VirtualizationCapacityInput/invalid/missing-disk.json +1 -0
- package/fixtures/openapi/VirtualizationCapacityInput/valid/running-vm.json +1 -0
- package/fixtures/openapi/VirtualizationCapacityResult/invalid/invented-status.json +1 -0
- package/fixtures/openapi/VirtualizationCapacityResult/valid/available.json +1 -0
- package/fixtures/openapi/VirtualizationWorkerCreateInput/invalid/secret-input.json +5 -0
- package/fixtures/openapi/VirtualizationWorkerCreateInput/valid/one-worker.json +4 -0
- package/fixtures/openapi/VirtualizationWorkerPoolInput/invalid/external-owner.json +27 -0
- package/fixtures/openapi/VirtualizationWorkerPoolInput/invalid/zero-budget.json +27 -0
- package/fixtures/openapi/VirtualizationWorkerPoolInput/valid/registered.json +27 -0
- package/fixtures/openapi/VirtualizationWorkerPoolListEnvelope/invalid/nested-data.json +5 -0
- package/fixtures/openapi/VirtualizationWorkerPoolListEnvelope/valid/empty.json +3 -0
- package/fixtures/openapi/WorkbenchContextSelection/invalid/missing-file-content.json +8 -0
- package/fixtures/openapi/WorkbenchContextSelection/invalid/unknown-reference-kind.json +8 -0
- package/fixtures/openapi/WorkbenchContextSelection/valid/text-and-resource.json +17 -0
- package/fixtures/openapi/WorkbenchInspectionTaskInput/invalid/trigger-without-plan.json +10 -0
- package/fixtures/openapi/WorkbenchInspectionTaskInput/invalid/unknown-trigger.json +28 -0
- package/fixtures/openapi/WorkbenchInspectionTaskInput/invalid/zero-interval.json +28 -0
- package/fixtures/openapi/WorkbenchInspectionTaskInput/valid/alert-capability.json +30 -0
- package/fixtures/openapi/WorkbenchInspectionTaskInput/valid/scheduled-capability.json +28 -0
- package/fixtures/openapi/WorkbenchInspectionTrigger/invalid/missing-rule.json +3 -0
- package/fixtures/openapi/WorkbenchInspectionTrigger/invalid/schedule-alert-selector.json +4 -0
- package/fixtures/openapi/WorkbenchInspectionTrigger/valid/schedule.json +3 -0
- package/fixtures/openapi/WorkbenchModelPreferences/invalid/unknown-effort.json +1 -0
- package/fixtures/openapi/WorkbenchModelPreferences/valid/selected.json +1 -0
- package/fixtures/openapi/WorkflowCatalogPage/invalid/unsupported-kind.json +6 -0
- package/fixtures/openapi/WorkflowCatalogPage/valid/build-without-environment.json +6 -0
- package/fixtures/openapi/WorkflowTemplateInput/invalid/zero-revision.json +6 -0
- package/fixtures/openapi/WorkflowTemplateInput/valid/draft.json +10 -0
- package/gen/go/sohaapi/client.go +1 -1
- package/gen/go/sohaapi/types.go +15610 -6415
- package/gen/go/sohaapi/types_test.go +100 -1
- package/gen/go/sohaapi/vpn_models_test.go +21 -0
- package/gen/ts/sohaapi/index.ts +27859 -17518
- package/go.mod +107 -5
- package/go.sum +379 -16
- package/helmrelease/delivery.go +283 -0
- package/helmrelease/delivery_test.go +102 -0
- package/helmrelease/frozen_chart.go +91 -0
- package/helmrelease/result.go +27 -0
- package/helmrelease/runtime/delivery.go +508 -0
- package/helmrelease/runtime/delivery_test.go +236 -0
- package/helmrelease/runtime/resources_test.go +60 -0
- package/helmrelease/values.go +99 -0
- package/knowledge/context-envelope.schema.json +1 -0
- package/mcp/gateway-manifest.schema.json +387 -72
- package/network/README.md +156 -0
- package/network/network-ingest-event.schema.json +415 -0
- package/network/network-radius-accounting.schema.json +41 -0
- package/network/network-runtime-protocol.schema.json +1208 -0
- package/network/schema.go +26 -0
- package/network/schema_test.go +22 -0
- package/openapi/soha-api.json +59260 -35960
- package/openapi/soha-api.yaml +36064 -26232
- package/openapi/spec_generated.go +3 -3
- package/package.json +7 -1
- package/resource/manifest_health.go +155 -0
- package/resource/manifest_health_test.go +37 -0
- package/resource/models.go +14 -0
- package/resource/runtime/argocd.go +166 -0
- package/resource/runtime/argocd_integration_test.go +142 -0
- package/resource/runtime/argocd_observation.go +143 -0
- package/resource/runtime/argocd_operation.go +253 -0
- package/resource/runtime/argocd_resources.go +115 -0
- package/resource/runtime/argocd_resources_test.go +107 -0
- package/resource/runtime/argocd_test.go +386 -0
- package/resource/runtime/health.go +115 -0
- package/resource/runtime/health_test.go +78 -0
- package/resource/runtime/operator_integration_test.go +174 -0
- package/resource/runtime/ownership.go +178 -0
- package/resource/runtime/ownership_test.go +178 -0
- package/resource/runtime/rollout_integration_test.go +287 -0
- package/resource/runtime/rollout_observation.go +252 -0
- package/resource/runtime/rollout_operation.go +398 -0
- package/resource/runtime/rollout_resources.go +385 -0
- package/resource/runtime/rollout_task.go +165 -0
- package/resource/runtime/rollout_test.go +450 -0
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
# Network contract semantics
|
|
2
|
+
|
|
3
|
+
The JSON Schemas in this directory define strict serialized shapes. Every
|
|
4
|
+
consumer must also enforce the cross-field rules below before using a message
|
|
5
|
+
for authorization, routing, firewall configuration or accounting.
|
|
6
|
+
|
|
7
|
+
## Runtime messages
|
|
8
|
+
|
|
9
|
+
- Runtime mTLS certificates carry exactly one Soha URI SAN:
|
|
10
|
+
`spiffe://opensoha.local/network-control/{runtimeKind}/{runtimeId}`.
|
|
11
|
+
Ingest certificates use the separate scope
|
|
12
|
+
`spiffe://opensoha.local/network-ingest/{producerKind}/{producerId}` and may
|
|
13
|
+
not be reused for control. The body identity is only a consistency check.
|
|
14
|
+
- `devicePublicKey` is one PKIX `PUBLIC KEY` PEM block and must match the
|
|
15
|
+
public key of the authenticated enrollment certificate.
|
|
16
|
+
- A runtime advertising the `wireguard` capability must submit exactly one
|
|
17
|
+
WireGuard public key during enrollment. The corresponding private key is
|
|
18
|
+
generated and retained in runtime-local protected storage. Re-enrollment
|
|
19
|
+
advances the credential/key generation and retires the prior public key.
|
|
20
|
+
- Reject a message when `expiresAt` is not later than `occurredAt` or is
|
|
21
|
+
already expired.
|
|
22
|
+
- Parse every CIDR with the platform standard library, require canonical
|
|
23
|
+
network form, and reject anything not accepted by `netip.ParsePrefix` or an
|
|
24
|
+
equivalent parser. `network-runtime/v1alpha1` carries IPv4 CIDRs only.
|
|
25
|
+
- Resolve `runtimeId` to the authenticated runtime credential. Never trust the
|
|
26
|
+
body to select another runtime.
|
|
27
|
+
- Accept `nas.*` messages only from or for a runtime whose registered kind is
|
|
28
|
+
`nas`; the authenticated runtime must also match the active NAS binding for
|
|
29
|
+
`payload.nasId` and its site.
|
|
30
|
+
- Treat `nas.authorization.request` as authorization input only. It never
|
|
31
|
+
carries a password, EAP exchange, RADIUS packet or shared secret. The
|
|
32
|
+
`password-compatible` method is lower trust than `eap-tls` and policy may
|
|
33
|
+
only preserve or reduce its access profile.
|
|
34
|
+
- For `eap-tls`, resolve the certificate's canonical serial plus authority key
|
|
35
|
+
identifier to one active endpoint credential and derive `deviceId` from that
|
|
36
|
+
credential. Match `subjectId` to the credential; treat `stationId` only as
|
|
37
|
+
NAS evidence, never as device identity. Password-compatible requests identify
|
|
38
|
+
the device explicitly and may not claim client-certificate binding fields.
|
|
39
|
+
- Emit RADIUS attributes only for an allow decision. The NAS adapter maps
|
|
40
|
+
`vlanId`, `filterId` and `sessionTimeoutSeconds` to standard RADIUS
|
|
41
|
+
attributes; vendor-specific attributes stay outside this contract.
|
|
42
|
+
- Match authorization result `requestId`, session command result `commandId`
|
|
43
|
+
and `sessionId` to the outstanding request or command before changing state.
|
|
44
|
+
- Copy the Soha authorization `sessionId` into the standard RADIUS `Class`
|
|
45
|
+
reply attribute and require NAS accounting to echo it as `sessionId` when
|
|
46
|
+
available. Session commands repeat the bound `subjectId` and `deviceId` so
|
|
47
|
+
the adapter can target CoA/Disconnect without querying management APIs.
|
|
48
|
+
- If a requested CoA is unsupported, issue a disconnect command when the NAS
|
|
49
|
+
binding supports it; otherwise fail closed and record the unsupported
|
|
50
|
+
enforcement result.
|
|
51
|
+
- For endpoint desired state, require every lease `deviceId` to match the
|
|
52
|
+
enrolled device bound to `runtimeId`.
|
|
53
|
+
- Require all leases in one desired state to belong to the expected session
|
|
54
|
+
and subject/device binding.
|
|
55
|
+
- Require lease `expiresAt` to be later than `issuedAt`, no later than the
|
|
56
|
+
enclosing message/configuration validity, and within the configured maximum
|
|
57
|
+
lease TTL.
|
|
58
|
+
- Apply only monotonically newer configuration versions. A rollback is a new
|
|
59
|
+
version whose content intentionally references a prior snapshot.
|
|
60
|
+
- Treat `runtimeIntervals` as optional scheduling guidance for backward
|
|
61
|
+
compatibility. When present, both heartbeat and configuration polling use
|
|
62
|
+
the same 30–300 second bounds; clients apply local ±20% jitter.
|
|
63
|
+
- Accept `vpn.connect.request` only from an enrolled endpoint bound to the
|
|
64
|
+
requested device. The selected site, NetworkSpace, gateway and NetworkLease
|
|
65
|
+
must all be active and authorized by the loaded policy snapshot.
|
|
66
|
+
- `vpn.connect.request.gatewayId` only selects an ingress gateway; it never
|
|
67
|
+
expands the requested site, NetworkSpace, resource or policy scope. When it
|
|
68
|
+
is omitted, the control plane may select an eligible gateway using the same
|
|
69
|
+
authorization checks.
|
|
70
|
+
- A gateway without `hubGatewayId` is a topology root. A gateway with
|
|
71
|
+
`hubGatewayId` is a routed spoke of that active root. Spokes may not point to
|
|
72
|
+
another spoke, use SNAT, or form direct spoke-to-spoke peers; traffic between
|
|
73
|
+
spokes transits the root.
|
|
74
|
+
- Every `advertisedCidrs` entry must be canonical, belong to an active
|
|
75
|
+
NetworkSpace at that gateway's site, and not overlap another active site or
|
|
76
|
+
gateway overlay prefix. A site link is transport authorization, not user or
|
|
77
|
+
resource authorization.
|
|
78
|
+
- WireGuard `allowedIPs` on an endpoint peer identify only that endpoint's
|
|
79
|
+
overlay address. A site peer may additionally carry the explicit overlay and
|
|
80
|
+
advertised prefixes of the remote topology members reachable through that
|
|
81
|
+
peer. Endpoint split routes still come only from active leases, and the
|
|
82
|
+
`0.0.0.0/0` default route is outside v1alpha1.
|
|
83
|
+
- Gateway firewall evaluation is ordered and default-deny. An exact active
|
|
84
|
+
ResourceLease allow precedes the matching ProtectedSet deny, which in turn
|
|
85
|
+
precedes a broader NetworkLease allow. Site-link rules carry
|
|
86
|
+
`siteLinkRuntimeId` plus an explicit direction and expire with the peer
|
|
87
|
+
credential; raw site LAN sources remain blocked from protected destinations.
|
|
88
|
+
- `routingMode=routed` requires the site LAN to route the overlay CIDR back to
|
|
89
|
+
the gateway. `routingMode=snat` is an explicit deployment fallback and does
|
|
90
|
+
not broaden any lease or firewall rule.
|
|
91
|
+
- Treat `credentialReference` only as an opaque runtime-local `secretref:`
|
|
92
|
+
identifier. It is never dereferenced by an untrusted caller and never
|
|
93
|
+
written to logs, telemetry or public responses.
|
|
94
|
+
- Validate ProtectedSet before NetworkLease coverage. A broad network lease
|
|
95
|
+
cannot authorize a protected resource without a valid ResourceLease.
|
|
96
|
+
|
|
97
|
+
## Managed VPN selection
|
|
98
|
+
|
|
99
|
+
- Endpoint capability `managed-vpn-v1` enables the additive
|
|
100
|
+
`vpn.managed.prepare.*` and `vpn.managed.connect.*` messages. Legacy explicit
|
|
101
|
+
scope requests retain their existing contract; absent managed capability
|
|
102
|
+
never means implicit permission to use `external_vpn`.
|
|
103
|
+
- Managed requests carry a short-lived intent ID/token bound to the enrolled
|
|
104
|
+
endpoint, authenticated user, published profile and selection-policy revisions.
|
|
105
|
+
The server resolves mode, site, space and resources; a caller cannot override
|
|
106
|
+
them. Prepare validates but does not consume the intent. A successful connection
|
|
107
|
+
consumes it atomically with the session and leases; replays cannot create a
|
|
108
|
+
second session. Tokens never enter audit logs or telemetry.
|
|
109
|
+
- Manual selection stays on the requested gateway unless the published policy
|
|
110
|
+
explicitly permits manual-to-auto fallback. Auto only ranks gateways that
|
|
111
|
+
reach the same authorized target scope. Final admission rechecks topology,
|
|
112
|
+
live credentials, policy and capacity under the connection transaction.
|
|
113
|
+
- Probe descriptors are authoritative control responses, bounded to 32 gateways,
|
|
114
|
+
10 samples, four concurrent requests and three seconds per request. Only fixed
|
|
115
|
+
HTTPS `/vpn/probe` targets are permitted; redirects and arbitrary caller URLs
|
|
116
|
+
are rejected. Gateway capability `vpn-probe-v1` enables `vpnProbe` verification
|
|
117
|
+
configuration. Probe tokens are endpoint- and gateway-bound and expire quickly.
|
|
118
|
+
- HTTPS RTT is entrance-probe latency, not WireGuard or application RTT. A failed
|
|
119
|
+
HTTPS sample is a failed probe, not evidence of packet loss. Missing or expired
|
|
120
|
+
samples are unknown, never zero latency.
|
|
121
|
+
- Gateway capability `vpn-metrics-v1` enables endpoint-peer `sessionId` and
|
|
122
|
+
`vpnProfileId` metadata. Site-link peers do not carry VPN user-session statistics.
|
|
123
|
+
|
|
124
|
+
## Ingest batches
|
|
125
|
+
|
|
126
|
+
- Authenticate `producerId` from the transport credential; do not trust the
|
|
127
|
+
body to select another producer.
|
|
128
|
+
- Deduplicate by `(producerId, event.id)` for the retention window. Exact
|
|
129
|
+
duplicate objects are rejected by schema, but duplicates with changed
|
|
130
|
+
payloads must also be rejected.
|
|
131
|
+
- Accept out-of-order `sequence` values as telemetry while recording gaps and
|
|
132
|
+
regressions. Sequence never changes authorization.
|
|
133
|
+
- Require flow `windowEndedAt` to be later than `windowStartedAt` and
|
|
134
|
+
`deniedConnections <= connections`.
|
|
135
|
+
- Reject events outside the configured clock-skew and retention window.
|
|
136
|
+
- Enforce HTTP body, decompressed body, event-count and per-producer rate
|
|
137
|
+
limits before persistence.
|
|
138
|
+
- Accounting and flow events are observability input only. They cannot create,
|
|
139
|
+
renew, broaden or revoke a NetworkLease or ResourceLease.
|
|
140
|
+
- `vpn.probe.batch` is endpoint-only and binds the intent, profile revision,
|
|
141
|
+
selection-policy revision, network epoch and measurement window. A successful
|
|
142
|
+
RTT sample count cannot exceed the number sent. Selection accepts only samples
|
|
143
|
+
from the intent's enrolled endpoint and approved candidate set.
|
|
144
|
+
- `vpn.tunnel.stats` is gateway-only. Upload is the ingress gateway's endpoint-peer
|
|
145
|
+
received-byte delta; download is its transmitted-byte delta. Session, endpoint,
|
|
146
|
+
profile, ingress gateway and counter epoch identify the sample. Exclude transit
|
|
147
|
+
site-link peers and never sum endpoint copies into gateway-authoritative totals.
|
|
148
|
+
- `vpn.gateway.health` is gateway-only, carries observed runtime readiness and
|
|
149
|
+
endpoint-peer count, and is not an administrator-supplied health override.
|
|
150
|
+
- VPN aggregate queries enforce trusted session/gateway bindings and authorized
|
|
151
|
+
scope before aggregation. Counters reset with a new epoch; absent data stays
|
|
152
|
+
absent. Quantiles must come from samples, not averages of per-gateway quantiles.
|
|
153
|
+
|
|
154
|
+
Consumers must cover these rules with deterministic tests. Failure is
|
|
155
|
+
fail-closed for control messages and bounded reject/drop-with-counter behavior
|
|
156
|
+
for telemetry.
|
|
@@ -0,0 +1,415 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://contracts.opensoha.dev/network/network-ingest-event.schema.json",
|
|
4
|
+
"title": "OpenSoha Network Ingest Event Batch",
|
|
5
|
+
"description": "Strict bounded telemetry batches for runtime heartbeat, RADIUS Accounting, flow aggregates and connection summaries. Ingest events are not authorization facts.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["schemaVersion", "batchId", "producerId", "producerKind", "sentAt", "events"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"schemaVersion": { "const": "network-ingest/v1alpha1" },
|
|
11
|
+
"batchId": { "$ref": "#/$defs/Identifier" },
|
|
12
|
+
"producerId": { "$ref": "#/$defs/Identifier" },
|
|
13
|
+
"producerKind": { "enum": ["endpoint", "gateway", "freeradius", "network-control"] },
|
|
14
|
+
"sentAt": { "type": "string", "format": "date-time" },
|
|
15
|
+
"events": {
|
|
16
|
+
"type": "array",
|
|
17
|
+
"minItems": 1,
|
|
18
|
+
"maxItems": 1000,
|
|
19
|
+
"uniqueItems": true,
|
|
20
|
+
"items": { "$ref": "#/$defs/Event" }
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"$defs": {
|
|
24
|
+
"VPNProbeBatch": {
|
|
25
|
+
"type": "object",
|
|
26
|
+
"additionalProperties": false,
|
|
27
|
+
"required": [
|
|
28
|
+
"intentId",
|
|
29
|
+
"profileId",
|
|
30
|
+
"profileRevision",
|
|
31
|
+
"selectionPolicyRevision",
|
|
32
|
+
"batchId",
|
|
33
|
+
"networkEpoch",
|
|
34
|
+
"windowStartedAt",
|
|
35
|
+
"windowEndedAt",
|
|
36
|
+
"results"
|
|
37
|
+
],
|
|
38
|
+
"properties": {
|
|
39
|
+
"intentId": {
|
|
40
|
+
"$ref": "#/$defs/Identifier"
|
|
41
|
+
},
|
|
42
|
+
"profileId": {
|
|
43
|
+
"$ref": "#/$defs/Identifier"
|
|
44
|
+
},
|
|
45
|
+
"profileRevision": {
|
|
46
|
+
"type": "integer",
|
|
47
|
+
"minimum": 1
|
|
48
|
+
},
|
|
49
|
+
"selectionPolicyRevision": {
|
|
50
|
+
"type": "integer",
|
|
51
|
+
"minimum": 1
|
|
52
|
+
},
|
|
53
|
+
"batchId": {
|
|
54
|
+
"$ref": "#/$defs/Identifier"
|
|
55
|
+
},
|
|
56
|
+
"networkEpoch": {
|
|
57
|
+
"$ref": "#/$defs/Identifier"
|
|
58
|
+
},
|
|
59
|
+
"windowStartedAt": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"format": "date-time"
|
|
62
|
+
},
|
|
63
|
+
"windowEndedAt": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"format": "date-time"
|
|
66
|
+
},
|
|
67
|
+
"results": {
|
|
68
|
+
"type": "array",
|
|
69
|
+
"minItems": 1,
|
|
70
|
+
"maxItems": 32,
|
|
71
|
+
"items": {
|
|
72
|
+
"type": "object",
|
|
73
|
+
"additionalProperties": false,
|
|
74
|
+
"required": [
|
|
75
|
+
"gatewayId",
|
|
76
|
+
"sentCount",
|
|
77
|
+
"rttSamplesMs"
|
|
78
|
+
],
|
|
79
|
+
"properties": {
|
|
80
|
+
"gatewayId": {
|
|
81
|
+
"$ref": "#/$defs/Identifier"
|
|
82
|
+
},
|
|
83
|
+
"sentCount": {
|
|
84
|
+
"type": "integer",
|
|
85
|
+
"minimum": 1,
|
|
86
|
+
"maximum": 10
|
|
87
|
+
},
|
|
88
|
+
"rttSamplesMs": {
|
|
89
|
+
"type": "array",
|
|
90
|
+
"minItems": 0,
|
|
91
|
+
"maxItems": 10,
|
|
92
|
+
"items": {
|
|
93
|
+
"type": "number",
|
|
94
|
+
"minimum": 0,
|
|
95
|
+
"maximum": 10000
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"VPNTunnelStats": {
|
|
104
|
+
"type": "object",
|
|
105
|
+
"additionalProperties": false,
|
|
106
|
+
"required": [
|
|
107
|
+
"sessionId",
|
|
108
|
+
"profileId",
|
|
109
|
+
"gatewayId",
|
|
110
|
+
"endpointRuntimeId",
|
|
111
|
+
"epoch",
|
|
112
|
+
"windowStartedAt",
|
|
113
|
+
"windowEndedAt",
|
|
114
|
+
"uploadBytes",
|
|
115
|
+
"downloadBytes"
|
|
116
|
+
],
|
|
117
|
+
"properties": {
|
|
118
|
+
"sessionId": {
|
|
119
|
+
"$ref": "#/$defs/Identifier"
|
|
120
|
+
},
|
|
121
|
+
"profileId": {
|
|
122
|
+
"$ref": "#/$defs/Identifier"
|
|
123
|
+
},
|
|
124
|
+
"gatewayId": {
|
|
125
|
+
"$ref": "#/$defs/Identifier"
|
|
126
|
+
},
|
|
127
|
+
"endpointRuntimeId": {
|
|
128
|
+
"$ref": "#/$defs/Identifier"
|
|
129
|
+
},
|
|
130
|
+
"epoch": {
|
|
131
|
+
"$ref": "#/$defs/Identifier"
|
|
132
|
+
},
|
|
133
|
+
"windowStartedAt": {
|
|
134
|
+
"type": "string",
|
|
135
|
+
"format": "date-time"
|
|
136
|
+
},
|
|
137
|
+
"windowEndedAt": {
|
|
138
|
+
"type": "string",
|
|
139
|
+
"format": "date-time"
|
|
140
|
+
},
|
|
141
|
+
"uploadBytes": {
|
|
142
|
+
"type": "integer",
|
|
143
|
+
"minimum": 0,
|
|
144
|
+
"maximum": 9007199254740991
|
|
145
|
+
},
|
|
146
|
+
"downloadBytes": {
|
|
147
|
+
"type": "integer",
|
|
148
|
+
"minimum": 0,
|
|
149
|
+
"maximum": 9007199254740991
|
|
150
|
+
},
|
|
151
|
+
"lastHandshakeAt": {
|
|
152
|
+
"type": "string",
|
|
153
|
+
"format": "date-time"
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
"VPNGatewayHealth": {
|
|
158
|
+
"type": "object",
|
|
159
|
+
"additionalProperties": false,
|
|
160
|
+
"required": [
|
|
161
|
+
"gatewayId",
|
|
162
|
+
"ready",
|
|
163
|
+
"activeEndpointPeers",
|
|
164
|
+
"configurationVersion",
|
|
165
|
+
"observedAt"
|
|
166
|
+
],
|
|
167
|
+
"properties": {
|
|
168
|
+
"gatewayId": {
|
|
169
|
+
"$ref": "#/$defs/Identifier"
|
|
170
|
+
},
|
|
171
|
+
"ready": {
|
|
172
|
+
"type": "boolean"
|
|
173
|
+
},
|
|
174
|
+
"activeEndpointPeers": {
|
|
175
|
+
"type": "integer",
|
|
176
|
+
"minimum": 0,
|
|
177
|
+
"maximum": 1000000
|
|
178
|
+
},
|
|
179
|
+
"configurationVersion": {
|
|
180
|
+
"type": "integer",
|
|
181
|
+
"minimum": 0
|
|
182
|
+
},
|
|
183
|
+
"observedAt": {
|
|
184
|
+
"type": "string",
|
|
185
|
+
"format": "date-time"
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
"Identifier": {
|
|
190
|
+
"type": "string",
|
|
191
|
+
"minLength": 1,
|
|
192
|
+
"maxLength": 128,
|
|
193
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
|
|
194
|
+
},
|
|
195
|
+
"Event": {
|
|
196
|
+
"type": "object",
|
|
197
|
+
"additionalProperties": false,
|
|
198
|
+
"required": ["id", "type", "sequence", "occurredAt", "payload"],
|
|
199
|
+
"properties": {
|
|
200
|
+
"id": { "$ref": "#/$defs/Identifier" },
|
|
201
|
+
"type": {
|
|
202
|
+
"enum": [
|
|
203
|
+
"vpn.probe.batch",
|
|
204
|
+
"vpn.tunnel.stats",
|
|
205
|
+
"vpn.gateway.health",
|
|
206
|
+
"runtime.heartbeat",
|
|
207
|
+
"radius.accounting",
|
|
208
|
+
"network.flow.aggregate",
|
|
209
|
+
"network.connection.summary",
|
|
210
|
+
"proxy.flow.aggregate"
|
|
211
|
+
]
|
|
212
|
+
},
|
|
213
|
+
"sequence": { "type": "integer", "minimum": 0 },
|
|
214
|
+
"occurredAt": { "type": "string", "format": "date-time" },
|
|
215
|
+
"payload": {
|
|
216
|
+
"oneOf": [
|
|
217
|
+
{ "$ref": "#/$defs/VPNProbeBatch" },
|
|
218
|
+
{ "$ref": "#/$defs/VPNTunnelStats" },
|
|
219
|
+
{ "$ref": "#/$defs/VPNGatewayHealth" },
|
|
220
|
+
{ "$ref": "#/$defs/Heartbeat" },
|
|
221
|
+
{ "$ref": "#/$defs/RadiusAccounting" },
|
|
222
|
+
{ "$ref": "#/$defs/FlowAggregate" },
|
|
223
|
+
{ "$ref": "#/$defs/ConnectionSummary" },
|
|
224
|
+
{ "$ref": "#/$defs/ProxyFlowAggregate" }
|
|
225
|
+
]
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
"allOf": [
|
|
229
|
+
{
|
|
230
|
+
"if": {
|
|
231
|
+
"properties": {
|
|
232
|
+
"type": {
|
|
233
|
+
"const": "vpn.probe.batch"
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
"required": [
|
|
237
|
+
"type"
|
|
238
|
+
]
|
|
239
|
+
},
|
|
240
|
+
"then": {
|
|
241
|
+
"properties": {
|
|
242
|
+
"payload": {
|
|
243
|
+
"$ref": "#/$defs/VPNProbeBatch"
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
"if": {
|
|
250
|
+
"properties": {
|
|
251
|
+
"type": {
|
|
252
|
+
"const": "vpn.tunnel.stats"
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
"required": [
|
|
256
|
+
"type"
|
|
257
|
+
]
|
|
258
|
+
},
|
|
259
|
+
"then": {
|
|
260
|
+
"properties": {
|
|
261
|
+
"payload": {
|
|
262
|
+
"$ref": "#/$defs/VPNTunnelStats"
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"if": {
|
|
269
|
+
"properties": {
|
|
270
|
+
"type": {
|
|
271
|
+
"const": "vpn.gateway.health"
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
"required": [
|
|
275
|
+
"type"
|
|
276
|
+
]
|
|
277
|
+
},
|
|
278
|
+
"then": {
|
|
279
|
+
"properties": {
|
|
280
|
+
"payload": {
|
|
281
|
+
"$ref": "#/$defs/VPNGatewayHealth"
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"if": { "properties": { "type": { "const": "runtime.heartbeat" } }, "required": ["type"] },
|
|
288
|
+
"then": { "properties": { "payload": { "$ref": "#/$defs/Heartbeat" } } }
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
"if": { "properties": { "type": { "const": "radius.accounting" } }, "required": ["type"] },
|
|
292
|
+
"then": { "properties": { "payload": { "$ref": "#/$defs/RadiusAccounting" } } }
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"if": { "properties": { "type": { "const": "network.flow.aggregate" } }, "required": ["type"] },
|
|
296
|
+
"then": { "properties": { "payload": { "$ref": "#/$defs/FlowAggregate" } } }
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
"if": { "properties": { "type": { "const": "network.connection.summary" } }, "required": ["type"] },
|
|
300
|
+
"then": { "properties": { "payload": { "$ref": "#/$defs/ConnectionSummary" } } }
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"if": { "properties": { "type": { "const": "proxy.flow.aggregate" } }, "required": ["type"] },
|
|
304
|
+
"then": { "properties": { "payload": { "$ref": "#/$defs/ProxyFlowAggregate" } } }
|
|
305
|
+
}
|
|
306
|
+
]
|
|
307
|
+
},
|
|
308
|
+
"Heartbeat": {
|
|
309
|
+
"type": "object",
|
|
310
|
+
"additionalProperties": false,
|
|
311
|
+
"required": ["status", "configurationVersion", "policyVersion", "uptimeSeconds"],
|
|
312
|
+
"properties": {
|
|
313
|
+
"status": { "enum": ["healthy", "degraded", "unhealthy"] },
|
|
314
|
+
"configurationVersion": { "type": "integer", "minimum": 0 },
|
|
315
|
+
"policyVersion": { "type": "integer", "minimum": 0 },
|
|
316
|
+
"uptimeSeconds": { "type": "integer", "minimum": 0 },
|
|
317
|
+
"diagnostics": {
|
|
318
|
+
"type": "array",
|
|
319
|
+
"maxItems": 32,
|
|
320
|
+
"uniqueItems": true,
|
|
321
|
+
"items": { "type": "string", "minLength": 1, "maxLength": 128 }
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
"RadiusAccounting": {
|
|
326
|
+
"type": "object",
|
|
327
|
+
"additionalProperties": false,
|
|
328
|
+
"required": ["statusType", "accountingSessionId", "nasId", "sessionTimeSeconds"],
|
|
329
|
+
"properties": {
|
|
330
|
+
"statusType": { "enum": ["start", "interim-update", "stop", "accounting-on", "accounting-off"] },
|
|
331
|
+
"accountingSessionId": { "$ref": "#/$defs/Identifier" },
|
|
332
|
+
"sessionId": { "$ref": "#/$defs/Identifier" },
|
|
333
|
+
"nasId": { "$ref": "#/$defs/Identifier" },
|
|
334
|
+
"nasPortId": { "type": "string", "minLength": 1, "maxLength": 128 },
|
|
335
|
+
"userId": { "$ref": "#/$defs/Identifier" },
|
|
336
|
+
"deviceId": { "$ref": "#/$defs/Identifier" },
|
|
337
|
+
"sessionTimeSeconds": { "type": "integer", "minimum": 0 },
|
|
338
|
+
"inputOctets": { "type": "integer", "minimum": 0 },
|
|
339
|
+
"outputOctets": { "type": "integer", "minimum": 0 },
|
|
340
|
+
"inputPackets": { "type": "integer", "minimum": 0 },
|
|
341
|
+
"outputPackets": { "type": "integer", "minimum": 0 },
|
|
342
|
+
"terminationCause": { "type": "string", "minLength": 1, "maxLength": 128 }
|
|
343
|
+
}
|
|
344
|
+
},
|
|
345
|
+
"FlowAggregate": {
|
|
346
|
+
"type": "object",
|
|
347
|
+
"additionalProperties": false,
|
|
348
|
+
"required": [
|
|
349
|
+
"windowStartedAt",
|
|
350
|
+
"windowEndedAt",
|
|
351
|
+
"sessionId",
|
|
352
|
+
"resourceId",
|
|
353
|
+
"direction",
|
|
354
|
+
"protocol",
|
|
355
|
+
"bytes",
|
|
356
|
+
"packets",
|
|
357
|
+
"connections",
|
|
358
|
+
"deniedConnections"
|
|
359
|
+
],
|
|
360
|
+
"properties": {
|
|
361
|
+
"windowStartedAt": { "type": "string", "format": "date-time" },
|
|
362
|
+
"windowEndedAt": { "type": "string", "format": "date-time" },
|
|
363
|
+
"sessionId": { "$ref": "#/$defs/Identifier" },
|
|
364
|
+
"resourceId": { "$ref": "#/$defs/Identifier" },
|
|
365
|
+
"direction": { "enum": ["ingress", "egress"] },
|
|
366
|
+
"protocol": { "enum": ["tcp", "udp", "icmp", "other"] },
|
|
367
|
+
"bytes": { "type": "integer", "minimum": 0 },
|
|
368
|
+
"packets": { "type": "integer", "minimum": 0 },
|
|
369
|
+
"connections": { "type": "integer", "minimum": 0 },
|
|
370
|
+
"deniedConnections": { "type": "integer", "minimum": 0 }
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
"ConnectionSummary": {
|
|
374
|
+
"type": "object",
|
|
375
|
+
"additionalProperties": false,
|
|
376
|
+
"required": ["sessionId", "resourceId", "protocol", "destinationPort", "state", "reasonCode"],
|
|
377
|
+
"properties": {
|
|
378
|
+
"sessionId": { "$ref": "#/$defs/Identifier" },
|
|
379
|
+
"resourceId": { "$ref": "#/$defs/Identifier" },
|
|
380
|
+
"protocol": { "enum": ["tcp", "udp", "icmp", "other"] },
|
|
381
|
+
"destinationPort": { "type": "integer", "minimum": 0, "maximum": 65535 },
|
|
382
|
+
"state": { "enum": ["opened", "closed", "denied"] },
|
|
383
|
+
"reasonCode": { "type": "string", "minLength": 1, "maxLength": 128 }
|
|
384
|
+
}
|
|
385
|
+
},
|
|
386
|
+
"ProxyFlowAggregate": {
|
|
387
|
+
"type": "object",
|
|
388
|
+
"additionalProperties": false,
|
|
389
|
+
"required": [
|
|
390
|
+
"windowStartedAt",
|
|
391
|
+
"windowEndedAt",
|
|
392
|
+
"engine",
|
|
393
|
+
"profileId",
|
|
394
|
+
"profileRevision",
|
|
395
|
+
"mode",
|
|
396
|
+
"selectedProxy",
|
|
397
|
+
"uploadBytes",
|
|
398
|
+
"downloadBytes",
|
|
399
|
+
"activeConnections"
|
|
400
|
+
],
|
|
401
|
+
"properties": {
|
|
402
|
+
"windowStartedAt": { "type": "string", "format": "date-time" },
|
|
403
|
+
"windowEndedAt": { "type": "string", "format": "date-time" },
|
|
404
|
+
"engine": { "const": "mihomo" },
|
|
405
|
+
"profileId": { "$ref": "#/$defs/Identifier" },
|
|
406
|
+
"profileRevision": { "type": "integer", "minimum": 1 },
|
|
407
|
+
"mode": { "enum": ["managed_follow", "app_subscription"] },
|
|
408
|
+
"selectedProxy": { "type": "string", "minLength": 1, "maxLength": 128 },
|
|
409
|
+
"uploadBytes": { "type": "integer", "minimum": 0, "maximum": 9223372036854775807 },
|
|
410
|
+
"downloadBytes": { "type": "integer", "minimum": 0, "maximum": 9223372036854775807 },
|
|
411
|
+
"activeConnections": { "type": "integer", "minimum": 0, "maximum": 1000000 }
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://contracts.opensoha.dev/network/network-radius-accounting.schema.json",
|
|
4
|
+
"title": "OpenSoha FreeRADIUS Accounting Adapter Request",
|
|
5
|
+
"description": "A strict credential-free request converted by soha-ingest into one canonical radius.accounting event.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": [
|
|
9
|
+
"schemaVersion",
|
|
10
|
+
"eventTimestamp",
|
|
11
|
+
"statusType",
|
|
12
|
+
"accountingSessionId",
|
|
13
|
+
"nasId",
|
|
14
|
+
"sessionTimeSeconds"
|
|
15
|
+
],
|
|
16
|
+
"properties": {
|
|
17
|
+
"schemaVersion": { "const": "network-radius-accounting/v1alpha1" },
|
|
18
|
+
"eventTimestamp": { "type": "integer", "minimum": 1, "maximum": 253402300799 },
|
|
19
|
+
"statusType": { "enum": ["start", "interim-update", "stop", "accounting-on", "accounting-off"] },
|
|
20
|
+
"accountingSessionId": { "$ref": "#/$defs/Identifier" },
|
|
21
|
+
"sessionId": { "$ref": "#/$defs/Identifier" },
|
|
22
|
+
"nasId": { "$ref": "#/$defs/Identifier" },
|
|
23
|
+
"nasPortId": { "type": "string", "minLength": 1, "maxLength": 128 },
|
|
24
|
+
"userId": { "$ref": "#/$defs/Identifier" },
|
|
25
|
+
"deviceId": { "$ref": "#/$defs/Identifier" },
|
|
26
|
+
"sessionTimeSeconds": { "type": "integer", "minimum": 0 },
|
|
27
|
+
"inputOctets": { "type": "integer", "minimum": 0 },
|
|
28
|
+
"outputOctets": { "type": "integer", "minimum": 0 },
|
|
29
|
+
"inputPackets": { "type": "integer", "minimum": 0 },
|
|
30
|
+
"outputPackets": { "type": "integer", "minimum": 0 },
|
|
31
|
+
"terminationCause": { "type": "string", "minLength": 1, "maxLength": 128 }
|
|
32
|
+
},
|
|
33
|
+
"$defs": {
|
|
34
|
+
"Identifier": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"minLength": 1,
|
|
37
|
+
"maxLength": 128,
|
|
38
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|