@opensoha/contracts 0.1.27 → 0.2.0
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 +141 -16
- package/README.md +153 -50
- package/agent/agent-protocol.schema.json +2 -2
- package/agent/dsh-runtime.README.md +207 -0
- package/agent/dsh-runtime.schema.json +1165 -0
- package/agent/environment/mcp_stdio.go +30 -0
- package/agent/guest/runtime.go +1 -1
- package/agent/guest/runtime_test.go +1 -1
- package/auth/catalog_generated.go +2 -2
- package/auth/docker_permissions_test.go +44 -0
- package/auth/permission-catalog.json +65 -1
- package/auth/radius_permissions_test.go +44 -0
- package/compat/consumer-revisions.json +6 -6
- package/compat/json-schema-ecosystem-0.1.0.json +1 -1
- package/compat/openapi-loose-boundaries-0.1.0.json +5 -1
- package/docker/runtime/compose.go +128 -0
- package/docker/runtime/compose_replicas_test.go +20 -0
- package/docker/runtime/container_set.go +50 -0
- package/docker/runtime/container_set_test.go +31 -0
- package/docker/runtime/identity.go +130 -0
- package/docker/runtime/identity_test.go +91 -0
- package/docker/runtime/read.go +141 -0
- package/docker/runtime/read_result.go +93 -0
- package/docker/runtime/read_result_test.go +111 -0
- package/docker/runtime/read_test.go +63 -0
- package/docker/runtime/terminal.go +86 -0
- package/docker/runtime/terminal_test.go +50 -0
- package/examples/relations_compat_test.go +1 -1
- package/fixtures/json-schema/agent-protocol/valid/dsh-agent-status.json +17 -0
- package/fixtures/json-schema/docker-container-identity/invalid/name-instead-of-id.json +8 -0
- package/fixtures/json-schema/docker-container-identity/invalid/short-id.json +8 -0
- package/fixtures/json-schema/docker-container-identity/invalid/unknown-field.json +9 -0
- package/fixtures/json-schema/docker-container-identity/invalid/unsafe-service.json +8 -0
- package/fixtures/json-schema/docker-container-identity/valid/bound-container.json +8 -0
- package/fixtures/json-schema/docker-project-identity/invalid/injected-field.json +7 -0
- package/fixtures/json-schema/docker-project-identity/invalid/invalid-uid.json +6 -0
- package/fixtures/json-schema/docker-project-identity/invalid/legacy-protocol.json +6 -0
- package/fixtures/json-schema/docker-project-identity/invalid/nil-uid.json +6 -0
- package/fixtures/json-schema/docker-project-identity/invalid/slug-namespace.json +6 -0
- package/fixtures/json-schema/docker-project-identity/valid/bound-project.json +6 -0
- package/fixtures/json-schema/docker-runtime-read/invalid/1.json +14 -0
- package/fixtures/json-schema/docker-runtime-read/invalid/2.json +14 -0
- package/fixtures/json-schema/docker-runtime-read/invalid/3.json +14 -0
- package/fixtures/json-schema/docker-runtime-read/invalid/4.json +16 -0
- package/fixtures/json-schema/docker-runtime-read/invalid/5.json +14 -0
- package/fixtures/json-schema/docker-runtime-read/invalid/6.json +15 -0
- package/fixtures/json-schema/docker-runtime-read/invalid/7.json +15 -0
- package/fixtures/json-schema/docker-runtime-read/valid/1.json +14 -0
- package/fixtures/json-schema/docker-runtime-read/valid/2.json +14 -0
- package/fixtures/json-schema/docker-runtime-read/valid/3.json +17 -0
- package/fixtures/json-schema/docker-runtime-read/valid/4.json +17 -0
- package/fixtures/json-schema/docker-runtime-read-result/invalid/contradictory-completeness.json +21 -0
- package/fixtures/json-schema/docker-runtime-read-result/invalid/host-source-leak.json +28 -0
- package/fixtures/json-schema/docker-runtime-read-result/invalid/missing-files.json +20 -0
- package/fixtures/json-schema/docker-runtime-read-result/invalid/unsupported-browse.json +27 -0
- package/fixtures/json-schema/docker-runtime-read-result/valid/logs.json +21 -0
- package/fixtures/json-schema/docker-runtime-read-result/valid/volumes.json +27 -0
- package/fixtures/json-schema/dsh-runtime/invalid/assembly-report-credential.json +21 -0
- package/fixtures/json-schema/dsh-runtime/invalid/attempt-zero.json +18 -0
- package/fixtures/json-schema/dsh-runtime/invalid/bad-deadline.json +18 -0
- package/fixtures/json-schema/dsh-runtime/invalid/bad-hash.json +18 -0
- package/fixtures/json-schema/dsh-runtime/invalid/event-delta-missing.json +10 -0
- package/fixtures/json-schema/dsh-runtime/invalid/event-grant.json +12 -0
- package/fixtures/json-schema/dsh-runtime/invalid/event-sequence-zero.json +12 -0
- package/fixtures/json-schema/dsh-runtime/invalid/fence-zero.json +18 -0
- package/fixtures/json-schema/dsh-runtime/invalid/health-unknown-field.json +12 -0
- package/fixtures/json-schema/dsh-runtime/invalid/output-budget-zero.json +18 -0
- package/fixtures/json-schema/dsh-runtime/invalid/receipt-grant.json +12 -0
- package/fixtures/json-schema/dsh-runtime/invalid/start-assembly-url.json +32 -0
- package/fixtures/json-schema/dsh-runtime/invalid/start-chat-write-tool.json +38 -0
- package/fixtures/json-schema/dsh-runtime/invalid/start-client-base-url.json +19 -0
- package/fixtures/json-schema/dsh-runtime/invalid/start-client-callback.json +19 -0
- package/fixtures/json-schema/dsh-runtime/invalid/start-missing-readonly.json +37 -0
- package/fixtures/json-schema/dsh-runtime/invalid/status-grant.json +19 -0
- package/fixtures/json-schema/dsh-runtime/invalid/status-usage-missing.json +13 -0
- package/fixtures/json-schema/dsh-runtime/invalid/status-usage-unknown.json +18 -0
- package/fixtures/json-schema/dsh-runtime/invalid/tool-call-missing-call-id.json +13 -0
- package/fixtures/json-schema/dsh-runtime/invalid/tool-result-missing-hash.json +13 -0
- package/fixtures/json-schema/dsh-runtime/invalid/union-extra-field.json +12 -0
- package/fixtures/json-schema/dsh-runtime/invalid/unsupported-version.json +18 -0
- package/fixtures/json-schema/dsh-runtime/valid/assembly-decision.json +21 -0
- package/fixtures/json-schema/dsh-runtime/valid/assembly-report-mcp.json +34 -0
- package/fixtures/json-schema/dsh-runtime/valid/assembly-report.json +20 -0
- package/fixtures/json-schema/dsh-runtime/valid/cancel.json +8 -0
- package/fixtures/json-schema/dsh-runtime/valid/event-delta.json +12 -0
- package/fixtures/json-schema/dsh-runtime/valid/event-hook-observed.json +14 -0
- package/fixtures/json-schema/dsh-runtime/valid/event-terminal.json +13 -0
- package/fixtures/json-schema/dsh-runtime/valid/health.json +11 -0
- package/fixtures/json-schema/dsh-runtime/valid/receipt.json +11 -0
- package/fixtures/json-schema/dsh-runtime/valid/start-assembly.json +31 -0
- package/fixtures/json-schema/dsh-runtime/valid/start-chat.json +18 -0
- package/fixtures/json-schema/dsh-runtime/valid/start-heya.json +38 -0
- package/fixtures/json-schema/dsh-runtime/valid/status-completed.json +18 -0
- package/fixtures/json-schema/dsh-runtime/valid/status-unknown.json +13 -0
- package/fixtures/json-schema/dsh-runtime/valid/tool-call.json +1 -0
- package/fixtures/json-schema/dsh-runtime/valid/tool-result-denied.json +15 -0
- package/fixtures/json-schema/dsh-runtime/valid/tool-result.json +14 -0
- package/fixtures/json-schema/memory-policy/invalid/invalid-mode.json +17 -0
- package/fixtures/json-schema/memory-policy/valid/scoped.json +17 -0
- package/fixtures/json-schema/memory-record/invalid/invalid-source-hash.json +21 -0
- package/fixtures/json-schema/memory-record/invalid/invalid-sync-status.json +21 -0
- package/fixtures/json-schema/memory-record/invalid/quarantine-reason-too-long.json +23 -0
- package/fixtures/json-schema/memory-record/valid/quarantined.json +23 -0
- package/fixtures/json-schema/memory-record/valid/synced.json +21 -0
- package/fixtures/json-schema/network-ingest-event/invalid/proxy-runtime-epoch-without-sequence.json +23 -0
- package/fixtures/json-schema/network-ingest-event/invalid/proxy-runtime-unsafe-sequence.json +24 -0
- package/fixtures/json-schema/network-ingest-event/valid/proxy-runtime-epoch.json +24 -0
- package/fixtures/json-schema/network-runtime-protocol/invalid/eap-activate-partial-profile.json +16 -0
- package/fixtures/json-schema/network-runtime-protocol/invalid/eap-revoke-other-kind.json +16 -0
- package/fixtures/json-schema/network-runtime-protocol/invalid/enrollment-duplicate-capability.json +30 -0
- package/fixtures/json-schema/network-runtime-protocol/invalid/enrollment-unknown-capability.json +30 -0
- package/fixtures/json-schema/network-runtime-protocol/invalid/legacy-with-proof.json +19 -0
- package/fixtures/json-schema/network-runtime-protocol/invalid/ttls-certificate.json +42 -0
- package/fixtures/json-schema/network-runtime-protocol/invalid/ttls-device-override.json +19 -0
- package/fixtures/json-schema/network-runtime-protocol/invalid/ttls-no-proof.json +17 -0
- package/fixtures/json-schema/network-runtime-protocol/invalid/ttls-nonstation-identity.json +18 -0
- package/fixtures/json-schema/network-runtime-protocol/invalid/ttls-profile-without-pap.json +40 -0
- package/fixtures/json-schema/network-runtime-protocol/valid/app-default-enrollment.json +29 -0
- package/fixtures/json-schema/network-runtime-protocol/valid/app-mihomo-enrollment.json +32 -0
- package/fixtures/json-schema/network-runtime-protocol/valid/eap-activate-profile.json +17 -0
- package/fixtures/json-schema/network-runtime-protocol/valid/eap-revoke-result.json +16 -0
- package/fixtures/json-schema/network-runtime-protocol/valid/eap-revoke.json +16 -0
- package/fixtures/json-schema/network-runtime-protocol/valid/proxy-default-enrollment.json +23 -0
- package/fixtures/json-schema/network-runtime-protocol/valid/ttls-authorization.json +18 -0
- package/fixtures/json-schema/network-runtime-protocol/valid/ttls-profile-enrollment.json +23 -0
- package/fixtures/json-schema/network-runtime-protocol/valid/ttls-profile.json +41 -0
- package/fixtures/json-schema/proxy-adapter/invalid/apply-incomplete-result.json +11 -0
- package/fixtures/json-schema/proxy-adapter/invalid/close-incomplete-result.json +9 -0
- package/fixtures/json-schema/proxy-adapter/invalid/handshake-incomplete-result.json +11 -0
- package/fixtures/json-schema/proxy-adapter/invalid/invalid-method.json +11 -0
- package/fixtures/json-schema/proxy-adapter/invalid/major.json +11 -0
- package/fixtures/json-schema/proxy-adapter/invalid/missing-challenge.json +9 -0
- package/fixtures/json-schema/proxy-adapter/invalid/multiple-outcomes.json +12 -0
- package/fixtures/json-schema/proxy-adapter/invalid/observe-incomplete-result.json +9 -0
- package/fixtures/json-schema/proxy-adapter/invalid/unknown-field.json +12 -0
- package/fixtures/json-schema/proxy-adapter/valid/apply-result.json +12 -0
- package/fixtures/json-schema/proxy-adapter/valid/close-result.json +11 -0
- package/fixtures/json-schema/proxy-adapter/valid/handshake-result.json +19 -0
- package/fixtures/json-schema/proxy-adapter/valid/handshake.json +11 -0
- package/fixtures/json-schema/proxy-adapter/valid/observe-result.json +20 -0
- package/fixtures/json-schema/proxy-runtime/invalid/deployment-stop-accepting.json +19 -0
- package/fixtures/json-schema/proxy-runtime/invalid/deployment-stopped-unknown.json +21 -0
- package/fixtures/json-schema/proxy-runtime/invalid/duplicate-capability.json +20 -0
- package/fixtures/json-schema/proxy-runtime/invalid/guarded-udp-unknown.json +19 -0
- package/fixtures/json-schema/proxy-runtime/invalid/ingress-check-cross-payload.json +9 -0
- package/fixtures/json-schema/proxy-runtime/invalid/ingress-check-result-cross-payload.json +9 -0
- package/fixtures/json-schema/proxy-runtime/invalid/publication-ready-cross-payload.json +9 -0
- package/fixtures/json-schema/proxy-runtime/invalid/unknown-field.json +18 -0
- package/fixtures/json-schema/proxy-runtime/valid/deployment-process-stopped.json +21 -0
- package/fixtures/json-schema/proxy-runtime/valid/deployment-stop-required.json +19 -0
- package/fixtures/json-schema/proxy-runtime/valid/guarded-udp.json +20 -0
- package/fixtures/json-schema/proxy-runtime/valid/ingress-check-result.json +15 -0
- package/fixtures/json-schema/proxy-runtime/valid/ingress-check.json +18 -0
- package/fixtures/json-schema/proxy-runtime/valid/management-capabilities.json +26 -0
- package/fixtures/json-schema/proxy-runtime/valid/observation.json +17 -0
- package/fixtures/json-schema/proxy-runtime/valid/publication-ready.json +16 -0
- package/fixtures/json-schema/radius-password-verifier/invalid/bare-pap.json +9 -0
- package/fixtures/json-schema/radius-password-verifier/invalid/empty-password.json +9 -0
- package/fixtures/json-schema/radius-password-verifier/invalid/enumeration.json +4 -0
- package/fixtures/json-schema/radius-password-verifier/invalid/failure-with-subject.json +5 -0
- package/fixtures/json-schema/radius-password-verifier/invalid/invalid-station.json +9 -0
- package/fixtures/json-schema/radius-password-verifier/invalid/radius-xlat.json +16 -0
- package/fixtures/json-schema/radius-password-verifier/invalid/raw-password.json +10 -0
- package/fixtures/json-schema/radius-password-verifier/invalid/success-without-receipt.json +5 -0
- package/fixtures/json-schema/radius-password-verifier/invalid/too-long.json +9 -0
- package/fixtures/json-schema/radius-password-verifier/invalid/url-base64.json +9 -0
- package/fixtures/json-schema/radius-password-verifier/invalid/wrong-method.json +9 -0
- package/fixtures/json-schema/radius-password-verifier/valid/failure.json +4 -0
- package/fixtures/json-schema/radius-password-verifier/valid/radius-success.json +16 -0
- package/fixtures/json-schema/radius-password-verifier/valid/request.json +9 -0
- package/fixtures/json-schema/radius-password-verifier/valid/success.json +6 -0
- package/fixtures/json-schema/radius-runtime/invalid/control-with-secret.json +30 -0
- package/fixtures/json-schema/radius-runtime/invalid/known-null.json +21 -0
- package/fixtures/json-schema/radius-runtime/invalid/known-without-count.json +20 -0
- package/fixtures/json-schema/radius-runtime/invalid/stopped-still-accepting.json +21 -0
- package/fixtures/json-schema/radius-runtime/invalid/stopped-with-live-state.json +21 -0
- package/fixtures/json-schema/radius-runtime/invalid/unknown-with-zero.json +21 -0
- package/fixtures/json-schema/radius-runtime/valid/bootstrap-control.json +29 -0
- package/fixtures/json-schema/radius-runtime/valid/known-zero.json +21 -0
- package/fixtures/json-schema/radius-runtime/valid/owned-child-stopped.json +21 -0
- package/fixtures/json-schema/radius-runtime/valid/unknown-state.json +20 -0
- package/fixtures/openapi/AIMemoryPolicy/invalid/invalid-mode.json +16 -0
- package/fixtures/openapi/AIMemoryPolicy/valid/legacy-global.json +12 -0
- package/fixtures/openapi/AIMemoryPolicy/valid/scoped.json +16 -0
- package/fixtures/openapi/AIMemoryPolicyInput/invalid/invalid-mode.json +9 -0
- package/fixtures/openapi/AIMemoryPolicyInput/invalid/owner-spoof.json +10 -0
- package/fixtures/openapi/AIMemoryPolicyInput/valid/heya-automatic.json +9 -0
- package/fixtures/openapi/AIMemoryPolicyInput/valid/scoped.json +9 -0
- package/fixtures/openapi/AIMemoryRecord/invalid/invalid-source-hash.json +20 -0
- package/fixtures/openapi/AIMemoryRecord/invalid/invalid-sync-status.json +20 -0
- package/fixtures/openapi/AIMemoryRecord/invalid/quarantine-reason-too-long.json +22 -0
- package/fixtures/openapi/AIMemoryRecord/valid/delete-pending.json +21 -0
- package/fixtures/openapi/AIMemoryRecord/valid/quarantined.json +22 -0
- package/fixtures/openapi/AIMemoryRecord/valid/synced.json +20 -0
- package/fixtures/openapi/AgentConditionalResourceMutationRequest/invalid/preconditions-v1.json +8 -0
- package/fixtures/openapi/AgentConditionalResourceMutationRequest/valid/preconditions-v1.json +9 -0
- package/fixtures/openapi/AgentConditionalResourceYamlRequest/invalid/preconditions-v1.json +6 -0
- package/fixtures/openapi/AgentConditionalResourceYamlRequest/valid/preconditions-v1.json +10 -0
- package/fixtures/openapi/AgentPodArgvResult/invalid/native-pod-execution-v1.json +17 -0
- package/fixtures/openapi/AgentPodArgvResult/valid/native-pod-execution-v1.json +24 -0
- package/fixtures/openapi/AgentPodExecutionCapabilities/invalid/native-pod-execution-v1.json +7 -0
- package/fixtures/openapi/AgentPodExecutionCapabilities/valid/native-pod-execution-v1.json +7 -0
- package/fixtures/openapi/AgentRunCallbackRequest/valid/dsh-agent-status.json +17 -0
- package/fixtures/openapi/AlertOwnershipInput/invalid/workbench.json +3 -0
- package/fixtures/openapi/AlertOwnershipInput/valid/workbench.json +4 -0
- package/fixtures/openapi/ApplicationEnvironmentListEnvelope/invalid/legacy-list-alias.json +4 -0
- package/fixtures/openapi/ApplicationEnvironmentListEnvelope/valid/legacy-list-alias.json +4 -0
- package/fixtures/openapi/ApplicationListEnvelope/invalid/legacy-list-alias.json +4 -0
- package/fixtures/openapi/ApplicationListEnvelope/valid/legacy-list-alias.json +4 -0
- package/fixtures/openapi/ApplicationServiceListEnvelope/invalid/legacy-list-alias.json +4 -0
- package/fixtures/openapi/ApplicationServiceListEnvelope/valid/legacy-list-alias.json +4 -0
- package/fixtures/openapi/CLIAuthContext/invalid/cli-boundary.json +13 -0
- package/fixtures/openapi/CLIAuthContext/valid/cli-boundary.json +12 -0
- package/fixtures/openapi/CLIAuthOptions/invalid/cli-boundary.json +14 -0
- package/fixtures/openapi/CLIAuthOptions/valid/cli-boundary.json +13 -0
- package/fixtures/openapi/CLIAuthOptions/valid/governed-ai.json +14 -0
- package/fixtures/openapi/CLIDeviceAuthorization/invalid/cli-boundary.json +10 -0
- package/fixtures/openapi/CLIDeviceAuthorization/invalid/numeric-code.json +9 -0
- package/fixtures/openapi/CLIDeviceAuthorization/valid/cli-boundary.json +9 -0
- package/fixtures/openapi/CLIDeviceAuthorizationCreateRequest/invalid/basic.json +5 -0
- package/fixtures/openapi/CLIDeviceAuthorizationCreateRequest/valid/basic.json +5 -0
- package/fixtures/openapi/CLIDeviceCancelRequest/invalid/cli-boundary.json +5 -0
- package/fixtures/openapi/CLIDeviceCancelRequest/valid/cli-boundary.json +4 -0
- package/fixtures/openapi/CLIDeviceDecisionRequest/invalid/basic.json +6 -0
- package/fixtures/openapi/CLIDeviceDecisionRequest/valid/basic.json +6 -0
- package/fixtures/openapi/CLIDeviceInspectRequest/invalid/basic.json +4 -0
- package/fixtures/openapi/CLIDeviceInspectRequest/valid/basic.json +4 -0
- package/fixtures/openapi/CLIDeviceTokenRequest/invalid/basic.json +5 -0
- package/fixtures/openapi/CLIDeviceTokenRequest/valid/basic.json +5 -0
- package/fixtures/openapi/CLILogoutRequest/invalid/cli-boundary.json +4 -0
- package/fixtures/openapi/CLILogoutRequest/valid/cli-boundary.json +3 -0
- package/fixtures/openapi/CLIRefreshRequest/invalid/basic.json +3 -0
- package/fixtures/openapi/CLIRefreshRequest/valid/basic.json +4 -0
- package/fixtures/openapi/CLISession/invalid/cli-boundary.json +12 -0
- package/fixtures/openapi/CLISession/valid/cli-boundary.json +11 -0
- package/fixtures/openapi/DeliveryBlueprintListEnvelope/invalid/legacy-list-alias.json +4 -0
- package/fixtures/openapi/DeliveryBlueprintListEnvelope/valid/legacy-list-alias.json +4 -0
- package/fixtures/openapi/DeliveryEnvironmentListEnvelope/invalid/legacy-list-alias.json +4 -0
- package/fixtures/openapi/DeliveryEnvironmentListEnvelope/valid/legacy-list-alias.json +4 -0
- package/fixtures/openapi/DeliveryPlanServiceReferenceImpact/invalid/hidden-count.json +24 -0
- package/fixtures/openapi/DeliveryPlanServiceReferenceImpact/invalid/hidden-identities.json +26 -0
- package/fixtures/openapi/DeliveryPlanServiceReferenceImpact/invalid/invalid-frozen-revision.json +23 -0
- package/fixtures/openapi/DeliveryPlanServiceReferenceImpact/invalid/missing-current-revision.json +22 -0
- package/fixtures/openapi/DeliveryPlanServiceReferenceImpact/invalid/private-complete-snapshot.json +37 -0
- package/fixtures/openapi/DeliveryPlanServiceReferenceImpact/invalid/too-many-items.json +1223 -0
- package/fixtures/openapi/DeliveryPlanServiceReferenceImpact/valid/current-plan.json +23 -0
- package/fixtures/openapi/DeliveryPlanServiceReferenceImpact/valid/stale-plan-current-visible-page.json +23 -0
- package/fixtures/openapi/DeliveryTemplateUsageApplication/invalid/unknown-field.json +4 -0
- package/fixtures/openapi/DeliveryTemplateUsageApplication/valid/minimal.json +3 -0
- package/fixtures/openapi/DeliveryTemplateUsageBinding/invalid/unknown-field.json +6 -0
- package/fixtures/openapi/DeliveryTemplateUsageBinding/valid/minimal.json +5 -0
- package/fixtures/openapi/DeliveryTemplateUsageBuildSource/invalid/unknown-field.json +7 -0
- package/fixtures/openapi/DeliveryTemplateUsageBuildSource/valid/minimal.json +6 -0
- package/fixtures/openapi/DeliveryTemplateUsageEnvironment/invalid/unknown-field.json +5 -0
- package/fixtures/openapi/DeliveryTemplateUsageEnvironment/valid/minimal.json +4 -0
- package/fixtures/openapi/DeliveryTemplateUsageRuntimeItem/invalid/unknown-field.json +6 -0
- package/fixtures/openapi/DeliveryTemplateUsageRuntimeItem/valid/minimal.json +5 -0
- package/fixtures/openapi/DeliveryTemplateUsageRuntimeSummary/invalid/unknown-field.json +20 -0
- package/fixtures/openapi/DeliveryTemplateUsageRuntimeSummary/valid/minimal.json +19 -0
- package/fixtures/openapi/DeliveryTemplateUsageSummary/invalid/missing-kind.json +16 -0
- package/fixtures/openapi/DeliveryTemplateUsageSummary/valid/static.json +17 -0
- package/fixtures/openapi/DeliveryTemplateUsageSummaryEnvelope/invalid/legacy-items.json +3 -0
- package/fixtures/openapi/DeliveryTemplateUsageSummaryEnvelope/valid/static.json +19 -0
- package/fixtures/openapi/DirectorySyncRequestEnvelope/invalid/original-request.json +25 -0
- package/fixtures/openapi/DirectorySyncRequestEnvelope/valid/original-request.json +24 -0
- package/fixtures/openapi/DirectorySyncRequestInput/invalid/original-request.json +4 -0
- package/fixtures/openapi/DirectorySyncRequestInput/valid/original-request.json +3 -0
- package/fixtures/openapi/DirectorySyncRequestOrganizations/invalid/original-request.json +7 -0
- package/fixtures/openapi/DirectorySyncRequestOrganizations/valid/original-request.json +6 -0
- package/fixtures/openapi/DirectorySyncRequestPeople/invalid/original-request.json +7 -0
- package/fixtures/openapi/DirectorySyncRequestPeople/valid/original-request.json +6 -0
- package/fixtures/openapi/DirectorySyncRequestReceipt/invalid/original-request.json +23 -0
- package/fixtures/openapi/DirectorySyncRequestReceipt/valid/original-request.json +22 -0
- package/fixtures/openapi/DirectorySyncRequestRun/invalid/cancel-flag.json +1 -0
- package/fixtures/openapi/DirectorySyncRequestRun/invalid/original-request.json +19 -0
- package/fixtures/openapi/DirectorySyncRequestRun/valid/original-request.json +19 -0
- package/fixtures/openapi/DockerConfigurationChange/invalid/field.json +5 -0
- package/fixtures/openapi/DockerConfigurationChange/invalid/integer-overflow.json +4 -0
- package/fixtures/openapi/DockerConfigurationChange/valid/field.json +4 -0
- package/fixtures/openapi/DockerConfigurationDeleteInput/invalid/delete.json +7 -0
- package/fixtures/openapi/DockerConfigurationDeleteInput/valid/delete.json +7 -0
- package/fixtures/openapi/DockerConfigurationMapValue/invalid/map.json +1 -0
- package/fixtures/openapi/DockerConfigurationMapValue/valid/map.json +3 -0
- package/fixtures/openapi/DockerConfigurationPatchInput/invalid/missing-target-host.json +13 -0
- package/fixtures/openapi/DockerConfigurationPatchInput/invalid/patch.json +8 -0
- package/fixtures/openapi/DockerConfigurationPatchInput/invalid/unused-target-host.json +14 -0
- package/fixtures/openapi/DockerConfigurationPatchInput/valid/explicit-zero-and-empty.json +21 -0
- package/fixtures/openapi/DockerConfigurationPatchInput/valid/host-move.json +14 -0
- package/fixtures/openapi/DockerConfigurationPatchInput/valid/patch.json +13 -0
- package/fixtures/openapi/DockerConfigurationPreconditions/invalid/identity.json +3 -0
- package/fixtures/openapi/DockerConfigurationPreconditions/valid/identity.json +4 -0
- package/fixtures/openapi/DockerConfigurationReceipt/invalid/receipt.json +15 -0
- package/fixtures/openapi/DockerConfigurationReceipt/valid/receipt.json +14 -0
- package/fixtures/openapi/DockerConfigurationReceiptEnvelope/invalid/receipt.json +16 -0
- package/fixtures/openapi/DockerConfigurationReceiptEnvelope/valid/receipt.json +16 -0
- package/fixtures/openapi/DockerConfigurationScalar/invalid/simple.json +1 -0
- package/fixtures/openapi/DockerConfigurationScalar/valid/simple.json +1 -0
- package/fixtures/openapi/DockerHostRegistration/invalid/host.json +4 -0
- package/fixtures/openapi/DockerHostRegistration/valid/host.json +6 -0
- package/fixtures/openapi/DockerHostRegistrationInput/invalid/registration.json +4 -0
- package/fixtures/openapi/DockerHostRegistrationInput/valid/registration.json +6 -0
- package/fixtures/openapi/DockerNativeTerminalCreated/invalid/native-v1.json +24 -0
- package/fixtures/openapi/DockerNativeTerminalCreated/valid/native-v1.json +23 -0
- package/fixtures/openapi/DockerNativeTerminalCreatedEnvelope/invalid/native-v1.json +26 -0
- package/fixtures/openapi/DockerNativeTerminalCreatedEnvelope/valid/native-v1.json +25 -0
- package/fixtures/openapi/DockerNativeTerminalInput/invalid/native-v1.json +9 -0
- package/fixtures/openapi/DockerNativeTerminalInput/valid/native-v1.json +8 -0
- package/fixtures/openapi/DockerNativeTerminalSession/invalid/native-v1.json +21 -0
- package/fixtures/openapi/DockerNativeTerminalSession/valid/native-v1.json +20 -0
- package/fixtures/openapi/DockerNativeTerminalSessionEnvelope/invalid/native-v1.json +23 -0
- package/fixtures/openapi/DockerNativeTerminalSessionEnvelope/valid/native-v1.json +22 -0
- package/fixtures/openapi/DockerProjectDeployInput/invalid/missing-host.json +8 -0
- package/fixtures/openapi/DockerProjectDeployInput/valid/bound.json +14 -0
- package/fixtures/openapi/DockerProjectDeployInput/valid/legacy.json +1 -0
- package/fixtures/openapi/DockerProjectDeployPreconditions/invalid/missing-host.json +6 -0
- package/fixtures/openapi/DockerProjectDeployPreconditions/valid/bound.json +11 -0
- package/fixtures/openapi/DockerResourceIdentity/invalid/configuration-leak.json +9 -0
- package/fixtures/openapi/DockerResourceIdentity/invalid/host-with-host.json +7 -0
- package/fixtures/openapi/DockerResourceIdentity/invalid/invalid-uid.json +6 -0
- package/fixtures/openapi/DockerResourceIdentity/invalid/missing-revision.json +5 -0
- package/fixtures/openapi/DockerResourceIdentity/invalid/missing-uid.json +5 -0
- package/fixtures/openapi/DockerResourceIdentity/invalid/project-without-host.json +6 -0
- package/fixtures/openapi/DockerResourceIdentity/invalid/wrong-kind.json +6 -0
- package/fixtures/openapi/DockerResourceIdentity/valid/host.json +6 -0
- package/fixtures/openapi/DockerResourceIdentity/valid/project.json +7 -0
- package/fixtures/openapi/DockerResourceIdentityEnvelope/invalid/array-data.json +10 -0
- package/fixtures/openapi/DockerResourceIdentityEnvelope/invalid/missing-data.json +1 -0
- package/fixtures/openapi/DockerResourceIdentityEnvelope/invalid/unexpected-payload.json +11 -0
- package/fixtures/openapi/DockerResourceIdentityEnvelope/valid/host.json +8 -0
- package/fixtures/openapi/DockerResourceIdentityEnvelope/valid/project.json +9 -0
- package/fixtures/openapi/DockerRuntimeContainerBinding/invalid/identity-bound.json +8 -0
- package/fixtures/openapi/DockerRuntimeContainerBinding/valid/identity-bound.json +8 -0
- package/fixtures/openapi/DockerRuntimeFileEntry/invalid/identity-bound.json +8 -0
- package/fixtures/openapi/DockerRuntimeFileEntry/valid/identity-bound.json +8 -0
- package/fixtures/openapi/DockerRuntimeReadEnvelope/invalid/identity-bound.json +23 -0
- package/fixtures/openapi/DockerRuntimeReadEnvelope/valid/identity-bound.json +23 -0
- package/fixtures/openapi/DockerRuntimeReadResult/invalid/identity-bound.json +21 -0
- package/fixtures/openapi/DockerRuntimeReadResult/valid/identity-bound.json +21 -0
- package/fixtures/openapi/DockerRuntimeVolume/invalid/identity-bound.json +7 -0
- package/fixtures/openapi/DockerRuntimeVolume/valid/identity-bound.json +7 -0
- package/fixtures/openapi/EnvironmentServiceReference/invalid/candidate-state.json +60 -0
- package/fixtures/openapi/EnvironmentServiceReference/invalid/missing-current-source-revision.json +59 -0
- package/fixtures/openapi/EnvironmentServiceReference/invalid/missing-identity-revision.json +59 -0
- package/fixtures/openapi/EnvironmentServiceReference/invalid/private-snapshot.json +61 -0
- package/fixtures/openapi/EnvironmentServiceReference/valid/active.json +60 -0
- package/fixtures/openapi/EnvironmentServiceReferenceCandidate/invalid/active.json +63 -0
- package/fixtures/openapi/EnvironmentServiceReferenceCandidate/invalid/raw-secret.json +66 -0
- package/fixtures/openapi/EnvironmentServiceReferenceCandidate/valid/generic-operator.json +63 -0
- package/fixtures/openapi/EnvironmentServiceReferenceCandidate/valid/helm-root.json +49 -0
- package/fixtures/openapi/EnvironmentServiceReferenceCandidateDeleteInput/invalid/missing-binding-cas.json +4 -0
- package/fixtures/openapi/EnvironmentServiceReferenceCandidateDeleteInput/invalid/missing-identity.json +4 -0
- package/fixtures/openapi/EnvironmentServiceReferenceCandidateDeleteInput/valid/delete-without-source.json +5 -0
- package/fixtures/openapi/EnvironmentServiceReferenceCandidateEnvelope/invalid/missing-revision.json +64 -0
- package/fixtures/openapi/EnvironmentServiceReferenceCandidateEnvelope/valid/generic-operator.json +65 -0
- package/fixtures/openapi/EnvironmentServiceReferenceCandidateEnvelope/valid/helm-root.json +51 -0
- package/fixtures/openapi/EnvironmentServiceReferenceCandidateInput/invalid/activation.json +11 -0
- package/fixtures/openapi/EnvironmentServiceReferenceCandidateInput/invalid/create-with-old-id.json +11 -0
- package/fixtures/openapi/EnvironmentServiceReferenceCandidateInput/invalid/empty-targets.json +8 -0
- package/fixtures/openapi/EnvironmentServiceReferenceCandidateInput/invalid/missing-digest.json +9 -0
- package/fixtures/openapi/EnvironmentServiceReferenceCandidateInput/invalid/missing-targets.json +7 -0
- package/fixtures/openapi/EnvironmentServiceReferenceCandidateInput/invalid/null-targets.json +8 -0
- package/fixtures/openapi/EnvironmentServiceReferenceCandidateInput/invalid/update-without-id.json +10 -0
- package/fixtures/openapi/EnvironmentServiceReferenceCandidateInput/valid/create.json +10 -0
- package/fixtures/openapi/EnvironmentServiceReferenceCandidateInput/valid/update.json +11 -0
- package/fixtures/openapi/EnvironmentServiceReferenceCandidatePage/invalid/source-content.json +17 -0
- package/fixtures/openapi/EnvironmentServiceReferenceCandidatePage/valid/page.json +13 -0
- package/fixtures/openapi/EnvironmentServiceReferenceCandidateSummary/invalid/source-leak.json +9 -0
- package/fixtures/openapi/EnvironmentServiceReferenceCandidateSummary/valid/consumer-metadata.json +8 -0
- package/fixtures/openapi/EnvironmentServiceReferenceConsumer/invalid/duplicate-target-ids.json +13 -0
- package/fixtures/openapi/EnvironmentServiceReferenceConsumer/invalid/source-content.json +38 -0
- package/fixtures/openapi/EnvironmentServiceReferenceConsumer/invalid/too-many-target-ids.json +112 -0
- package/fixtures/openapi/EnvironmentServiceReferenceConsumer/valid/visible.json +12 -0
- package/fixtures/openapi/EnvironmentServiceReferenceConsumerPage/invalid/hidden-count.json +19 -0
- package/fixtures/openapi/EnvironmentServiceReferenceConsumerPage/invalid/hidden-identities.json +21 -0
- package/fixtures/openapi/EnvironmentServiceReferenceConsumerPage/invalid/missing-restricted-flag.json +17 -0
- package/fixtures/openapi/EnvironmentServiceReferenceConsumerPage/invalid/too-many-items.json +1218 -0
- package/fixtures/openapi/EnvironmentServiceReferenceConsumerPage/valid/all-consumers-restricted.json +4 -0
- package/fixtures/openapi/EnvironmentServiceReferenceConsumerPage/valid/visible-page-with-restricted-consumers.json +18 -0
- package/fixtures/openapi/EnvironmentServiceReferenceDeleteInput/invalid/caller-force.json +6 -0
- package/fixtures/openapi/EnvironmentServiceReferenceDeleteInput/invalid/missing-consumer-cas.json +4 -0
- package/fixtures/openapi/EnvironmentServiceReferenceDeleteInput/invalid/missing-reference-id.json +4 -0
- package/fixtures/openapi/EnvironmentServiceReferenceDeleteInput/invalid/zero-reference-revision.json +5 -0
- package/fixtures/openapi/EnvironmentServiceReferenceDeleteInput/valid/detach-without-source-access.json +5 -0
- package/fixtures/openapi/EnvironmentServiceReferenceEnvelope/invalid/missing-fresh-uid.json +61 -0
- package/fixtures/openapi/EnvironmentServiceReferenceEnvelope/valid/active.json +62 -0
- package/fixtures/openapi/EnvironmentServiceReferenceInput/invalid/caller-force.json +9 -0
- package/fixtures/openapi/EnvironmentServiceReferenceInput/invalid/caller-ownership.json +9 -0
- package/fixtures/openapi/EnvironmentServiceReferenceInput/invalid/caller-source.json +9 -0
- package/fixtures/openapi/EnvironmentServiceReferenceInput/invalid/caller-targets.json +11 -0
- package/fixtures/openapi/EnvironmentServiceReferenceInput/invalid/create-with-reference-id.json +9 -0
- package/fixtures/openapi/EnvironmentServiceReferenceInput/invalid/empty-candidate-id.json +8 -0
- package/fixtures/openapi/EnvironmentServiceReferenceInput/invalid/invalid-consumer-time.json +8 -0
- package/fixtures/openapi/EnvironmentServiceReferenceInput/invalid/invalid-source-digest.json +8 -0
- package/fixtures/openapi/EnvironmentServiceReferenceInput/invalid/invalid-source-time.json +8 -0
- package/fixtures/openapi/EnvironmentServiceReferenceInput/invalid/missing-candidate-id.json +7 -0
- package/fixtures/openapi/EnvironmentServiceReferenceInput/invalid/missing-candidate-revision.json +7 -0
- package/fixtures/openapi/EnvironmentServiceReferenceInput/invalid/missing-consumer-cas.json +7 -0
- package/fixtures/openapi/EnvironmentServiceReferenceInput/invalid/missing-source-cas.json +7 -0
- package/fixtures/openapi/EnvironmentServiceReferenceInput/invalid/missing-source-digest.json +7 -0
- package/fixtures/openapi/EnvironmentServiceReferenceInput/invalid/negative-reference-revision.json +8 -0
- package/fixtures/openapi/EnvironmentServiceReferenceInput/invalid/oversized-candidate-id.json +8 -0
- package/fixtures/openapi/EnvironmentServiceReferenceInput/invalid/update-without-reference-id.json +8 -0
- package/fixtures/openapi/EnvironmentServiceReferenceInput/invalid/zero-candidate-revision.json +8 -0
- package/fixtures/openapi/EnvironmentServiceReferenceInput/valid/activate.json +8 -0
- package/fixtures/openapi/EnvironmentServiceReferenceInput/valid/explicit-rebind.json +9 -0
- package/fixtures/openapi/EnvironmentServiceReferencePage/invalid/global-count.json +14 -0
- package/fixtures/openapi/EnvironmentServiceReferencePage/invalid/source-content.json +64 -0
- package/fixtures/openapi/EnvironmentServiceReferencePage/invalid/too-many-items.json +813 -0
- package/fixtures/openapi/EnvironmentServiceReferencePage/valid/empty.json +3 -0
- package/fixtures/openapi/EnvironmentServiceReferencePage/valid/page.json +13 -0
- package/fixtures/openapi/EnvironmentServiceReferencePreviewEnvelope/invalid/missing-uid.json +54 -0
- package/fixtures/openapi/EnvironmentServiceReferencePreviewEnvelope/invalid/raw-values.json +58 -0
- package/fixtures/openapi/EnvironmentServiceReferencePreviewEnvelope/valid/generic-operator.json +55 -0
- package/fixtures/openapi/EnvironmentServiceReferencePreviewEnvelope/valid/helm-root.json +41 -0
- package/fixtures/openapi/EnvironmentServiceReferencePreviewInput/invalid/duplicate-targets.json +10 -0
- package/fixtures/openapi/EnvironmentServiceReferencePreviewInput/invalid/empty-targets.json +7 -0
- package/fixtures/openapi/EnvironmentServiceReferencePreviewInput/invalid/invalid-revision.json +7 -0
- package/fixtures/openapi/EnvironmentServiceReferencePreviewInput/invalid/missing-source-cas.json +5 -0
- package/fixtures/openapi/EnvironmentServiceReferencePreviewInput/invalid/null-targets.json +7 -0
- package/fixtures/openapi/EnvironmentServiceReferencePreviewInput/invalid/unexpected-write.json +7 -0
- package/fixtures/openapi/EnvironmentServiceReferencePreviewInput/valid/all-source-targets.json +6 -0
- package/fixtures/openapi/EnvironmentServiceReferencePreviewInput/valid/explicit-group.json +11 -0
- package/fixtures/openapi/EnvironmentServiceReferenceResolvedTarget/invalid/missing-origin.json +40 -0
- package/fixtures/openapi/EnvironmentServiceReferenceResolvedTarget/invalid/missing-source-uid.json +48 -0
- package/fixtures/openapi/EnvironmentServiceReferenceResolvedTarget/invalid/missing-view.json +40 -0
- package/fixtures/openapi/EnvironmentServiceReferenceResolvedTarget/invalid/yaml-is-not-authorized.json +50 -0
- package/fixtures/openapi/EnvironmentServiceReferenceResolvedTarget/invalid/zero-reference-revision.json +49 -0
- package/fixtures/openapi/EnvironmentServiceReferenceResolvedTarget/valid/consumer-view-source-origin.json +49 -0
- package/fixtures/openapi/EnvironmentServiceReferenceSummary/invalid/source-leak.json +9 -0
- package/fixtures/openapi/EnvironmentServiceReferenceSummary/invalid/zero-reference-revision.json +8 -0
- package/fixtures/openapi/EnvironmentServiceReferenceSummary/valid/consumer-metadata.json +8 -0
- package/fixtures/openapi/ExecutionArtifactListEnvelope/invalid/legacy-list-alias.json +4 -0
- package/fixtures/openapi/ExecutionArtifactListEnvelope/valid/legacy-list-alias.json +4 -0
- package/fixtures/openapi/ExecutionLog/invalid/missing-task.json +6 -0
- package/fixtures/openapi/ExecutionLog/valid/nested-metadata.json +16 -0
- package/fixtures/openapi/ExecutionLog/valid/row.json +7 -0
- package/fixtures/openapi/ExecutionLogListEnvelope/invalid/wrong-wrapper.json +3 -0
- package/fixtures/openapi/ExecutionLogListEnvelope/valid/empty.json +3 -0
- package/fixtures/openapi/ExecutionTaskActionInput/invalid/reason-type.json +3 -0
- package/fixtures/openapi/ExecutionTaskActionInput/invalid/unknown.json +3 -0
- package/fixtures/openapi/ExecutionTaskActionInput/valid/empty.json +1 -0
- package/fixtures/openapi/ExecutionTaskActionInput/valid/reason.json +3 -0
- package/fixtures/openapi/ExecutionTaskControlInput/invalid/missing-action.json +3 -0
- package/fixtures/openapi/ExecutionTaskControlInput/invalid/reason-too-long.json +4 -0
- package/fixtures/openapi/ExecutionTaskControlInput/invalid/unknown-field.json +4 -0
- package/fixtures/openapi/ExecutionTaskControlInput/invalid/unsupported-action.json +3 -0
- package/fixtures/openapi/ExecutionTaskControlInput/valid/cancel.json +4 -0
- package/fixtures/openapi/ExecutionTaskControlInput/valid/retry.json +3 -0
- package/fixtures/openapi/ExecutionTaskControlInput/valid/unicode-reason.json +4 -0
- package/fixtures/openapi/ExecutionTaskListEnvelope/invalid/legacy-list-alias.json +4 -0
- package/fixtures/openapi/ExecutionTaskListEnvelope/valid/legacy-list-alias.json +4 -0
- package/fixtures/openapi/GovernedAITokenBinding/invalid/binding.json +5 -0
- package/fixtures/openapi/GovernedAITokenBinding/valid/binding.json +5 -0
- package/fixtures/openapi/HealingOriginalRequestEnvelope/invalid/original-request.json +19 -0
- package/fixtures/openapi/HealingOriginalRequestEnvelope/valid/original-request.json +18 -0
- package/fixtures/openapi/HealingOriginalRequestInput/invalid/original-request.json +5 -0
- package/fixtures/openapi/HealingOriginalRequestInput/valid/original-request.json +4 -0
- package/fixtures/openapi/HealingOriginalRequestReceipt/invalid/original-request.json +17 -0
- package/fixtures/openapi/HealingOriginalRequestReceipt/valid/original-request.json +16 -0
- package/fixtures/openapi/HealingOriginalRun/invalid/original-request.json +13 -0
- package/fixtures/openapi/HealingOriginalRun/valid/original-request.json +12 -0
- package/fixtures/openapi/HelmReleaseImportInput/invalid/explicit-service-id.json +4 -0
- package/fixtures/openapi/HelmReleaseImportInput/valid/explicit-service-id.json +4 -0
- package/fixtures/openapi/IdentityOutpostClaimRequest/invalid/unsupported-control.json +7 -0
- package/fixtures/openapi/IdentityOutpostClaimRequest/valid/control-capable.json +7 -0
- package/fixtures/openapi/IdentityOutpostHeartbeatRequest/invalid/control-ack.json +11 -0
- package/fixtures/openapi/IdentityOutpostHeartbeatRequest/valid/control-ack.json +11 -0
- package/fixtures/openapi/IdentityOutpostHeartbeatRequest/valid/legacy.json +6 -0
- package/fixtures/openapi/IdentityOutpostRuntime/invalid/runtime.json +10 -0
- package/fixtures/openapi/IdentityOutpostRuntime/valid/observed-zero.json +18 -0
- package/fixtures/openapi/IdentityOutpostRuntime/valid/runtime.json +11 -0
- package/fixtures/openapi/IdentityOutpostRuntimeBindingInput/invalid/runtime.json +6 -0
- package/fixtures/openapi/IdentityOutpostRuntimeBindingInput/valid/runtime.json +5 -0
- package/fixtures/openapi/IdentityOutpostRuntimeControl/invalid/runtime.json +12 -0
- package/fixtures/openapi/IdentityOutpostRuntimeControl/valid/runtime.json +12 -0
- package/fixtures/openapi/IdentityOutpostRuntimeControlInput/invalid/arbitrary-target.json +6 -0
- package/fixtures/openapi/IdentityOutpostRuntimeControlInput/invalid/empty-request-id.json +5 -0
- package/fixtures/openapi/IdentityOutpostRuntimeControlInput/invalid/negative-generation.json +6 -0
- package/fixtures/openapi/IdentityOutpostRuntimeControlInput/invalid/reconcile-replicas.json +6 -0
- package/fixtures/openapi/IdentityOutpostRuntimeControlInput/invalid/runtime.json +6 -0
- package/fixtures/openapi/IdentityOutpostRuntimeControlInput/valid/reconcile.json +5 -0
- package/fixtures/openapi/IdentityOutpostRuntimeControlInput/valid/runtime.json +6 -0
- package/fixtures/openapi/IdentityOutpostRuntimeExecutorClaimRequest/invalid/runtime.json +6 -0
- package/fixtures/openapi/IdentityOutpostRuntimeExecutorClaimRequest/valid/runtime.json +3 -0
- package/fixtures/openapi/KubernetesClusterRegistrationRequest/invalid/metric-cluster-value-length.json +3 -0
- package/fixtures/openapi/KubernetesClusterRegistrationRequest/invalid/metric-cluster-value-type.json +3 -0
- package/fixtures/openapi/KubernetesClusterRegistrationRequest/valid/metric-cluster-alias.json +5 -0
- package/fixtures/openapi/KubernetesClusterRegistrationRequest/valid/metric-cluster-dedicated.json +5 -0
- package/fixtures/openapi/KubernetesClusterRegistrationRequest/valid/metric-cluster-reset.json +3 -0
- package/fixtures/openapi/KubernetesConditionalResourceYamlInput/invalid/preconditions-v1.json +3 -0
- package/fixtures/openapi/KubernetesConditionalResourceYamlInput/valid/preconditions-v1.json +7 -0
- package/fixtures/openapi/KubernetesConditionalWorkloadActionInput/invalid/preconditions-v1.json +7 -0
- package/fixtures/openapi/KubernetesConditionalWorkloadActionInput/valid/preconditions-v1.json +8 -0
- package/fixtures/openapi/KubernetesConditionalWorkloadActionReceipt/invalid/preconditions-v1.json +14 -0
- package/fixtures/openapi/KubernetesConditionalWorkloadActionReceipt/valid/preconditions-v1.json +14 -0
- package/fixtures/openapi/KubernetesConditionalWorkloadActionReceiptEnvelope/invalid/preconditions-v1.json +16 -0
- package/fixtures/openapi/KubernetesConditionalWorkloadActionReceiptEnvelope/valid/preconditions-v1.json +16 -0
- package/fixtures/openapi/KubernetesHelmReleaseValuesUpdateInput/invalid/revision-overflow.json +4 -0
- package/fixtures/openapi/KubernetesHelmReleaseValuesUpdateInput/valid/legacy.json +3 -0
- package/fixtures/openapi/KubernetesHelmReleaseValuesUpdateInput/valid/observed-revision.json +4 -0
- package/fixtures/openapi/KubernetesJobDetail/invalid/execution-observation.json +23 -0
- package/fixtures/openapi/KubernetesJobDetail/valid/execution-observation.json +23 -0
- package/fixtures/openapi/KubernetesNode/invalid/labels.json +10 -0
- package/fixtures/openapi/KubernetesNode/valid/labels.json +11 -0
- package/fixtures/openapi/KubernetesPodArgvInput/invalid/blank-executable.json +6 -0
- package/fixtures/openapi/KubernetesPodArgvInput/invalid/invalid-stdin.json +7 -0
- package/fixtures/openapi/KubernetesPodArgvInput/invalid/native-pod-execution-v1.json +4 -0
- package/fixtures/openapi/KubernetesPodArgvInput/invalid/nul-argv.json +7 -0
- package/fixtures/openapi/KubernetesPodArgvInput/valid/native-pod-execution-v1.json +7 -0
- package/fixtures/openapi/KubernetesPodArgvToolInput/invalid/empty-argv.json +10 -0
- package/fixtures/openapi/KubernetesPodArgvToolInput/invalid/missing-key.json +16 -0
- package/fixtures/openapi/KubernetesPodArgvToolInput/invalid/nested-unknown.json +18 -0
- package/fixtures/openapi/KubernetesPodArgvToolInput/invalid/timeout.json +17 -0
- package/fixtures/openapi/KubernetesPodArgvToolInput/invalid/unknown-shell.json +18 -0
- package/fixtures/openapi/KubernetesPodArgvToolInput/invalid/wrong-namespace.json +17 -0
- package/fixtures/openapi/KubernetesPodArgvToolInput/valid/reviewed-argv.json +17 -0
- package/fixtures/openapi/KubernetesPodExecutionLookupInput/invalid/both.json +7 -0
- package/fixtures/openapi/KubernetesPodExecutionLookupInput/invalid/empty-key.json +6 -0
- package/fixtures/openapi/KubernetesPodExecutionLookupInput/invalid/neither.json +5 -0
- package/fixtures/openapi/KubernetesPodExecutionLookupInput/invalid/noncanonical-id.json +6 -0
- package/fixtures/openapi/KubernetesPodExecutionLookupInput/invalid/unknown-command.json +11 -0
- package/fixtures/openapi/KubernetesPodExecutionLookupInput/valid/by-id.json +6 -0
- package/fixtures/openapi/KubernetesPodExecutionLookupInput/valid/by-key.json +6 -0
- package/fixtures/openapi/KubernetesPodExecutionOutput/invalid/native-pod-execution-v1.json +15 -0
- package/fixtures/openapi/KubernetesPodExecutionOutput/valid/native-pod-execution-v1.json +15 -0
- package/fixtures/openapi/KubernetesPodExecutionReceipt/invalid/native-pod-execution-v1.json +29 -0
- package/fixtures/openapi/KubernetesPodExecutionReceipt/valid/native-pod-execution-v1.json +29 -0
- package/fixtures/openapi/KubernetesPodExecutionReceiptEnvelope/invalid/native-pod-execution-v1.json +1 -0
- package/fixtures/openapi/KubernetesPodExecutionReceiptEnvelope/valid/native-pod-execution-v1.json +31 -0
- package/fixtures/openapi/KubernetesPodExecutionTarget/invalid/native-pod-execution-v1.json +7 -0
- package/fixtures/openapi/KubernetesPodExecutionTarget/valid/native-pod-execution-v1.json +7 -0
- package/fixtures/openapi/KubernetesPodGatewayResult/invalid/encoded-output.json +32 -0
- package/fixtures/openapi/KubernetesPodGatewayResult/invalid/missing-text.json +17 -0
- package/fixtures/openapi/KubernetesPodGatewayResult/invalid/raw-receipt-availability.json +32 -0
- package/fixtures/openapi/KubernetesPodGatewayResult/invalid/raw-receipt-output.json +47 -0
- package/fixtures/openapi/KubernetesPodGatewayResult/invalid/withheld-text.json +32 -0
- package/fixtures/openapi/KubernetesPodGatewayResult/valid/binary-withheld.json +17 -0
- package/fixtures/openapi/KubernetesPodGatewayResult/valid/redacted.json +32 -0
- package/fixtures/openapi/KubernetesPodGatewayResult/valid/text.json +32 -0
- package/fixtures/openapi/KubernetesPodGatewayResult/valid/unavailable.json +17 -0
- package/fixtures/openapi/KubernetesPodListEnvelope/invalid/empty-uid.json +13 -0
- package/fixtures/openapi/KubernetesPodListEnvelope/invalid/invalid-container-state.json +20 -0
- package/fixtures/openapi/KubernetesPodListEnvelope/invalid/missing-container-ready.json +19 -0
- package/fixtures/openapi/KubernetesPodListEnvelope/valid/container-statuses.json +67 -0
- package/fixtures/openapi/KubernetesPodListEnvelope/valid/running-pod.json +1 -0
- package/fixtures/openapi/KubernetesPodTerminalCreated/invalid/terminal.json +21 -0
- package/fixtures/openapi/KubernetesPodTerminalCreated/valid/terminal.json +21 -0
- package/fixtures/openapi/KubernetesPodTerminalCreatedEnvelope/invalid/terminal.json +3 -0
- package/fixtures/openapi/KubernetesPodTerminalCreatedEnvelope/valid/terminal.json +23 -0
- package/fixtures/openapi/KubernetesPodTerminalInput/invalid/terminal.json +4 -0
- package/fixtures/openapi/KubernetesPodTerminalInput/valid/terminal.json +3 -0
- package/fixtures/openapi/KubernetesPodTerminalResult/invalid/terminal.json +8 -0
- package/fixtures/openapi/KubernetesPodTerminalResult/valid/terminal.json +8 -0
- package/fixtures/openapi/KubernetesPodTerminalSession/invalid/terminal.json +18 -0
- package/fixtures/openapi/KubernetesPodTerminalSession/valid/terminal.json +18 -0
- package/fixtures/openapi/KubernetesPodTerminalSessionEnvelope/invalid/terminal.json +3 -0
- package/fixtures/openapi/KubernetesPodTerminalSessionEnvelope/valid/terminal.json +20 -0
- package/fixtures/openapi/KubernetesPrometheusDetail/invalid/metric-cluster-value-type.json +4 -0
- package/fixtures/openapi/KubernetesPrometheusDetail/valid/metric-cluster-alias.json +5 -0
- package/fixtures/openapi/KubernetesResourceDeletionReceipt/invalid/preconditions-v1.json +11 -0
- package/fixtures/openapi/KubernetesResourceDeletionReceipt/valid/preconditions-v1.json +11 -0
- package/fixtures/openapi/KubernetesResourceDeletionReceiptEnvelope/invalid/preconditions-v1.json +5 -0
- package/fixtures/openapi/KubernetesResourceDeletionReceiptEnvelope/valid/preconditions-v1.json +13 -0
- package/fixtures/openapi/KubernetesResourceGraphEnvelope/invalid/network-edge-source-payload.json +73 -0
- package/fixtures/openapi/KubernetesResourceGraphEnvelope/valid/network-edge-facts.json +67 -0
- package/fixtures/openapi/KubernetesResourceIdentity/invalid/preconditions-v1.json +11 -0
- package/fixtures/openapi/KubernetesResourceIdentity/valid/preconditions-v1.json +8 -0
- package/fixtures/openapi/KubernetesResourceIdentityEnvelope/invalid/preconditions-v1.json +3 -0
- package/fixtures/openapi/KubernetesResourceIdentityEnvelope/valid/preconditions-v1.json +10 -0
- package/fixtures/openapi/KubernetesResourceMutationPreconditions/invalid/preconditions-v1.json +3 -0
- package/fixtures/openapi/KubernetesResourceMutationPreconditions/valid/preconditions-v1.json +4 -0
- package/fixtures/openapi/KubernetesResourcePresence/invalid/absence-with-uid.json +11 -0
- package/fixtures/openapi/KubernetesResourcePresence/invalid/missing-collection-version.json +9 -0
- package/fixtures/openapi/KubernetesResourcePresence/invalid/missing-state.json +9 -0
- package/fixtures/openapi/KubernetesResourcePresence/invalid/old-protocol.json +10 -0
- package/fixtures/openapi/KubernetesResourcePresence/invalid/present-without-uid.json +10 -0
- package/fixtures/openapi/KubernetesResourcePresence/invalid/unknown-field.json +11 -0
- package/fixtures/openapi/KubernetesResourcePresence/valid/absent.json +10 -0
- package/fixtures/openapi/KubernetesResourcePresence/valid/present.json +12 -0
- package/fixtures/openapi/KubernetesSecretCertificate/invalid/secret-data.json +1 -0
- package/fixtures/openapi/KubernetesSecretCertificate/invalid/status.json +1 -0
- package/fixtures/openapi/KubernetesSecretCertificate/valid/available.json +1 -0
- package/fixtures/openapi/KubernetesSecretCertificate/valid/missing.json +1 -0
- package/fixtures/openapi/KubernetesWorkloadImportInput/invalid/explicit-service-id.json +5 -0
- package/fixtures/openapi/KubernetesWorkloadImportInput/valid/explicit-service-id.json +7 -0
- package/fixtures/openapi/ManifestBindingListEnvelope/invalid/legacy-object.json +4 -0
- package/fixtures/openapi/ManifestBindingListEnvelope/valid/empty-alias.json +4 -0
- package/fixtures/openapi/ManifestRevision/invalid/missing-files.json +8 -0
- package/fixtures/openapi/ManifestRevision/valid/minimal.json +9 -0
- package/fixtures/openapi/ManifestRevisionListEnvelope/invalid/legacy-object.json +4 -0
- package/fixtures/openapi/ManifestRevisionListEnvelope/valid/legacy-alias.json +24 -0
- package/fixtures/openapi/NativeTerminalClientFrame/invalid/terminal.json +12 -0
- package/fixtures/openapi/NativeTerminalClientFrame/valid/terminal.json +4 -0
- package/fixtures/openapi/NativeTerminalServerFrame/invalid/terminal.json +4 -0
- package/fixtures/openapi/NativeTerminalServerFrame/valid/terminal.json +11 -0
- package/fixtures/openapi/NetworkConflictAnalysisRequest/invalid/ipv6-range.json +9 -0
- package/fixtures/openapi/NetworkEAPServerTrust/invalid/peap.json +10 -0
- package/fixtures/openapi/NetworkEAPServerTrust/invalid/tls-inner.json +11 -0
- package/fixtures/openapi/NetworkEAPServerTrust/invalid/ttls-incomplete.json +10 -0
- package/fixtures/openapi/NetworkEAPServerTrust/valid/ttls.json +12 -0
- package/fixtures/openapi/NetworkMihomoProfileInput/invalid/direct-bundle-raw-source.json +21 -0
- package/fixtures/openapi/NetworkMihomoProfileInput/invalid/mapped-raw-source.json +21 -0
- package/fixtures/openapi/NetworkMihomoProfileInput/valid/direct-bundle.json +19 -0
- package/fixtures/openapi/NetworkMihomoProfileInput/valid/mapped-nodes.json +19 -0
- package/fixtures/openapi/NetworkProxyBundleInput/invalid/unknown.json +25 -0
- package/fixtures/openapi/NetworkProxyBundleInput/valid/basic.json +24 -0
- package/fixtures/openapi/NetworkProxyBundleReadback/invalid/missing-identity.json +9 -0
- package/fixtures/openapi/NetworkProxyBundleReadback/invalid/unknown-field.json +11 -0
- package/fixtures/openapi/NetworkProxyBundleReadback/valid/basic.json +10 -0
- package/fixtures/openapi/NetworkProxyCapability/invalid/unknown-version.json +1 -0
- package/fixtures/openapi/NetworkProxyCapability/valid/guarded-udp.json +1 -0
- package/fixtures/openapi/NetworkProxyDeployment/invalid/negative-observation.json +7 -0
- package/fixtures/openapi/NetworkProxyDeployment/invalid/null-observation.json +7 -0
- package/fixtures/openapi/NetworkProxyDeployment/valid/positive.json +7 -0
- package/fixtures/openapi/NetworkProxyDeployment/valid/stopped.json +7 -0
- package/fixtures/openapi/NetworkProxyDeployment/valid/unobserved.json +6 -0
- package/fixtures/openapi/NetworkProxyDeploymentControlInput/invalid/unknown.json +7 -0
- package/fixtures/openapi/NetworkProxyDeploymentControlInput/valid/basic.json +6 -0
- package/fixtures/openapi/NetworkProxyDeploymentRuntimeAck/invalid/stopped-accepting.json +15 -0
- package/fixtures/openapi/NetworkProxyDeploymentRuntimeAck/invalid/stopped-active.json +15 -0
- package/fixtures/openapi/NetworkProxyDeploymentRuntimeAck/invalid/stopped-missing-count.json +14 -0
- package/fixtures/openapi/NetworkProxyDeploymentRuntimeAck/invalid/stopped-unknown.json +15 -0
- package/fixtures/openapi/NetworkProxyDeploymentRuntimeAck/valid/false-with-active-unknown.json +15 -0
- package/fixtures/openapi/NetworkProxyDeploymentRuntimeAck/valid/omitted-with-active-unknown.json +14 -0
- package/fixtures/openapi/NetworkProxyDeploymentRuntimeAck/valid/process-stopped.json +15 -0
- package/fixtures/openapi/NetworkProxyDeploymentRuntimeControl/invalid/stop-while-accepting.json +13 -0
- package/fixtures/openapi/NetworkProxyDeploymentRuntimeControl/valid/false-can-serve.json +13 -0
- package/fixtures/openapi/NetworkProxyDeploymentRuntimeControl/valid/omitted-can-serve.json +12 -0
- package/fixtures/openapi/NetworkProxyDeploymentRuntimeControl/valid/stop-required.json +13 -0
- package/fixtures/openapi/NetworkProxyDirectProjection/invalid/gateway-credential.json +22 -0
- package/fixtures/openapi/NetworkProxyDirectProjection/invalid/original-source-url.json +20 -0
- package/fixtures/openapi/NetworkProxyDirectProjection/invalid/protected-projection.json +41 -0
- package/fixtures/openapi/NetworkProxyDirectProjection/invalid/wrong-mode.json +19 -0
- package/fixtures/openapi/NetworkProxyDirectProjection/valid/explicit-direct.json +19 -0
- package/fixtures/openapi/NetworkProxyEmployeeProjection/invalid/direct-upstream-content.json +42 -0
- package/fixtures/openapi/NetworkProxyEmployeeProjection/invalid/unsafe-endpoint.json +41 -0
- package/fixtures/openapi/NetworkProxyEmployeeProjection/invalid/upstream.json +42 -0
- package/fixtures/openapi/NetworkProxyEmployeeProjection/valid/scoped.json +41 -0
- package/fixtures/openapi/NetworkProxyIngressCheckInput/invalid/arbitrary-url.json +12 -0
- package/fixtures/openapi/NetworkProxyIngressCheckInput/invalid/missing-identity.json +11 -0
- package/fixtures/openapi/NetworkProxyIngressCheckInput/invalid/unknown-field.json +13 -0
- package/fixtures/openapi/NetworkProxyIngressCheckInput/valid/basic.json +12 -0
- package/fixtures/openapi/NetworkProxyIngressCheckResult/invalid/missing-identity.json +8 -0
- package/fixtures/openapi/NetworkProxyIngressCheckResult/invalid/unknown-field.json +10 -0
- package/fixtures/openapi/NetworkProxyIngressCheckResult/valid/basic.json +9 -0
- package/fixtures/openapi/NetworkProxyInstanceInput/invalid/external.json +5 -0
- package/fixtures/openapi/NetworkProxyInstanceInput/valid/external.json +15 -0
- package/fixtures/openapi/NetworkProxyRule/invalid/unknown.json +15 -0
- package/fixtures/openapi/NetworkProxyRule/valid/basic.json +14 -0
- package/fixtures/openapi/NetworkProxyRuntimeCommandInput/invalid/unknown.json +8 -0
- package/fixtures/openapi/NetworkProxyRuntimeCommandInput/valid/basic.json +7 -0
- package/fixtures/openapi/NetworkProxyServerPublication/invalid/arbitrary-listener.json +21 -0
- package/fixtures/openapi/NetworkProxyServerPublication/invalid/missing-identity.json +19 -0
- package/fixtures/openapi/NetworkProxyServerPublication/invalid/unknown-field.json +21 -0
- package/fixtures/openapi/NetworkProxyServerPublication/valid/basic.json +20 -0
- package/fixtures/openapi/NetworkProxySourceInput/invalid/node-quota.json +912 -0
- package/fixtures/openapi/NetworkProxySourceInput/invalid/unknown.json +8 -0
- package/fixtures/openapi/NetworkProxySourceInput/invalid/unsupported-format.json +7 -0
- package/fixtures/openapi/NetworkProxySourceInput/invalid/untyped-direct-format.json +7 -0
- package/fixtures/openapi/NetworkProxySourceInput/valid/basic.json +7 -0
- package/fixtures/openapi/NetworkProxySourceInput/valid/converted-direct.json +7 -0
- package/fixtures/openapi/NetworkProxyTrafficSample/invalid/known-as-null.json +10 -0
- package/fixtures/openapi/NetworkProxyTrafficSample/valid/gap-rate.json +10 -0
- package/fixtures/openapi/NetworkProxyTrafficSample/valid/known-zero.json +10 -0
- package/fixtures/openapi/NetworkProxyTrafficSample/valid/legacy-numeric.json +7 -0
- package/fixtures/openapi/NetworkProxyTrafficSample/valid/unknown-rate.json +10 -0
- package/fixtures/openapi/NetworkRADIUSConfigurationInput/invalid/arbitrary-image.json +6 -0
- package/fixtures/openapi/NetworkRADIUSConfigurationInput/valid/input.json +5 -0
- package/fixtures/openapi/NetworkRADIUSControlInput/invalid/arbitrary-image.json +8 -0
- package/fixtures/openapi/NetworkRADIUSControlInput/valid/input.json +7 -0
- package/fixtures/openapi/NetworkRADIUSOptions/invalid/secret.json +18 -0
- package/fixtures/openapi/NetworkRADIUSOptions/valid/approved.json +17 -0
- package/fixtures/openapi/NetworkRADIUSPoolInput/invalid/arbitrary-image.json +10 -0
- package/fixtures/openapi/NetworkRADIUSPoolInput/valid/create-approved-binding.json +9 -0
- package/fixtures/openapi/NetworkRADIUSPoolInput/valid/input.json +9 -0
- package/fixtures/openapi/NetworkRADIUSRuntimeACK/invalid/missing-zero.json +20 -0
- package/fixtures/openapi/NetworkRADIUSRuntimeACK/invalid/secret.json +22 -0
- package/fixtures/openapi/NetworkRADIUSRuntimeACK/valid/current.json +21 -0
- package/fixtures/openapi/NetworkRADIUSRuntimeACK/valid/stopped-no-hooks.json +21 -0
- package/fixtures/openapi/NetworkRADIUSRuntimeControl/invalid/secret.json +30 -0
- package/fixtures/openapi/NetworkRADIUSRuntimeControl/valid/current.json +29 -0
- package/fixtures/openapi/OperationCommentInput/invalid/workbench.json +4 -0
- package/fixtures/openapi/OperationCommentInput/valid/workbench.json +3 -0
- package/fixtures/openapi/PersonalAssistantArtifactListEnvelope/invalid/legacy-object.json +4 -0
- package/fixtures/openapi/PersonalAssistantArtifactListEnvelope/valid/legacy-alias.json +4 -0
- package/fixtures/openapi/ReleaseTargetInput/invalid/explicit-service-id.json +8 -0
- package/fixtures/openapi/ReleaseTargetInput/valid/explicit-service-id.json +8 -0
- package/fixtures/openapi/TokenRotationRecord/invalid/cli-boundary.json +10 -0
- package/fixtures/openapi/TokenRotationRecord/valid/cli-boundary.json +9 -0
- package/fixtures/openapi/WorkbenchAgentRunListEnvelope/valid/dsh-session.json +18 -0
- package/fixtures/openapi/WorkbenchSendMessageStreamRequest/invalid/unicode-request-id.json +4 -0
- package/fixtures/openapi/WorkbenchSendMessageStreamRequest/valid/unicode-request-id.json +4 -0
- package/fixtures/openapi/WorkbenchStreamEvent/valid/dsh-agent-status.json +11 -0
- package/fixtures/openapi/WorkbenchStreamEvent/valid/native-system-notice.json +11 -0
- package/fixtures/openapi/WorkflowRequestInput/invalid/original-request.json +6 -0
- package/fixtures/openapi/WorkflowRequestInput/valid/original-request.json +7 -0
- package/fixtures/openapi/WorkflowRequestReceipt/invalid/original-request.json +6 -0
- package/fixtures/openapi/WorkflowRequestReceipt/valid/original-request.json +6 -0
- package/fixtures/openapi/WorkflowRequestReceiptEnvelope/invalid/receipt.json +8 -0
- package/fixtures/openapi/WorkflowRequestReceiptEnvelope/valid/receipt.json +17 -0
- package/fixtures/openapi/WorkflowRunEnvelope/invalid/receipt.json +3 -0
- package/fixtures/openapi/WorkflowRunEnvelope/valid/receipt.json +11 -0
- package/fixtures/openapi/WorkflowTriggerRequest/invalid/workbench.json +4 -0
- package/fixtures/openapi/WorkflowTriggerRequest/valid/workbench.json +9 -0
- package/gen/go/sohaapi/client.go +108 -1
- package/gen/go/sohaapi/client_test.go +85 -0
- package/gen/go/sohaapi/docker_configuration_test.go +32 -0
- package/gen/go/sohaapi/kubernetes_workload_optional_test.go +40 -0
- package/gen/go/sohaapi/memory_types_test.go +59 -0
- package/gen/go/sohaapi/pod_status_compat_test.go +36 -0
- package/gen/go/sohaapi/proxy_deployment_presence_test.go +47 -0
- package/gen/go/sohaapi/proxy_deployment_stop_test.go +40 -0
- package/gen/go/sohaapi/proxy_traffic_test.go +41 -0
- package/gen/go/sohaapi/radius_presence_test.go +35 -0
- package/gen/go/sohaapi/types.go +6580 -365
- package/gen/go/sohaapi/types_test.go +63 -0
- package/gen/ts/sohaapi/index.ts +36358 -26252
- package/go.mod +5 -2
- package/go.sum +8 -0
- package/helmrelease/delivery.go +1 -1
- package/helmrelease/delivery_test.go +1 -1
- package/helmrelease/initialization.go +1 -1
- package/helmrelease/result.go +1 -1
- package/helmrelease/runtime/delivery.go +4 -4
- package/helmrelease/runtime/delivery_test.go +2 -2
- package/helmrelease/runtime/initialization.go +2 -2
- package/helmrelease/runtime/initialization_test.go +2 -2
- package/helmrelease/runtime/values_upgrade.go +78 -0
- package/helmrelease/runtime/values_upgrade_test.go +123 -0
- package/helmrelease/values.go +1 -1
- package/helmrelease/values_update.go +31 -0
- package/memory/memory-policy.schema.json +5 -1
- package/memory/memory-record.schema.json +5 -1
- package/network/README.md +79 -0
- package/network/network-ingest-event.schema.json +4 -1
- package/network/network-runtime-protocol.schema.json +381 -20
- package/network/proxy-adapter.schema.json +1018 -0
- package/network/proxy-runtime.schema.json +1732 -16
- package/network/radius-password-verifier.schema.json +263 -0
- package/network/radius-runtime.schema.json +929 -0
- package/network/schema.go +12 -0
- package/openapi/soha-api.json +70695 -49969
- package/openapi/soha-api.yaml +39327 -27176
- package/openapi/spec_generated.go +3 -3
- package/package.json +19 -6
- package/proxyadapter/mihomo_udp.go +15 -0
- package/proxyadapter/mihomo_udp_test.go +21 -0
- package/proxyadapter/protocol.go +286 -0
- package/proxyadapter/protocol_test.go +76 -0
- package/proxypolicy/destination_test.go +48 -0
- package/proxypolicy/narrow.go +152 -0
- package/proxypolicy/narrow_test.go +138 -0
- package/proxypolicy/policy.go +329 -0
- package/proxypolicy/policy_test.go +36 -0
- package/proxytransport/README.md +141 -0
- package/proxytransport/handler.go +5 -1
- package/proxytransport/native_egress_test.go +236 -0
- package/proxytransport/probe.go +5 -1
- package/proxytransport/probe_test.go +106 -0
- package/proxytransport/refresh_test.go +74 -0
- package/proxytransport/scope.go +23 -3
- package/proxytransport/socks_upstream.go +440 -0
- package/proxytransport/socks_upstream_test.go +368 -0
- package/proxytransport/udp_conn.go +234 -0
- package/proxytransport/udp_gate.go +521 -0
- package/proxytransport/udp_http.go +372 -0
- package/proxytransport/udp_socks.go +288 -0
- package/proxytransport/udp_test.go +793 -0
- package/proxytransport/username.go +51 -0
- package/proxytransport/username_test.go +98 -0
- package/resource/agent_profiles.go +9 -15
- package/resource/agent_profiles_test.go +9 -3
- package/resource/conditional_workload_action.go +63 -0
- package/resource/custom_graph_page.go +18 -0
- package/resource/models.go +102 -57
- package/resource/mutation_preconditions.go +67 -0
- package/resource/network_topology.go +22 -0
- package/resource/network_topology_projection.go +36 -22
- package/resource/network_topology_projection_test.go +4 -0
- package/resource/network_topology_test.go +20 -0
- package/resource/network_topology_validation.go +5 -0
- package/resource/observed_workload.go +18 -0
- package/resource/pod_execution.go +206 -0
- package/resource/pod_execution_gateway.go +119 -0
- package/resource/pod_execution_gateway_test.go +149 -0
- package/resource/pod_execution_test.go +48 -0
- package/resource/pod_status_test.go +22 -0
- package/resource/pod_terminal.go +188 -0
- package/resource/pod_terminal_test.go +63 -0
- package/resource/presence.go +60 -0
- package/resource/presence_test.go +28 -0
- package/resource/rbac_graph.go +4 -0
- package/resource/rollout_optional_test.go +33 -0
- package/resource/root_cr.go +1 -1
- package/resource/runtime/argocd_observation.go +1 -1
- package/resource/runtime/conditional_workload_action.go +141 -0
- package/resource/runtime/conditional_workload_action_test.go +259 -0
- package/resource/runtime/health.go +1 -1
- package/resource/runtime/health_test.go +1 -1
- package/resource/runtime/initialization.go +1 -1
- package/resource/runtime/initialization_test.go +1 -1
- package/resource/runtime/mutation_preconditions.go +106 -0
- package/resource/runtime/mutation_preconditions_test.go +172 -0
- package/resource/runtime/network_relationship_primitives.go +66 -0
- package/resource/runtime/network_relationship_primitives_test.go +147 -0
- package/resource/runtime/network_topology.go +18 -6
- package/resource/runtime/network_topology_builder.go +405 -0
- package/resource/runtime/network_topology_builder_backends.go +195 -0
- package/resource/runtime/network_topology_builder_gateway_l4_test.go +86 -0
- package/resource/runtime/network_topology_builder_ingress.go +302 -0
- package/resource/runtime/network_topology_builder_legacy.go +66 -0
- package/resource/runtime/network_topology_builder_providers.go +242 -0
- package/resource/runtime/network_topology_builder_test.go +186 -0
- package/resource/runtime/network_topology_declarations.go +329 -0
- package/resource/runtime/network_topology_test.go +1 -1
- package/resource/runtime/node_drain.go +1 -1
- package/resource/runtime/node_drain_test.go +1 -1
- package/resource/runtime/pod_execution.go +199 -0
- package/resource/runtime/pod_execution_test.go +194 -0
- package/resource/runtime/pod_execution_transport.go +79 -0
- package/resource/runtime/pod_terminal.go +178 -0
- package/resource/runtime/pod_terminal_test.go +170 -0
- package/resource/runtime/presence.go +58 -0
- package/resource/runtime/presence_metadata.go +85 -0
- package/resource/runtime/presence_metadata_test.go +56 -0
- package/resource/runtime/presence_test.go +85 -0
- package/resource/runtime/relations.go +1 -1
- package/resource/runtime/relations_test.go +1 -1
- package/resource/runtime/resource_edit.go +22 -0
- package/resource/runtime/resource_edit_test.go +32 -0
- package/resource/runtime/resource_graph_collect.go +325 -0
- package/resource/runtime/resource_graph_configuration.go +59 -0
- package/resource/runtime/resource_graph_configuration_collect.go +198 -0
- package/resource/runtime/resource_graph_configuration_test.go +470 -0
- package/resource/runtime/resource_graph_custom_page.go +159 -0
- package/resource/runtime/resource_graph_custom_root.go +132 -0
- package/resource/runtime/resource_graph_custom_root_test.go +197 -0
- package/resource/runtime/resource_graph_enrichment.go +417 -0
- package/resource/runtime/resource_graph_enrichment_hpa_test.go +117 -0
- package/resource/runtime/resource_graph_enrichment_test.go +201 -0
- package/resource/runtime/resource_graph_metadata.go +125 -0
- package/resource/runtime/resource_graph_metadata_test.go +204 -0
- package/resource/runtime/resource_graph_network.go +224 -0
- package/resource/runtime/resource_graph_network_collect.go +174 -0
- package/resource/runtime/resource_graph_network_collect_test.go +147 -0
- package/resource/runtime/resource_graph_network_test.go +342 -0
- package/resource/runtime/resource_graph_rbac.go +278 -0
- package/resource/runtime/resource_graph_rbac_test.go +372 -0
- package/resource/runtime/resource_graph_rules.go +834 -0
- package/resource/runtime/resource_graph_storage.go +144 -0
- package/resource/runtime/resource_graph_storage_collect.go +163 -0
- package/resource/runtime/resource_graph_storage_test.go +397 -0
- package/resource/runtime/resource_graph_test.go +627 -0
- package/resource/runtime/resource_monitoring.go +1 -1
- package/resource/runtime/rollout_integration_test.go +1 -1
- package/resource/runtime/rollout_observation.go +1 -1
- package/resource/runtime/rollout_operation.go +1 -1
- package/resource/runtime/rollout_task.go +2 -2
- package/resource/runtime/rollout_test.go +1 -1
- package/resource/runtime/root_cr.go +2 -2
- package/resource/runtime/root_cr_test.go +1 -1
- package/resource/runtime/secret_certificate.go +44 -0
- package/resource/runtime/secret_certificate_test.go +87 -0
- package/resource/storage_graph.go +4 -0
- package/resource/terminal_options.go +38 -0
- package/resource/terminalstream/stream.go +481 -0
- package/resource/terminalstream/stream_test.go +277 -0
- package/runner/docker-container-identity.schema.json +37 -0
- package/runner/docker-project-identity.schema.json +39 -0
- package/runner/docker-runtime-read-result.schema.json +317 -0
- package/runner/docker-runtime-read.schema.json +85 -0
|
@@ -5,9 +5,9 @@ package openapi
|
|
|
5
5
|
import _ "embed"
|
|
6
6
|
|
|
7
7
|
const (
|
|
8
|
-
Version = "0.
|
|
9
|
-
YAMLSHA256 = "
|
|
10
|
-
JSONSHA256 = "
|
|
8
|
+
Version = "0.2.0"
|
|
9
|
+
YAMLSHA256 = "53142496b7e62b324e4be4cf9c8b6836be3cdc540566e40aa37a5599f8f23832"
|
|
10
|
+
JSONSHA256 = "e48e5093cc70ecaff089068975dbf54683cbcbbee95024937f9596e9424cfc99"
|
|
11
11
|
)
|
|
12
12
|
|
|
13
13
|
//go:embed soha-api.yaml
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opensoha/contracts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Shared OpenSoha API, agent, MCP, skill, event, and auth contracts.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
|
-
"url": "https://github.com/opensoha/soha
|
|
9
|
+
"url": "https://github.com/opensoha/soha",
|
|
10
|
+
"directory": "contracts"
|
|
10
11
|
},
|
|
11
12
|
"type": "module",
|
|
12
13
|
"scripts": {
|
|
@@ -19,13 +20,14 @@
|
|
|
19
20
|
"validate": "node --test scripts/validate-fixtures.checks.mjs && node scripts/validate.mjs",
|
|
20
21
|
"lint:openapi": "node scripts/lint-openapi.mjs",
|
|
21
22
|
"check:openapi-breaking": "node scripts/check-openapi-breaking.mjs",
|
|
22
|
-
"check:openapi-loose-boundaries": "node scripts/check-openapi-loose-boundaries.mjs",
|
|
23
|
+
"check:openapi-loose-boundaries": "node --test scripts/check-baseline-versions.checks.mjs && node scripts/check-openapi-loose-boundaries.mjs",
|
|
23
24
|
"check:json-schema-compat": "node scripts/check-json-schema-compat.mjs",
|
|
24
25
|
"check:openapi-breaking:update": "node scripts/check-openapi-breaking.mjs --update-baseline",
|
|
25
26
|
"release:artifacts": "node scripts/prepare-release-artifacts.mjs",
|
|
26
27
|
"release:verify": "node scripts/prepare-release-artifacts.mjs --verify",
|
|
27
28
|
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
28
|
-
"test": "npm run check:version-sync && npm run check:generated && npm run validate && npm run lint:openapi && npm run check:openapi-breaking && npm run check:openapi-loose-boundaries && npm run check:json-schema-compat && npm run typecheck && go test ./..."
|
|
29
|
+
"test": "node --test scripts/check-consumer-dependency-mode.checks.mjs && npm run check:version-sync && npm run check:generated && npm run validate && npm run lint:openapi && npm run check:openapi-breaking && npm run check:openapi-loose-boundaries && npm run check:json-schema-compat && npm run typecheck && go test ./...",
|
|
30
|
+
"validate:dsh-runtime": "node scripts/validate-dsh-runtime.mjs"
|
|
29
31
|
},
|
|
30
32
|
"exports": {
|
|
31
33
|
"./delivery/document.schema.json": "./delivery/document.schema.json",
|
|
@@ -106,7 +108,15 @@
|
|
|
106
108
|
"./agent/personal-guest-tools.schema.json": "./agent/personal-guest-tools.schema.json",
|
|
107
109
|
"./agent/personal-browser-network-request.schema.json": "./agent/personal-browser-network-request.schema.json",
|
|
108
110
|
"./agent/personal-browser-network-response.schema.json": "./agent/personal-browser-network-response.schema.json",
|
|
109
|
-
"./
|
|
111
|
+
"./runner/docker-project-identity.schema.json": "./runner/docker-project-identity.schema.json",
|
|
112
|
+
"./runner/docker-container-identity.schema.json": "./runner/docker-container-identity.schema.json",
|
|
113
|
+
"./runner/docker-runtime-read.schema.json": "./runner/docker-runtime-read.schema.json",
|
|
114
|
+
"./runner/docker-runtime-read-result.schema.json": "./runner/docker-runtime-read-result.schema.json",
|
|
115
|
+
"./endpointcontrol/protocol.schema.json": "./endpointcontrol/protocol.schema.json",
|
|
116
|
+
"./network/proxy-adapter.schema.json": "./network/proxy-adapter.schema.json",
|
|
117
|
+
"./network/radius-password-verifier.schema.json": "./network/radius-password-verifier.schema.json",
|
|
118
|
+
"./network/radius-runtime.schema.json": "./network/radius-runtime.schema.json",
|
|
119
|
+
"./agent/dsh-runtime.schema.json": "./agent/dsh-runtime.schema.json"
|
|
110
120
|
},
|
|
111
121
|
"files": [
|
|
112
122
|
"delivery",
|
|
@@ -138,8 +148,11 @@
|
|
|
138
148
|
"network",
|
|
139
149
|
"knowledge",
|
|
140
150
|
"memory",
|
|
151
|
+
"docker",
|
|
141
152
|
"proxytransport",
|
|
142
|
-
"endpointcontrol"
|
|
153
|
+
"endpointcontrol",
|
|
154
|
+
"proxyadapter",
|
|
155
|
+
"proxypolicy"
|
|
143
156
|
],
|
|
144
157
|
"devDependencies": {
|
|
145
158
|
"ajv": "^8.20.0",
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
package proxyadapter
|
|
2
|
+
|
|
3
|
+
// SupportsMihomoUDP reports eligibility in the controlled native Mihomo protocol
|
|
4
|
+
// set. Input must already be normalized by the source converter: aliases,
|
|
5
|
+
// whitespace and case variants are rejected. An explicit udp:false remains false
|
|
6
|
+
// at the caller. Eligibility does not prove an upstream server supports UDP and
|
|
7
|
+
// never bypasses authorization, destination protection, rules or lease checks.
|
|
8
|
+
func SupportsMihomoUDP(protocol string) bool {
|
|
9
|
+
switch protocol {
|
|
10
|
+
case "socks5", "ss", "trojan", "vmess", "vless":
|
|
11
|
+
return true
|
|
12
|
+
default:
|
|
13
|
+
return false
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
package proxyadapter
|
|
2
|
+
|
|
3
|
+
import "testing"
|
|
4
|
+
|
|
5
|
+
func TestSupportsMihomoUDP(t *testing.T) {
|
|
6
|
+
for _, tc := range []struct {
|
|
7
|
+
protocol string
|
|
8
|
+
want bool
|
|
9
|
+
}{
|
|
10
|
+
{"socks5", true}, {"ss", true}, {"trojan", true}, {"vmess", true}, {"vless", true},
|
|
11
|
+
{"http", false}, {"https", false}, {"ssr", false}, {"snell", false}, {"unknown", false}, {"", false},
|
|
12
|
+
{"SOCKS5", false}, {"SS", false}, {"Trojan", false}, {"socks", false}, {"shadowsocks", false},
|
|
13
|
+
{" socks5", false}, {"socks5 ", false}, {"socks5\n", false}, {"ss\x00", false},
|
|
14
|
+
} {
|
|
15
|
+
t.Run(tc.protocol, func(t *testing.T) {
|
|
16
|
+
if got := SupportsMihomoUDP(tc.protocol); got != tc.want {
|
|
17
|
+
t.Fatalf("SupportsMihomoUDP(%q)=%v, want %v", tc.protocol, got, tc.want)
|
|
18
|
+
}
|
|
19
|
+
})
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
// Package proxyadapter defines the bounded local host/adapter PX-v1 protocol.
|
|
2
|
+
// The host retains mTLS, lease/floor, authorization and the egress gate.
|
|
3
|
+
package proxyadapter
|
|
4
|
+
|
|
5
|
+
import (
|
|
6
|
+
"bytes"
|
|
7
|
+
"encoding/json"
|
|
8
|
+
"errors"
|
|
9
|
+
"fmt"
|
|
10
|
+
"io"
|
|
11
|
+
"regexp"
|
|
12
|
+
"time"
|
|
13
|
+
|
|
14
|
+
api "github.com/opensoha/soha/contracts/gen/go/sohaapi"
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
const Major = 1
|
|
18
|
+
const Minor = 0
|
|
19
|
+
const MaxFrameBytes = 1 << 20
|
|
20
|
+
const MaxStderrBytes = 64 << 10
|
|
21
|
+
const MaxCommandLifetime = 30 * time.Second
|
|
22
|
+
|
|
23
|
+
// BinaryApproval is installer configuration, not caller-controlled input.
|
|
24
|
+
// Hosts must verify an absolute regular binary path, ownership and digest before spawn.
|
|
25
|
+
type BinaryApproval struct {
|
|
26
|
+
AdapterID string `json:"adapterId"`
|
|
27
|
+
Binary string `json:"binary"`
|
|
28
|
+
SHA256 string `json:"sha256"`
|
|
29
|
+
Version string `json:"version"`
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
type Method string
|
|
33
|
+
|
|
34
|
+
const (
|
|
35
|
+
Handshake Method = "handshake"
|
|
36
|
+
Prepare Method = "prepare"
|
|
37
|
+
Apply Method = "apply"
|
|
38
|
+
Observe Method = "observe"
|
|
39
|
+
Close Method = "close"
|
|
40
|
+
Select Method = "select"
|
|
41
|
+
Probe Method = "probe"
|
|
42
|
+
Refresh Method = "refresh"
|
|
43
|
+
Logs Method = "logs"
|
|
44
|
+
Diagnostics Method = "diagnostics"
|
|
45
|
+
Stop Method = "stop"
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
type Payload struct {
|
|
49
|
+
Challenge string `json:"challenge,omitempty"`
|
|
50
|
+
Descriptor *api.NetworkProxyEngineDescriptor `json:"descriptor,omitempty"`
|
|
51
|
+
Revision *int64 `json:"revision,omitempty"`
|
|
52
|
+
ContentHash string `json:"contentHash,omitempty"`
|
|
53
|
+
Content string `json:"content,omitempty"`
|
|
54
|
+
ValidUntil *time.Time `json:"validUntil,omitempty"`
|
|
55
|
+
Command *api.NetworkProxyRuntimeCommandInput `json:"command,omitempty"`
|
|
56
|
+
ConnectionID string `json:"connectionId,omitempty"`
|
|
57
|
+
IssuedAt *time.Time `json:"issuedAt,omitempty"`
|
|
58
|
+
ExpiresAt *time.Time `json:"expiresAt,omitempty"`
|
|
59
|
+
}
|
|
60
|
+
type Observation struct {
|
|
61
|
+
SampleSequence int64 `json:"sampleSequence"`
|
|
62
|
+
UploadTotal int64 `json:"uploadTotal"`
|
|
63
|
+
DownloadTotal int64 `json:"downloadTotal"`
|
|
64
|
+
TotalActive int64 `json:"totalActive"`
|
|
65
|
+
ReturnedCount int64 `json:"returnedCount"`
|
|
66
|
+
Truncated bool `json:"truncated"`
|
|
67
|
+
Freshness string `json:"freshness"`
|
|
68
|
+
Connections []api.NetworkProxyConnection `json:"connections"`
|
|
69
|
+
}
|
|
70
|
+
type Result struct {
|
|
71
|
+
CloseStatus string `json:"closeStatus,omitempty"`
|
|
72
|
+
Challenge string `json:"challenge,omitempty"`
|
|
73
|
+
Descriptor *api.NetworkProxyEngineDescriptor `json:"descriptor,omitempty"`
|
|
74
|
+
ReadbackHash string `json:"readbackHash,omitempty"`
|
|
75
|
+
Revision *int64 `json:"revision,omitempty"`
|
|
76
|
+
Observation *Observation `json:"observation,omitempty"`
|
|
77
|
+
Command *api.NetworkProxyRuntimeCommandResult `json:"command,omitempty"`
|
|
78
|
+
}
|
|
79
|
+
type ProtocolError struct {
|
|
80
|
+
Code string `json:"code"`
|
|
81
|
+
Message string `json:"message"`
|
|
82
|
+
}
|
|
83
|
+
type Frame struct {
|
|
84
|
+
Major int `json:"major"`
|
|
85
|
+
Minor int `json:"minor"`
|
|
86
|
+
RequestID string `json:"requestId"`
|
|
87
|
+
Deadline time.Time `json:"deadline"`
|
|
88
|
+
ProcessEpoch string `json:"processEpoch"`
|
|
89
|
+
Method Method `json:"method"`
|
|
90
|
+
Payload *Payload `json:"payload,omitempty"`
|
|
91
|
+
Result *Result `json:"result,omitempty"`
|
|
92
|
+
Error *ProtocolError `json:"error,omitempty"`
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
var identifier = regexp.MustCompile(`^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$`)
|
|
96
|
+
var digest = regexp.MustCompile(`^sha256:[a-f0-9]{64}$`)
|
|
97
|
+
|
|
98
|
+
// DecodeFrame accepts exactly one newline-delimited frame, including its newline
|
|
99
|
+
// in the limit. stdout must contain only these frames; logs use bounded stderr.
|
|
100
|
+
func DecodeFrame(line []byte, now time.Time) (Frame, error) {
|
|
101
|
+
var f Frame
|
|
102
|
+
if len(line) > MaxFrameBytes || len(line) == 0 || line[len(line)-1] != '\n' || bytes.Contains(line[:len(line)-1], []byte{'\n'}) {
|
|
103
|
+
return f, errors.New("invalid frame boundary or size")
|
|
104
|
+
}
|
|
105
|
+
d := json.NewDecoder(bytes.NewReader(line))
|
|
106
|
+
d.DisallowUnknownFields()
|
|
107
|
+
if err := d.Decode(&f); err != nil {
|
|
108
|
+
return f, err
|
|
109
|
+
}
|
|
110
|
+
if err := d.Decode(new(any)); err != io.EOF {
|
|
111
|
+
return f, errors.New("trailing frame data")
|
|
112
|
+
}
|
|
113
|
+
return f, f.Validate(now)
|
|
114
|
+
}
|
|
115
|
+
func (f Frame) Validate(now time.Time) error {
|
|
116
|
+
if f.Major != Major || f.Minor != Minor {
|
|
117
|
+
return errors.New("incompatible_version")
|
|
118
|
+
}
|
|
119
|
+
if !identifier.MatchString(f.RequestID) || !identifier.MatchString(f.ProcessEpoch) {
|
|
120
|
+
return errors.New("invalid correlation identity")
|
|
121
|
+
}
|
|
122
|
+
if !f.Deadline.After(now) || f.Deadline.After(now.Add(MaxCommandLifetime)) {
|
|
123
|
+
return errors.New("expired or excessive deadline")
|
|
124
|
+
}
|
|
125
|
+
switch f.Method {
|
|
126
|
+
case Handshake, Prepare, Apply, Observe, Close, Select, Probe, Refresh, Logs, Diagnostics, Stop:
|
|
127
|
+
default:
|
|
128
|
+
return errors.New("unsupported method")
|
|
129
|
+
}
|
|
130
|
+
count := 0
|
|
131
|
+
for _, v := range []bool{f.Payload != nil, f.Result != nil, f.Error != nil} {
|
|
132
|
+
if v {
|
|
133
|
+
count++
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
if count != 1 {
|
|
137
|
+
return errors.New("exactly one payload, result or error required")
|
|
138
|
+
}
|
|
139
|
+
if f.Error != nil {
|
|
140
|
+
switch f.Error.Code {
|
|
141
|
+
case "unsupported", "unavailable", "invalid_request", "expired", "epoch_mismatch", "incompatible_version", "failed":
|
|
142
|
+
default:
|
|
143
|
+
return errors.New("invalid error code")
|
|
144
|
+
}
|
|
145
|
+
if len(f.Error.Message) > 512 {
|
|
146
|
+
return errors.New("error too long")
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
if p := f.Payload; p != nil {
|
|
150
|
+
switch f.Method {
|
|
151
|
+
case Handshake:
|
|
152
|
+
if len(p.Challenge) < 32 || len(p.Challenge) > 128 {
|
|
153
|
+
return errors.New("random challenge required")
|
|
154
|
+
}
|
|
155
|
+
case Prepare, Apply:
|
|
156
|
+
if p.Revision == nil || *p.Revision < 1 || !digest.MatchString(p.ContentHash) || p.Content == "" || len(p.Content) > MaxFrameBytes || p.ValidUntil == nil || !p.ValidUntil.After(now) {
|
|
157
|
+
return errors.New("configuration identity and valid lease required")
|
|
158
|
+
}
|
|
159
|
+
case Close:
|
|
160
|
+
if !identifier.MatchString(p.ConnectionID) || p.IssuedAt == nil || p.ExpiresAt == nil {
|
|
161
|
+
return errors.New("close identity and times required")
|
|
162
|
+
}
|
|
163
|
+
if err := ValidateWindow(*p.IssuedAt, *p.ExpiresAt, now); err != nil {
|
|
164
|
+
return err
|
|
165
|
+
}
|
|
166
|
+
case Select, Probe, Refresh, Logs, Diagnostics:
|
|
167
|
+
if p.Command == nil {
|
|
168
|
+
return errors.New("typed command required")
|
|
169
|
+
}
|
|
170
|
+
if err := ValidateCommand(*p.Command, f.ProcessEpoch, now); err != nil {
|
|
171
|
+
return err
|
|
172
|
+
}
|
|
173
|
+
if string(p.Command.Kind) != string(f.Method) {
|
|
174
|
+
return errors.New("command method mismatch")
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
if r := f.Result; r != nil {
|
|
179
|
+
if r.Descriptor != nil {
|
|
180
|
+
if err := ValidateDescriptor(*r.Descriptor); err != nil {
|
|
181
|
+
return err
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
switch f.Method {
|
|
185
|
+
case Handshake:
|
|
186
|
+
if len(r.Challenge) < 32 || r.Descriptor == nil {
|
|
187
|
+
return errors.New("handshake challenge/descriptor required")
|
|
188
|
+
}
|
|
189
|
+
case Apply:
|
|
190
|
+
if r.Revision == nil || *r.Revision < 1 || !digest.MatchString(r.ReadbackHash) {
|
|
191
|
+
return errors.New("apply readback required")
|
|
192
|
+
}
|
|
193
|
+
case Close:
|
|
194
|
+
if r.CloseStatus != "closed" && r.CloseStatus != "not-found" && r.CloseStatus != "failed" {
|
|
195
|
+
return errors.New("close status required")
|
|
196
|
+
}
|
|
197
|
+
case Observe:
|
|
198
|
+
if r.Observation == nil {
|
|
199
|
+
return errors.New("observation required")
|
|
200
|
+
}
|
|
201
|
+
o := r.Observation
|
|
202
|
+
if o.SampleSequence < 0 || o.UploadTotal < 0 || o.DownloadTotal < 0 || o.TotalActive < 0 || o.ReturnedCount != int64(len(o.Connections)) || o.TotalActive < o.ReturnedCount || o.Truncated != (o.TotalActive > o.ReturnedCount) || len(o.Connections) > 200 {
|
|
203
|
+
return errors.New("invalid counts")
|
|
204
|
+
}
|
|
205
|
+
switch o.Freshness {
|
|
206
|
+
case "fresh", "stale", "unavailable":
|
|
207
|
+
default:
|
|
208
|
+
return errors.New("invalid freshness")
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
return nil
|
|
213
|
+
}
|
|
214
|
+
func ValidateWindow(issuedAt, expiresAt, now time.Time) error {
|
|
215
|
+
if issuedAt.After(now) || !expiresAt.After(now) || !expiresAt.After(issuedAt) || expiresAt.Sub(issuedAt) > MaxCommandLifetime {
|
|
216
|
+
return errors.New("expired or excessive command lifetime")
|
|
217
|
+
}
|
|
218
|
+
return nil
|
|
219
|
+
}
|
|
220
|
+
func ValidateCommand(c api.NetworkProxyRuntimeCommandInput, epoch string, now time.Time) error {
|
|
221
|
+
if !identifier.MatchString(c.RequestID) || c.ProcessEpoch != epoch || !identifier.MatchString(epoch) {
|
|
222
|
+
return errors.New("epoch or request identity mismatch")
|
|
223
|
+
}
|
|
224
|
+
if err := ValidateWindow(c.IssuedAt, c.ExpiresAt, now); err != nil {
|
|
225
|
+
return err
|
|
226
|
+
}
|
|
227
|
+
switch string(c.Kind) {
|
|
228
|
+
case "groups", "rules", "dns", "refresh", "logs", "diagnostics":
|
|
229
|
+
case "select":
|
|
230
|
+
if c.GroupID == "" || c.NodeID == "" {
|
|
231
|
+
return errors.New("selection refs required")
|
|
232
|
+
}
|
|
233
|
+
case "probe":
|
|
234
|
+
if c.ProbeProfileID == "" {
|
|
235
|
+
return errors.New("approved probe profile required")
|
|
236
|
+
}
|
|
237
|
+
default:
|
|
238
|
+
return fmt.Errorf("unsupported command %q", c.Kind)
|
|
239
|
+
}
|
|
240
|
+
return nil
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
// MatchResponse prevents late or cross-process replies from satisfying a request.
|
|
244
|
+
func MatchResponse(request, response Frame, challenge string, now time.Time) error {
|
|
245
|
+
if err := response.Validate(now); err != nil {
|
|
246
|
+
return err
|
|
247
|
+
}
|
|
248
|
+
if response.Payload != nil || response.RequestID != request.RequestID || response.ProcessEpoch != request.ProcessEpoch || response.Method != request.Method || !response.Deadline.Equal(request.Deadline) {
|
|
249
|
+
return errors.New("response correlation mismatch")
|
|
250
|
+
}
|
|
251
|
+
if request.Method == Handshake && response.Error == nil && (response.Result == nil || response.Result.Challenge != challenge) {
|
|
252
|
+
return errors.New("challenge mismatch")
|
|
253
|
+
}
|
|
254
|
+
return nil
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
// EncodeFrame includes the delimiter in the maximum frame size.
|
|
258
|
+
func EncodeFrame(f Frame, now time.Time) ([]byte, error) {
|
|
259
|
+
if err := f.Validate(now); err != nil {
|
|
260
|
+
return nil, err
|
|
261
|
+
}
|
|
262
|
+
b, err := json.Marshal(f)
|
|
263
|
+
if err != nil {
|
|
264
|
+
return nil, err
|
|
265
|
+
}
|
|
266
|
+
if len(b)+1 > MaxFrameBytes {
|
|
267
|
+
return nil, errors.New("frame too large")
|
|
268
|
+
}
|
|
269
|
+
return append(b, '\n'), nil
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
// ValidateDescriptor checks identity/protocol only. Host security capabilities
|
|
273
|
+
// are installer verified and cannot be granted by an adapter declaration.
|
|
274
|
+
func ValidateDescriptor(d api.NetworkProxyEngineDescriptor) error {
|
|
275
|
+
if !regexp.MustCompile(`^[a-z][a-z0-9.-]{0,63}$`).MatchString(d.EngineID) || !regexp.MustCompile(`^[a-z][a-z0-9.-]{0,63}$`).MatchString(d.AdapterID) || d.Version == "" || len(d.Version) > 64 || int(d.ProtocolMajor) != Major || int(d.ProtocolMinor) != Minor || len(d.Capabilities) > 64 {
|
|
276
|
+
return errors.New("invalid descriptor")
|
|
277
|
+
}
|
|
278
|
+
seen := map[string]bool{}
|
|
279
|
+
for _, c := range d.Capabilities {
|
|
280
|
+
if c == "" || len(c) > 64 || seen[c] {
|
|
281
|
+
return errors.New("invalid capabilities")
|
|
282
|
+
}
|
|
283
|
+
seen[c] = true
|
|
284
|
+
}
|
|
285
|
+
return nil
|
|
286
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
package proxyadapter
|
|
2
|
+
|
|
3
|
+
import (
|
|
4
|
+
"bytes"
|
|
5
|
+
"encoding/json"
|
|
6
|
+
"io/fs"
|
|
7
|
+
"os"
|
|
8
|
+
"path"
|
|
9
|
+
"strings"
|
|
10
|
+
"testing"
|
|
11
|
+
"time"
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
func TestAdapterResultFixtures(t *testing.T) {
|
|
15
|
+
now := time.Date(2026, 11, 8, 1, 0, 0, 0, time.UTC)
|
|
16
|
+
for _, method := range []Method{Handshake, Apply, Observe, Close} {
|
|
17
|
+
for _, valid := range []bool{true, false} {
|
|
18
|
+
dir, name := "valid", string(method)+"-result.json"
|
|
19
|
+
if !valid {
|
|
20
|
+
dir, name = "invalid", string(method)+"-incomplete-result.json"
|
|
21
|
+
}
|
|
22
|
+
t.Run(dir+"/"+name, func(t *testing.T) {
|
|
23
|
+
raw, err := fs.ReadFile(os.DirFS("../fixtures/json-schema/proxy-adapter"), path.Join(dir, name))
|
|
24
|
+
if err != nil {
|
|
25
|
+
t.Fatal(err)
|
|
26
|
+
}
|
|
27
|
+
var line bytes.Buffer
|
|
28
|
+
if err := json.Compact(&line, raw); err != nil {
|
|
29
|
+
t.Fatal(err)
|
|
30
|
+
}
|
|
31
|
+
line.WriteByte('\n')
|
|
32
|
+
if _, err = DecodeFrame(line.Bytes(), now); (err == nil) != valid {
|
|
33
|
+
t.Fatalf("DecodeFrame error = %v, want valid = %v", err, valid)
|
|
34
|
+
}
|
|
35
|
+
})
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
func TestFrameBoundariesAndCorrelation(t *testing.T) {
|
|
41
|
+
now := time.Date(2026, 11, 8, 1, 0, 0, 0, time.UTC)
|
|
42
|
+
f := Frame{Major: 1, Minor: 0, RequestID: "r1", ProcessEpoch: "e1", Deadline: now.Add(time.Second), Method: Handshake, Payload: &Payload{Challenge: strings.Repeat("a", 32)}}
|
|
43
|
+
raw, _ := json.Marshal(f)
|
|
44
|
+
raw = append(raw, '\n')
|
|
45
|
+
if _, err := DecodeFrame(raw, now); err != nil {
|
|
46
|
+
t.Fatal(err)
|
|
47
|
+
}
|
|
48
|
+
for _, bad := range [][]byte{raw[:len(raw)-1], append(append([]byte{}, raw...), raw...), []byte(strings.Repeat("x", MaxFrameBytes+1))} {
|
|
49
|
+
if _, err := DecodeFrame(bad, now); err == nil {
|
|
50
|
+
t.Fatal("invalid boundary accepted")
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
f.Major = 2
|
|
54
|
+
if err := f.Validate(now); err == nil {
|
|
55
|
+
t.Fatal("major accepted")
|
|
56
|
+
}
|
|
57
|
+
f.Major = 1
|
|
58
|
+
f.Deadline = now
|
|
59
|
+
if err := f.Validate(now); err == nil {
|
|
60
|
+
t.Fatal("expiry accepted")
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
func TestCloseWindowAndEpoch(t *testing.T) {
|
|
64
|
+
now := time.Now()
|
|
65
|
+
if ValidateWindow(now, now.Add(31*time.Second), now) == nil {
|
|
66
|
+
t.Fatal("excessive lifetime")
|
|
67
|
+
}
|
|
68
|
+
req := Frame{Major: 1, RequestID: "r1", ProcessEpoch: "e1", Deadline: now.Add(time.Second), Method: Stop, Payload: &Payload{}}
|
|
69
|
+
reply := req
|
|
70
|
+
reply.Payload = nil
|
|
71
|
+
reply.Result = &Result{}
|
|
72
|
+
reply.ProcessEpoch = "e2"
|
|
73
|
+
if MatchResponse(req, reply, "", now) == nil {
|
|
74
|
+
t.Fatal("cross epoch accepted")
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
package proxypolicy
|
|
2
|
+
|
|
3
|
+
import (
|
|
4
|
+
"net/netip"
|
|
5
|
+
"testing"
|
|
6
|
+
)
|
|
7
|
+
|
|
8
|
+
func TestMatchesDestination(t *testing.T) {
|
|
9
|
+
for _, tc := range []struct {
|
|
10
|
+
name, kind, value, host string
|
|
11
|
+
ips []netip.Addr
|
|
12
|
+
match, wantErr bool
|
|
13
|
+
}{
|
|
14
|
+
{name: "domain case and terminal dot", kind: "domain", value: "example.invalid", host: "EXAMPLE.INVALID.", match: true},
|
|
15
|
+
{name: "suffix child", kind: "domain_suffix", value: "example.invalid", host: "child.example.invalid", match: true},
|
|
16
|
+
{name: "suffix label boundary", kind: "domain_suffix", value: "example.invalid", host: "notexample.invalid"},
|
|
17
|
+
{name: "CIDR any resolved address", kind: "cidr", value: "10.0.0.0/8", host: "example.invalid", ips: []netip.Addr{netip.MustParseAddr("192.0.2.1"), netip.MustParseAddr("10.1.2.3")}, match: true},
|
|
18
|
+
{name: "mapped IPv4 literal", kind: "cidr", value: "10.0.0.0/8", host: "::ffff:10.1.2.3", match: true},
|
|
19
|
+
{name: "CIDR nonmatch", kind: "cidr", value: "10.0.0.0/8", host: "192.0.2.1"},
|
|
20
|
+
{name: "missing resolution fails closed", kind: "cidr", value: "10.0.0.0/8", host: "example.invalid", wantErr: true},
|
|
21
|
+
{name: "process is untrusted", kind: "process_name", value: "browser", host: "example.invalid", wantErr: true},
|
|
22
|
+
} {
|
|
23
|
+
t.Run(tc.name, func(t *testing.T) {
|
|
24
|
+
m := rule("r", "organization_required", tc.kind, tc.value, "reject").Matcher
|
|
25
|
+
got, err := MatchesDestination(m, tc.host, tc.ips)
|
|
26
|
+
if got != tc.match || (err != nil) != tc.wantErr {
|
|
27
|
+
t.Fatalf("got %v,%v", got, err)
|
|
28
|
+
}
|
|
29
|
+
})
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
func TestEvaluateMandatoryRejectPriority(t *testing.T) {
|
|
33
|
+
allow := rule("allow", "organization_required", "all", "", "direct")
|
|
34
|
+
deny := rule("deny", "protection", "domain_suffix", "example.invalid", "reject")
|
|
35
|
+
for _, rules := range [][]Rule{{allow, deny}, {deny, allow}} {
|
|
36
|
+
got, matched, err := EvaluateMandatory(rules, "x.example.invalid", nil)
|
|
37
|
+
if err != nil || !matched || got.Type != "reject" {
|
|
38
|
+
t.Fatalf("%+v %v %v", got, matched, err)
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
personal := rule("mine", "personal", "all", "", "reject")
|
|
42
|
+
if _, matched, err := EvaluateMandatory([]Rule{personal}, "example.invalid", nil); err != nil || matched {
|
|
43
|
+
t.Fatalf("personal became mandatory: %v %v", matched, err)
|
|
44
|
+
}
|
|
45
|
+
if _, _, err := EvaluateMandatory([]Rule{rule("process", "organization_required", "process_name", "browser", "direct")}, "example.invalid", nil); err == nil {
|
|
46
|
+
t.Fatal("untrusted mandatory process accepted")
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
package proxypolicy
|
|
2
|
+
|
|
3
|
+
import (
|
|
4
|
+
"errors"
|
|
5
|
+
"fmt"
|
|
6
|
+
"regexp"
|
|
7
|
+
"unicode/utf8"
|
|
8
|
+
|
|
9
|
+
api "github.com/opensoha/soha/contracts/gen/go/sohaapi"
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
// NarrowResult contains the effective structural subset and diagnostics for
|
|
13
|
+
// references invalidated in this invocation. It is not an authorization grant.
|
|
14
|
+
type NarrowResult struct {
|
|
15
|
+
Groups []api.NetworkProxyGroup
|
|
16
|
+
Rules []api.NetworkProxyRule
|
|
17
|
+
Conflicts []api.NetworkProxyRuleConflict
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
var narrowIdentifier = regexp.MustCompile(`^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$`)
|
|
21
|
+
|
|
22
|
+
// NarrowTargets preserves ordering and clones its inputs. It removes group
|
|
23
|
+
// members outside allowedNodeIDs, clears a revoked selection without selecting
|
|
24
|
+
// a replacement, and turns revoked node/empty-group references into reject.
|
|
25
|
+
// Mandatory rules retain their source, matcher, order and enabled state.
|
|
26
|
+
//
|
|
27
|
+
// The caller verifies scope is a subset of its previous authorization, persists
|
|
28
|
+
// a monotonic ceiling and validates inventory/credentials. ProjectionHash is the
|
|
29
|
+
// published bundle template hash, not a per-device scope/lease hash; sharing that
|
|
30
|
+
// hash is never permission to widen a previously narrowed scope.
|
|
31
|
+
//
|
|
32
|
+
// Effective Groups/Rules compose monotonically for S2 subset S1. Conflicts only
|
|
33
|
+
// describe newly invalidated references: after node/group -> reject the original
|
|
34
|
+
// target cannot be recovered. Recompute diagnostics from retained original
|
|
35
|
+
// template/personal drafts, rather than guessing a target from an existing reject.
|
|
36
|
+
func NarrowTargets(groups []api.NetworkProxyGroup, rules []api.NetworkProxyRule, allowedNodeIDs []string) (NarrowResult, error) {
|
|
37
|
+
invalid := func(err error) (NarrowResult, error) { return NarrowResult{}, err }
|
|
38
|
+
allowed := make(map[string]bool, len(allowedNodeIDs))
|
|
39
|
+
for _, id := range allowedNodeIDs {
|
|
40
|
+
if !narrowIdentifier.MatchString(id) || allowed[id] {
|
|
41
|
+
return invalid(errors.New("invalid or duplicate allowed node ID"))
|
|
42
|
+
}
|
|
43
|
+
allowed[id] = true
|
|
44
|
+
}
|
|
45
|
+
if len(groups) > 2048 || len(rules) > 10240 {
|
|
46
|
+
return invalid(errors.New("proxy policy quota exceeded"))
|
|
47
|
+
}
|
|
48
|
+
seenGroups := map[string]bool{}
|
|
49
|
+
for _, g := range groups {
|
|
50
|
+
if err := validateNarrowGroup(g); err != nil {
|
|
51
|
+
return invalid(err)
|
|
52
|
+
}
|
|
53
|
+
if seenGroups[g.GroupID] {
|
|
54
|
+
return invalid(errors.New("duplicate group ID"))
|
|
55
|
+
}
|
|
56
|
+
seenGroups[g.GroupID] = true
|
|
57
|
+
}
|
|
58
|
+
seenRules := map[string]bool{}
|
|
59
|
+
layers := map[string]int{}
|
|
60
|
+
for _, r := range rules {
|
|
61
|
+
if !narrowIdentifier.MatchString(r.RuleID) || seenRules[r.RuleID] {
|
|
62
|
+
return invalid(errors.New("invalid or duplicate rule ID"))
|
|
63
|
+
}
|
|
64
|
+
seenRules[r.RuleID] = true
|
|
65
|
+
layers[string(r.Source)]++
|
|
66
|
+
if layers[string(r.Source)] > 2048 {
|
|
67
|
+
return invalid(errors.New("rule layer quota exceeded"))
|
|
68
|
+
}
|
|
69
|
+
// Check shape before rewriting, including disabled rules. Inventory existence
|
|
70
|
+
// is intentionally not asserted: a missing group is a revoked reference.
|
|
71
|
+
targets := []Target(nil)
|
|
72
|
+
if r.Action.TargetID != "" {
|
|
73
|
+
if !narrowIdentifier.MatchString(r.Action.TargetID) {
|
|
74
|
+
return invalid(errors.New("invalid logical target ID"))
|
|
75
|
+
}
|
|
76
|
+
targets = append(targets, Target{ID: r.Action.TargetID, Kind: string(r.Action.Type)})
|
|
77
|
+
}
|
|
78
|
+
if err := ValidateRule(r, targets, true); err != nil {
|
|
79
|
+
return invalid(fmt.Errorf("rule %s: %w", r.RuleID, err))
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
out := NarrowResult{Groups: make([]api.NetworkProxyGroup, 0, len(groups)), Rules: make([]api.NetworkProxyRule, 0, len(rules)), Conflicts: []api.NetworkProxyRuleConflict{}}
|
|
83
|
+
keptGroups := map[string]bool{}
|
|
84
|
+
targets := make([]Target, 0, len(allowed)+len(groups))
|
|
85
|
+
for _, id := range allowedNodeIDs {
|
|
86
|
+
targets = append(targets, Target{ID: id, Kind: "node"})
|
|
87
|
+
}
|
|
88
|
+
for _, original := range groups {
|
|
89
|
+
g := original
|
|
90
|
+
g.NodeIDs = make([]string, 0, len(original.NodeIDs))
|
|
91
|
+
selectedKept := false
|
|
92
|
+
for _, id := range original.NodeIDs {
|
|
93
|
+
if allowed[id] {
|
|
94
|
+
g.NodeIDs = append(g.NodeIDs, id)
|
|
95
|
+
if id == g.SelectedNodeID {
|
|
96
|
+
selectedKept = true
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
if len(g.NodeIDs) == 0 {
|
|
101
|
+
continue
|
|
102
|
+
}
|
|
103
|
+
if !selectedKept {
|
|
104
|
+
g.SelectedNodeID = ""
|
|
105
|
+
}
|
|
106
|
+
if err := validateNarrowGroup(g); err != nil {
|
|
107
|
+
return invalid(err)
|
|
108
|
+
}
|
|
109
|
+
out.Groups = append(out.Groups, g)
|
|
110
|
+
keptGroups[g.GroupID] = true
|
|
111
|
+
targets = append(targets, Target{ID: g.GroupID, Kind: "group"})
|
|
112
|
+
}
|
|
113
|
+
for _, original := range rules {
|
|
114
|
+
r := original
|
|
115
|
+
revoked := string(r.Action.Type) == "node" && !allowed[r.Action.TargetID] || string(r.Action.Type) == "group" && !keptGroups[r.Action.TargetID]
|
|
116
|
+
if revoked {
|
|
117
|
+
r.Action = api.NetworkProxyRuleAction{Type: api.NetworkProxyRuleActionType("reject")}
|
|
118
|
+
// invalid_target has no masking rule. Self-reference identifies the rule
|
|
119
|
+
// requiring repair while satisfying the existing required conflict fields.
|
|
120
|
+
out.Conflicts = append(out.Conflicts, api.NetworkProxyRuleConflict{RuleID: r.RuleID, BlockingRuleID: r.RuleID, ReasonCode: api.NetworkProxyRuleConflictReasonCode("invalid_target")})
|
|
121
|
+
}
|
|
122
|
+
if err := ValidateRule(r, targets, true); err != nil {
|
|
123
|
+
return invalid(fmt.Errorf("narrowed rule %s: %w", r.RuleID, err))
|
|
124
|
+
}
|
|
125
|
+
out.Rules = append(out.Rules, r)
|
|
126
|
+
}
|
|
127
|
+
return out, nil
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
func validateNarrowGroup(g api.NetworkProxyGroup) error {
|
|
131
|
+
if !narrowIdentifier.MatchString(g.GroupID) || !utf8.ValidString(g.Label) || utf8.RuneCountInString(g.Label) < 1 || utf8.RuneCountInString(g.Label) > 128 || len(g.NodeIDs) > 128 {
|
|
132
|
+
return errors.New("invalid proxy group fields")
|
|
133
|
+
}
|
|
134
|
+
switch string(g.Type) {
|
|
135
|
+
case "select", "url_test", "fallback", "load_balance":
|
|
136
|
+
default:
|
|
137
|
+
return errors.New("unsupported proxy group type")
|
|
138
|
+
}
|
|
139
|
+
selected := g.SelectedNodeID == ""
|
|
140
|
+
for _, id := range g.NodeIDs {
|
|
141
|
+
if !narrowIdentifier.MatchString(id) {
|
|
142
|
+
return errors.New("invalid group node ID")
|
|
143
|
+
}
|
|
144
|
+
if id == g.SelectedNodeID {
|
|
145
|
+
selected = true
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
if !selected {
|
|
149
|
+
return errors.New("group selection is not a member")
|
|
150
|
+
}
|
|
151
|
+
return nil
|
|
152
|
+
}
|