@opensoha/contracts 0.1.29 → 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 +139 -15
- package/README.md +153 -49
- 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/openapi-loose-boundaries-0.1.0.json +4 -0
- 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/valid/metric-cluster-dedicated.json +5 -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/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/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/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/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/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 +72 -0
- package/gen/go/sohaapi/docker_configuration_test.go +32 -0
- package/gen/go/sohaapi/memory_types_test.go +59 -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 +6176 -294
- package/gen/go/sohaapi/types_test.go +63 -0
- package/gen/ts/sohaapi/index.ts +35472 -26118
- 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 +1 -1
- package/helmrelease/values.go +1 -1
- 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 +70067 -50518
- package/openapi/soha-api.yaml +38984 -27393
- 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/conditional_workload_action.go +63 -0
- package/resource/mutation_preconditions.go +67 -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_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/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_test.go +1 -1
- package/resource/runtime/network_topology.go +1 -1
- package/resource/runtime/network_topology_builder.go +1 -1
- package/resource/runtime/network_topology_builder_backends.go +1 -1
- package/resource/runtime/network_topology_builder_ingress.go +1 -1
- package/resource/runtime/network_topology_builder_legacy.go +1 -1
- package/resource/runtime/network_topology_builder_providers.go +1 -1
- package/resource/runtime/network_topology_builder_test.go +1 -1
- package/resource/runtime/network_topology_declarations.go +1 -1
- 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_graph_collect.go +1 -1
- package/resource/runtime/resource_graph_configuration_collect.go +1 -1
- package/resource/runtime/resource_graph_configuration_test.go +1 -1
- package/resource/runtime/resource_graph_custom_page.go +1 -1
- package/resource/runtime/resource_graph_custom_root.go +1 -1
- package/resource/runtime/resource_graph_custom_root_test.go +1 -1
- package/resource/runtime/resource_graph_enrichment.go +1 -1
- package/resource/runtime/resource_graph_enrichment_hpa_test.go +1 -1
- package/resource/runtime/resource_graph_enrichment_test.go +1 -1
- package/resource/runtime/resource_graph_network.go +1 -1
- package/resource/runtime/resource_graph_network_collect.go +1 -1
- package/resource/runtime/resource_graph_network_collect_test.go +1 -1
- package/resource/runtime/resource_graph_network_test.go +1 -1
- package/resource/runtime/resource_graph_rbac.go +1 -1
- package/resource/runtime/resource_graph_rbac_test.go +1 -1
- package/resource/runtime/resource_graph_rules.go +1 -1
- package/resource/runtime/resource_graph_storage.go +1 -1
- package/resource/runtime/resource_graph_storage_test.go +1 -1
- package/resource/runtime/resource_graph_test.go +1 -1
- 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 +1 -1
- 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
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
package proxytransport
|
|
2
|
+
|
|
3
|
+
import (
|
|
4
|
+
"bufio"
|
|
5
|
+
"context"
|
|
6
|
+
"crypto/sha256"
|
|
7
|
+
"crypto/subtle"
|
|
8
|
+
"crypto/tls"
|
|
9
|
+
"encoding/base64"
|
|
10
|
+
"errors"
|
|
11
|
+
"io"
|
|
12
|
+
"net"
|
|
13
|
+
"net/http"
|
|
14
|
+
"net/url"
|
|
15
|
+
"strconv"
|
|
16
|
+
"strings"
|
|
17
|
+
"sync"
|
|
18
|
+
"time"
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
type packetAssociation struct{ front, back net.Conn }
|
|
22
|
+
|
|
23
|
+
func (a *packetAssociation) close() { _ = a.front.Close(); _ = a.back.Close() }
|
|
24
|
+
func refreshPacketConn(c net.Conn, until time.Time) error {
|
|
25
|
+
if r, ok := c.(interface{ Refresh(time.Time) error }); ok {
|
|
26
|
+
return r.Refresh(until)
|
|
27
|
+
}
|
|
28
|
+
return c.SetDeadline(until)
|
|
29
|
+
}
|
|
30
|
+
func packetCredentials(credentials map[string]string, maxUser int) (map[string][32]byte, error) {
|
|
31
|
+
if len(credentials) == 0 || len(credentials) > 2048 {
|
|
32
|
+
return nil, errors.New("invalid packet credentials")
|
|
33
|
+
}
|
|
34
|
+
out := make(map[string][32]byte, len(credentials))
|
|
35
|
+
for user, password := range credentials {
|
|
36
|
+
if user == "" || len(user) > maxUser || len(password) < 32 {
|
|
37
|
+
return nil, errors.New("invalid packet credential")
|
|
38
|
+
}
|
|
39
|
+
out[user] = sha256.Sum256([]byte(password))
|
|
40
|
+
}
|
|
41
|
+
return out, nil
|
|
42
|
+
}
|
|
43
|
+
func authenticatePacket(credentials map[string][32]byte, user, password string) bool {
|
|
44
|
+
expected, exists := credentials[user]
|
|
45
|
+
actual := sha256.Sum256([]byte(password))
|
|
46
|
+
return exists && subtle.ConstantTimeCompare(expected[:], actual[:]) == 1
|
|
47
|
+
}
|
|
48
|
+
func singleHeader(h http.Header, name string) (string, bool) {
|
|
49
|
+
var values []string
|
|
50
|
+
for k, v := range h {
|
|
51
|
+
if strings.EqualFold(k, name) {
|
|
52
|
+
values = append(values, v...)
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
if len(values) != 1 {
|
|
56
|
+
return "", false
|
|
57
|
+
}
|
|
58
|
+
return values[0], true
|
|
59
|
+
}
|
|
60
|
+
func packetTarget(target string) error {
|
|
61
|
+
host, port, err := net.SplitHostPort(target)
|
|
62
|
+
n, e := strconv.Atoi(port)
|
|
63
|
+
if err != nil || e != nil || n < 1 || n > 65535 || host == "" || len(host) > 253 || strings.ContainsAny(host, "/@?#\\\r\n\t %") {
|
|
64
|
+
return errors.New("invalid packet target")
|
|
65
|
+
}
|
|
66
|
+
return nil
|
|
67
|
+
}
|
|
68
|
+
func authorizePacket(authorize PacketAuthorize, user, target string, until time.Time) error {
|
|
69
|
+
if !until.After(time.Now()) {
|
|
70
|
+
return net.ErrClosed
|
|
71
|
+
}
|
|
72
|
+
ctx, cancel := context.WithDeadline(context.Background(), earlier(until, time.Now().Add(3*time.Second)))
|
|
73
|
+
defer cancel()
|
|
74
|
+
return authorize(ctx, user, target)
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// PacketHandler is an explicitly selected HTTP/1 TLS datagram handler. Dispatch
|
|
78
|
+
// only requests carrying Soha-Transport to it; header-free requests retain the
|
|
79
|
+
// existing TCP Handler behavior. NoNew rejects new associations, not active ones.
|
|
80
|
+
type PacketHandler struct {
|
|
81
|
+
mu sync.Mutex
|
|
82
|
+
credentials map[string][32]byte
|
|
83
|
+
dial DialPacket
|
|
84
|
+
authorize PacketAuthorize
|
|
85
|
+
until time.Time
|
|
86
|
+
closed, noNew bool
|
|
87
|
+
pending int
|
|
88
|
+
associations map[*packetAssociation]struct{}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
func NewPacketHandler(credentials map[string]string, dial DialPacket, authorize PacketAuthorize, deadline time.Time) (*PacketHandler, error) {
|
|
92
|
+
c, err := packetCredentials(credentials, MaxUsernameBytes)
|
|
93
|
+
if err != nil {
|
|
94
|
+
return nil, err
|
|
95
|
+
}
|
|
96
|
+
if dial == nil || authorize == nil || !validPacketLease(deadline) {
|
|
97
|
+
return nil, errors.New("invalid packet handler dependencies or lease")
|
|
98
|
+
}
|
|
99
|
+
return &PacketHandler{credentials: c, dial: dial, authorize: authorize, until: deadline, associations: map[*packetAssociation]struct{}{}}, nil
|
|
100
|
+
}
|
|
101
|
+
func (h *PacketHandler) NoNew() { h.mu.Lock(); h.noNew = true; h.mu.Unlock() }
|
|
102
|
+
|
|
103
|
+
// ActiveCount counts admitted datagram associations, not HTTP or SOCKS controls.
|
|
104
|
+
func (h *PacketHandler) ActiveCount() int {
|
|
105
|
+
h.mu.Lock()
|
|
106
|
+
defer h.mu.Unlock()
|
|
107
|
+
return len(h.associations)
|
|
108
|
+
}
|
|
109
|
+
func (h *PacketHandler) Refresh(until time.Time) error {
|
|
110
|
+
h.mu.Lock()
|
|
111
|
+
defer h.mu.Unlock()
|
|
112
|
+
if h.closed || !h.until.After(time.Now()) {
|
|
113
|
+
return net.ErrClosed
|
|
114
|
+
}
|
|
115
|
+
if !validPacketLease(until) {
|
|
116
|
+
return errors.New("invalid packet renewal")
|
|
117
|
+
}
|
|
118
|
+
h.until = until
|
|
119
|
+
for a := range h.associations {
|
|
120
|
+
for _, c := range []net.Conn{a.front, a.back} {
|
|
121
|
+
if err := refreshPacketConn(c, until); err != nil {
|
|
122
|
+
if errors.Is(err, net.ErrClosed) {
|
|
123
|
+
a.close()
|
|
124
|
+
delete(h.associations, a)
|
|
125
|
+
break
|
|
126
|
+
}
|
|
127
|
+
return err
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
return nil
|
|
132
|
+
}
|
|
133
|
+
func (h *PacketHandler) Close() error {
|
|
134
|
+
h.mu.Lock()
|
|
135
|
+
defer h.mu.Unlock()
|
|
136
|
+
h.closed = true
|
|
137
|
+
h.noNew = true
|
|
138
|
+
for a := range h.associations {
|
|
139
|
+
a.close()
|
|
140
|
+
delete(h.associations, a)
|
|
141
|
+
}
|
|
142
|
+
return nil
|
|
143
|
+
}
|
|
144
|
+
func (h *PacketHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|
145
|
+
transport, ok := singleHeader(r.Header, PacketTransportHeader)
|
|
146
|
+
if r.TLS == nil || r.ProtoMajor != 1 || r.Method != http.MethodConnect || !ok || transport != PacketTransportVersion || r.ContentLength != 0 || len(r.TransferEncoding) != 0 || r.URL.User != nil || r.URL.RawQuery != "" || r.URL.Path != "" || r.URL.Host != "" && r.URL.Host != r.Host || packetTarget(r.Host) != nil {
|
|
147
|
+
http.Error(w, "invalid datagram tunnel", http.StatusBadRequest)
|
|
148
|
+
return
|
|
149
|
+
}
|
|
150
|
+
auth, ok := singleHeader(r.Header, "Proxy-Authorization")
|
|
151
|
+
request := r.Clone(r.Context())
|
|
152
|
+
request.Header = make(http.Header)
|
|
153
|
+
request.Header.Set("Authorization", auth)
|
|
154
|
+
user, secret, basicOK := request.BasicAuth()
|
|
155
|
+
if !ok || !basicOK || !authenticatePacket(h.credentials, user, secret) {
|
|
156
|
+
w.Header().Set("Proxy-Authenticate", `Basic realm="Soha managed transport"`)
|
|
157
|
+
http.Error(w, "proxy authentication required", http.StatusProxyAuthRequired)
|
|
158
|
+
return
|
|
159
|
+
}
|
|
160
|
+
h.mu.Lock()
|
|
161
|
+
until := h.until
|
|
162
|
+
available := !h.closed && !h.noNew && until.After(time.Now()) && len(h.associations)+h.pending < MaxPacketAssociations
|
|
163
|
+
if available {
|
|
164
|
+
h.pending++
|
|
165
|
+
}
|
|
166
|
+
h.mu.Unlock()
|
|
167
|
+
if !available {
|
|
168
|
+
http.Error(w, "datagram transport unavailable", http.StatusServiceUnavailable)
|
|
169
|
+
return
|
|
170
|
+
}
|
|
171
|
+
reserved := true
|
|
172
|
+
defer func() {
|
|
173
|
+
if reserved {
|
|
174
|
+
h.mu.Lock()
|
|
175
|
+
h.pending--
|
|
176
|
+
h.mu.Unlock()
|
|
177
|
+
}
|
|
178
|
+
}()
|
|
179
|
+
if err := authorizePacket(h.authorize, user, r.Host, until); err != nil {
|
|
180
|
+
http.Error(w, "datagram authorization denied", http.StatusForbidden)
|
|
181
|
+
return
|
|
182
|
+
}
|
|
183
|
+
ctx, cancel := context.WithDeadline(r.Context(), earlier(until, time.Now().Add(5*time.Second)))
|
|
184
|
+
back, err := h.dial(ctx, user, r.Host)
|
|
185
|
+
cancel()
|
|
186
|
+
if err != nil || back == nil {
|
|
187
|
+
if errors.Is(err, ErrPacketUnsupported) {
|
|
188
|
+
w.Header().Set(PacketTransportHeader, PacketTransportVersion)
|
|
189
|
+
http.Error(w, "guarded UDP transport unsupported", http.StatusNotImplemented)
|
|
190
|
+
} else {
|
|
191
|
+
http.Error(w, "datagram backend unavailable", http.StatusBadGateway)
|
|
192
|
+
}
|
|
193
|
+
return
|
|
194
|
+
}
|
|
195
|
+
defer func() { _ = back.Close() }()
|
|
196
|
+
if err := refreshPacketConn(back, until); err != nil {
|
|
197
|
+
http.Error(w, "datagram backend unavailable", http.StatusBadGateway)
|
|
198
|
+
return
|
|
199
|
+
}
|
|
200
|
+
hijacker, ok := w.(http.Hijacker)
|
|
201
|
+
if !ok {
|
|
202
|
+
http.Error(w, "datagram hijack unavailable", http.StatusInternalServerError)
|
|
203
|
+
return
|
|
204
|
+
}
|
|
205
|
+
raw, buffer, err := hijacker.Hijack()
|
|
206
|
+
if err != nil {
|
|
207
|
+
return
|
|
208
|
+
}
|
|
209
|
+
defer func() { _ = raw.Close() }()
|
|
210
|
+
front, err := NewPacketConn(&bufferedPacketStream{Conn: raw, reader: buffer.Reader}, until)
|
|
211
|
+
if err != nil {
|
|
212
|
+
return
|
|
213
|
+
}
|
|
214
|
+
defer func() { _ = front.Close() }()
|
|
215
|
+
association := &packetAssociation{front: front, back: back}
|
|
216
|
+
h.mu.Lock()
|
|
217
|
+
if h.closed || h.noNew || !h.until.After(time.Now()) {
|
|
218
|
+
h.mu.Unlock()
|
|
219
|
+
return
|
|
220
|
+
}
|
|
221
|
+
h.pending--
|
|
222
|
+
reserved = false
|
|
223
|
+
h.associations[association] = struct{}{}
|
|
224
|
+
h.mu.Unlock()
|
|
225
|
+
defer func() { association.close(); h.mu.Lock(); delete(h.associations, association); h.mu.Unlock() }()
|
|
226
|
+
if _, err := buffer.WriteString("HTTP/1.1 200 Connection Established\r\nSoha-Transport: udp/1\r\n\r\n"); err != nil {
|
|
227
|
+
return
|
|
228
|
+
}
|
|
229
|
+
if buffer.Flush() != nil {
|
|
230
|
+
return
|
|
231
|
+
}
|
|
232
|
+
done := make(chan struct{}, 2)
|
|
233
|
+
copyPackets := func(dst, src net.Conn) {
|
|
234
|
+
defer func() { done <- struct{}{} }()
|
|
235
|
+
b := make([]byte, MaxDatagramBytes)
|
|
236
|
+
for {
|
|
237
|
+
n, err := src.Read(b)
|
|
238
|
+
if err != nil {
|
|
239
|
+
return
|
|
240
|
+
}
|
|
241
|
+
h.mu.Lock()
|
|
242
|
+
lease := h.until
|
|
243
|
+
closed := h.closed
|
|
244
|
+
h.mu.Unlock()
|
|
245
|
+
if closed || authorizePacket(h.authorize, user, r.Host, lease) != nil {
|
|
246
|
+
return
|
|
247
|
+
}
|
|
248
|
+
if _, err := dst.Write(b[:n]); err != nil {
|
|
249
|
+
return
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
go copyPackets(back, front)
|
|
254
|
+
go copyPackets(front, back)
|
|
255
|
+
<-done
|
|
256
|
+
association.close()
|
|
257
|
+
<-done
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
type bufferedPacketStream struct {
|
|
261
|
+
net.Conn
|
|
262
|
+
reader *bufio.Reader
|
|
263
|
+
responseBody io.Closer
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
func (c *bufferedPacketStream) Read(p []byte) (int, error) { return c.reader.Read(p) }
|
|
267
|
+
|
|
268
|
+
func (c *bufferedPacketStream) Close() error {
|
|
269
|
+
// Closing the transport first prevents an HTTP body closer from draining
|
|
270
|
+
// the live CONNECT datagram stream. PacketConn owns this close exactly once.
|
|
271
|
+
err := c.Conn.Close()
|
|
272
|
+
if c.responseBody != nil {
|
|
273
|
+
return errors.Join(err, c.responseBody.Close())
|
|
274
|
+
}
|
|
275
|
+
return err
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
type packetHeaderReader struct {
|
|
279
|
+
reader io.Reader
|
|
280
|
+
remaining int
|
|
281
|
+
tail uint32
|
|
282
|
+
done bool
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
func (r *packetHeaderReader) Read(p []byte) (int, error) {
|
|
286
|
+
if len(p) == 0 {
|
|
287
|
+
return 0, nil
|
|
288
|
+
}
|
|
289
|
+
if r.done {
|
|
290
|
+
return r.reader.Read(p)
|
|
291
|
+
}
|
|
292
|
+
if r.remaining <= 0 {
|
|
293
|
+
return 0, errors.New("packet tunnel header exceeds limit")
|
|
294
|
+
}
|
|
295
|
+
n, err := r.reader.Read(p[:1])
|
|
296
|
+
if n > 0 {
|
|
297
|
+
r.remaining--
|
|
298
|
+
r.tail = r.tail<<8 | uint32(p[0])
|
|
299
|
+
r.done = r.tail == 0x0d0a0d0a
|
|
300
|
+
}
|
|
301
|
+
return n, err
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
// DialPacketTunnel consumes an already verified TLS connection to the approved
|
|
305
|
+
// internal endpoint, using the existing mapped HTTP Basic username. It does not
|
|
306
|
+
// follow redirects, select endpoints or fall back to TCP or OS UDP.
|
|
307
|
+
func DialPacketTunnel(ctx context.Context, rawTLSConn net.Conn, target, user, secret string, deadline time.Time) (*PacketConn, error) {
|
|
308
|
+
fail := func(err error) (*PacketConn, error) {
|
|
309
|
+
if rawTLSConn != nil {
|
|
310
|
+
_ = rawTLSConn.Close()
|
|
311
|
+
}
|
|
312
|
+
return nil, err
|
|
313
|
+
}
|
|
314
|
+
if rawTLSConn == nil || packetTarget(target) != nil || user == "" || len(user) > MaxUsernameBytes || strings.Contains(user, ":") || len(secret) < 32 || !validPacketLease(deadline) {
|
|
315
|
+
return fail(errors.New("invalid packet tunnel dependencies"))
|
|
316
|
+
}
|
|
317
|
+
stopCancel := context.AfterFunc(ctx, func() { _ = rawTLSConn.Close() })
|
|
318
|
+
defer stopCancel()
|
|
319
|
+
secured, ok := rawTLSConn.(*tls.Conn)
|
|
320
|
+
if !ok {
|
|
321
|
+
return fail(errors.New("packet tunnel requires TLS"))
|
|
322
|
+
}
|
|
323
|
+
handshake := earlier(deadline, time.Now().Add(5*time.Second))
|
|
324
|
+
if d, ok := ctx.Deadline(); ok {
|
|
325
|
+
handshake = earlier(handshake, d)
|
|
326
|
+
}
|
|
327
|
+
if err := rawTLSConn.SetDeadline(handshake); err != nil {
|
|
328
|
+
return fail(err)
|
|
329
|
+
}
|
|
330
|
+
handshakeCtx, cancel := context.WithDeadline(ctx, handshake)
|
|
331
|
+
err := secured.HandshakeContext(handshakeCtx)
|
|
332
|
+
cancel()
|
|
333
|
+
if err != nil {
|
|
334
|
+
return fail(errors.New("packet TLS handshake failed"))
|
|
335
|
+
}
|
|
336
|
+
state := secured.ConnectionState()
|
|
337
|
+
if len(state.VerifiedChains) == 0 {
|
|
338
|
+
return fail(errors.New("packet TLS identity unverified"))
|
|
339
|
+
}
|
|
340
|
+
req := &http.Request{Method: http.MethodConnect, URL: &url.URL{Opaque: target}, Host: target, Header: make(http.Header)}
|
|
341
|
+
req.Header.Set(PacketTransportHeader, PacketTransportVersion)
|
|
342
|
+
req.Header.Set("Proxy-Authorization", "Basic "+base64.StdEncoding.EncodeToString([]byte(user+":"+secret)))
|
|
343
|
+
if err := req.Write(rawTLSConn); err != nil {
|
|
344
|
+
return fail(errors.New("packet tunnel request failed"))
|
|
345
|
+
}
|
|
346
|
+
reader := bufio.NewReader(&packetHeaderReader{reader: rawTLSConn, remaining: 16 << 10})
|
|
347
|
+
response, err := http.ReadResponse(reader, req)
|
|
348
|
+
if err != nil {
|
|
349
|
+
return fail(errors.New("packet tunnel response failed"))
|
|
350
|
+
}
|
|
351
|
+
defer func() { _ = response.Body.Close() }()
|
|
352
|
+
version, ok := singleHeader(response.Header, PacketTransportHeader)
|
|
353
|
+
if response.ProtoMajor != 1 || !ok || version != PacketTransportVersion || len(response.TransferEncoding) != 0 {
|
|
354
|
+
return fail(errors.New("unsafe packet tunnel response"))
|
|
355
|
+
}
|
|
356
|
+
if response.StatusCode == http.StatusNotImplemented {
|
|
357
|
+
return fail(ErrPacketUnsupported)
|
|
358
|
+
}
|
|
359
|
+
if response.StatusCode != http.StatusOK {
|
|
360
|
+
return fail(errors.New("packet tunnel refused"))
|
|
361
|
+
}
|
|
362
|
+
stream := &bufferedPacketStream{Conn: rawTLSConn, reader: reader}
|
|
363
|
+
packet, err := NewPacketConn(stream, deadline)
|
|
364
|
+
if err != nil {
|
|
365
|
+
return fail(err)
|
|
366
|
+
}
|
|
367
|
+
// Transfer the response body to the returned connection; the deferred closer
|
|
368
|
+
// handles failure paths only and must not consume a successful tunnel.
|
|
369
|
+
stream.responseBody = response.Body
|
|
370
|
+
response.Body = http.NoBody
|
|
371
|
+
return packet, nil
|
|
372
|
+
}
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
package proxytransport
|
|
2
|
+
|
|
3
|
+
import (
|
|
4
|
+
"context"
|
|
5
|
+
"encoding/binary"
|
|
6
|
+
"errors"
|
|
7
|
+
"io"
|
|
8
|
+
"net"
|
|
9
|
+
"strconv"
|
|
10
|
+
"sync"
|
|
11
|
+
"time"
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
func loopbackAddress(address string) bool {
|
|
15
|
+
host, port, err := net.SplitHostPort(address)
|
|
16
|
+
n, e := strconv.Atoi(port)
|
|
17
|
+
ip := net.ParseIP(host)
|
|
18
|
+
return err == nil && e == nil && n > 0 && n <= 65535 && ip != nil && ip.IsLoopback()
|
|
19
|
+
}
|
|
20
|
+
func readSOCKSAddress(r io.Reader) (string, error) {
|
|
21
|
+
var kind [1]byte
|
|
22
|
+
if _, err := io.ReadFull(r, kind[:]); err != nil {
|
|
23
|
+
return "", err
|
|
24
|
+
}
|
|
25
|
+
return readSOCKSAddressType(r, kind[0])
|
|
26
|
+
}
|
|
27
|
+
func readSOCKSAddressType(r io.Reader, kind byte) (string, error) {
|
|
28
|
+
var host string
|
|
29
|
+
switch kind {
|
|
30
|
+
case 1:
|
|
31
|
+
b := make([]byte, 4)
|
|
32
|
+
if _, err := io.ReadFull(r, b); err != nil {
|
|
33
|
+
return "", err
|
|
34
|
+
}
|
|
35
|
+
host = net.IP(b).String()
|
|
36
|
+
case 4:
|
|
37
|
+
b := make([]byte, 16)
|
|
38
|
+
if _, err := io.ReadFull(r, b); err != nil {
|
|
39
|
+
return "", err
|
|
40
|
+
}
|
|
41
|
+
host = net.IP(b).String()
|
|
42
|
+
case 3:
|
|
43
|
+
var size [1]byte
|
|
44
|
+
if _, err := io.ReadFull(r, size[:]); err != nil {
|
|
45
|
+
return "", err
|
|
46
|
+
}
|
|
47
|
+
if size[0] == 0 || size[0] > 253 {
|
|
48
|
+
return "", errors.New("invalid SOCKS hostname")
|
|
49
|
+
}
|
|
50
|
+
b := make([]byte, int(size[0]))
|
|
51
|
+
if _, err := io.ReadFull(r, b); err != nil {
|
|
52
|
+
return "", err
|
|
53
|
+
}
|
|
54
|
+
host = string(b)
|
|
55
|
+
default:
|
|
56
|
+
return "", errors.New("invalid SOCKS address type")
|
|
57
|
+
}
|
|
58
|
+
var port [2]byte
|
|
59
|
+
if _, err := io.ReadFull(r, port[:]); err != nil {
|
|
60
|
+
return "", err
|
|
61
|
+
}
|
|
62
|
+
return net.JoinHostPort(host, strconv.Itoa(int(binary.BigEndian.Uint16(port[:])))), nil
|
|
63
|
+
}
|
|
64
|
+
func encodeSOCKSAddress(target string, allowZero bool) ([]byte, error) {
|
|
65
|
+
host, port, err := net.SplitHostPort(target)
|
|
66
|
+
n, e := strconv.Atoi(port)
|
|
67
|
+
hostSize := len(host)
|
|
68
|
+
if err != nil || e != nil || n < 0 || n > 65535 || !allowZero && n == 0 || hostSize == 0 || hostSize > 253 {
|
|
69
|
+
return nil, errors.New("invalid SOCKS target")
|
|
70
|
+
}
|
|
71
|
+
var b []byte
|
|
72
|
+
if ip := net.ParseIP(host); ip != nil {
|
|
73
|
+
if ip4 := ip.To4(); ip4 != nil {
|
|
74
|
+
b = append([]byte{1}, ip4...)
|
|
75
|
+
} else {
|
|
76
|
+
b = append([]byte{4}, ip.To16()...)
|
|
77
|
+
}
|
|
78
|
+
} else {
|
|
79
|
+
if !allowZero && packetTarget(target) != nil {
|
|
80
|
+
return nil, errors.New("invalid SOCKS hostname")
|
|
81
|
+
}
|
|
82
|
+
b = append([]byte{3, byte(hostSize)}, []byte(host)...)
|
|
83
|
+
}
|
|
84
|
+
b = binary.BigEndian.AppendUint16(b, uint16(n))
|
|
85
|
+
return b, nil
|
|
86
|
+
}
|
|
87
|
+
func encodeSOCKSDatagram(target string, payload []byte) ([]byte, error) {
|
|
88
|
+
address, err := encodeSOCKSAddress(target, false)
|
|
89
|
+
if err != nil {
|
|
90
|
+
return nil, err
|
|
91
|
+
}
|
|
92
|
+
if 3+len(address)+len(payload) > MaxDatagramBytes {
|
|
93
|
+
return nil, errors.New("SOCKS datagram exceeds total packet limit")
|
|
94
|
+
}
|
|
95
|
+
b := make([]byte, 3, 3+len(address)+len(payload))
|
|
96
|
+
b = append(b, address...)
|
|
97
|
+
return append(b, payload...), nil
|
|
98
|
+
}
|
|
99
|
+
func decodeSOCKSDatagram(packet []byte) (string, []byte, error) {
|
|
100
|
+
if len(packet) < 4 || len(packet) > MaxDatagramBytes || packet[0] != 0 || packet[1] != 0 || packet[2] != 0 {
|
|
101
|
+
return "", nil, errors.New("invalid or fragmented SOCKS datagram")
|
|
102
|
+
}
|
|
103
|
+
reader := &packetByteReader{data: packet[3:]}
|
|
104
|
+
target, err := readSOCKSAddress(reader)
|
|
105
|
+
if err != nil || packetTarget(target) != nil {
|
|
106
|
+
return "", nil, errors.New("invalid SOCKS datagram target")
|
|
107
|
+
}
|
|
108
|
+
return target, reader.data, nil
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
type packetByteReader struct{ data []byte }
|
|
112
|
+
|
|
113
|
+
func (r *packetByteReader) Read(p []byte) (int, error) {
|
|
114
|
+
if len(r.data) == 0 {
|
|
115
|
+
return 0, io.EOF
|
|
116
|
+
}
|
|
117
|
+
n := copy(p, r.data)
|
|
118
|
+
r.data = r.data[n:]
|
|
119
|
+
return n, nil
|
|
120
|
+
}
|
|
121
|
+
func socksClientAuth(c net.Conn, user, secret string) error {
|
|
122
|
+
userSize, secretSize := len(user), len(secret)
|
|
123
|
+
if userSize == 0 || userSize > 255 || secretSize < 32 || secretSize > 255 {
|
|
124
|
+
return errors.New("invalid SOCKS credential size")
|
|
125
|
+
}
|
|
126
|
+
if err := writePacketAll(c, []byte{5, 1, 2}); err != nil {
|
|
127
|
+
return err
|
|
128
|
+
}
|
|
129
|
+
var reply [2]byte
|
|
130
|
+
if _, err := io.ReadFull(c, reply[:]); err != nil {
|
|
131
|
+
return err
|
|
132
|
+
}
|
|
133
|
+
if reply != [2]byte{5, 2} {
|
|
134
|
+
return errors.New("SOCKS password authentication required")
|
|
135
|
+
}
|
|
136
|
+
b := []byte{1, byte(userSize)}
|
|
137
|
+
b = append(b, []byte(user)...)
|
|
138
|
+
b = append(b, byte(secretSize))
|
|
139
|
+
b = append(b, []byte(secret)...)
|
|
140
|
+
if err := writePacketAll(c, b); err != nil {
|
|
141
|
+
return err
|
|
142
|
+
}
|
|
143
|
+
if _, err := io.ReadFull(c, reply[:]); err != nil {
|
|
144
|
+
return err
|
|
145
|
+
}
|
|
146
|
+
if reply != [2]byte{1, 0} {
|
|
147
|
+
return errors.New("SOCKS authentication rejected")
|
|
148
|
+
}
|
|
149
|
+
return nil
|
|
150
|
+
}
|
|
151
|
+
func socksReply(c net.Conn, code byte, address string) error {
|
|
152
|
+
encoded, err := encodeSOCKSAddress(address, true)
|
|
153
|
+
if err != nil {
|
|
154
|
+
return err
|
|
155
|
+
}
|
|
156
|
+
return writePacketAll(c, append([]byte{5, code, 0}, encoded...))
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
type socksUDPTransport struct {
|
|
160
|
+
udp *net.UDPConn
|
|
161
|
+
control net.Conn
|
|
162
|
+
once sync.Once
|
|
163
|
+
err error
|
|
164
|
+
target string
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
func (c *socksUDPTransport) Read(p []byte) (int, error) {
|
|
168
|
+
b := make([]byte, 65536)
|
|
169
|
+
n, err := c.udp.Read(b)
|
|
170
|
+
if err != nil {
|
|
171
|
+
return 0, err
|
|
172
|
+
}
|
|
173
|
+
target, payload, err := decodeSOCKSDatagram(b[:n])
|
|
174
|
+
if err != nil {
|
|
175
|
+
return 0, err
|
|
176
|
+
}
|
|
177
|
+
if target != c.target {
|
|
178
|
+
return 0, errors.New("SOCKS UDP response changed pinned target")
|
|
179
|
+
}
|
|
180
|
+
if len(payload) > len(p) {
|
|
181
|
+
return 0, io.ErrShortBuffer
|
|
182
|
+
}
|
|
183
|
+
return copy(p, payload), nil
|
|
184
|
+
}
|
|
185
|
+
func (c *socksUDPTransport) Write(p []byte) (int, error) {
|
|
186
|
+
b, err := encodeSOCKSDatagram(c.target, p)
|
|
187
|
+
if err != nil {
|
|
188
|
+
return 0, err
|
|
189
|
+
}
|
|
190
|
+
n, err := c.udp.Write(b)
|
|
191
|
+
if err != nil {
|
|
192
|
+
return 0, err
|
|
193
|
+
}
|
|
194
|
+
if n != len(b) {
|
|
195
|
+
return 0, io.ErrShortWrite
|
|
196
|
+
}
|
|
197
|
+
return len(p), nil
|
|
198
|
+
}
|
|
199
|
+
func (c *socksUDPTransport) Close() error {
|
|
200
|
+
c.once.Do(func() { c.err = errors.Join(c.udp.Close(), c.control.Close()) })
|
|
201
|
+
return c.err
|
|
202
|
+
}
|
|
203
|
+
func (c *socksUDPTransport) LocalAddr() net.Addr { return c.udp.LocalAddr() }
|
|
204
|
+
func (c *socksUDPTransport) RemoteAddr() net.Addr { return c.udp.RemoteAddr() }
|
|
205
|
+
func (c *socksUDPTransport) SetDeadline(t time.Time) error {
|
|
206
|
+
return errors.Join(c.udp.SetDeadline(t), c.control.SetDeadline(t))
|
|
207
|
+
}
|
|
208
|
+
func (c *socksUDPTransport) SetReadDeadline(t time.Time) error {
|
|
209
|
+
return errors.Join(c.udp.SetReadDeadline(t), c.control.SetReadDeadline(t))
|
|
210
|
+
}
|
|
211
|
+
func (c *socksUDPTransport) SetWriteDeadline(t time.Time) error {
|
|
212
|
+
return errors.Join(c.udp.SetWriteDeadline(t), c.control.SetWriteDeadline(t))
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
// DialSOCKS5UDP uses an installer-owned loopback SOCKS server. target MUST be a
|
|
216
|
+
// previously authorized literal pinned IP:port. Only the relay's loopback UDP
|
|
217
|
+
// socket is dialled by the OS; the actual target is reached by the owned engine.
|
|
218
|
+
func DialSOCKS5UDP(ctx context.Context, backendAddr, user, secret, target string, deadline time.Time) (net.Conn, error) {
|
|
219
|
+
host, _, err := net.SplitHostPort(target)
|
|
220
|
+
if err != nil || net.ParseIP(host) == nil || packetTarget(target) != nil || !loopbackAddress(backendAddr) || !validPacketLease(deadline) {
|
|
221
|
+
return nil, errors.New("invalid owned SOCKS UDP endpoint or target")
|
|
222
|
+
}
|
|
223
|
+
until := earlier(deadline, time.Now().Add(5*time.Second))
|
|
224
|
+
if d, ok := ctx.Deadline(); ok {
|
|
225
|
+
until = earlier(until, d)
|
|
226
|
+
}
|
|
227
|
+
control, err := (&net.Dialer{Deadline: until}).DialContext(ctx, "tcp", backendAddr)
|
|
228
|
+
if err != nil {
|
|
229
|
+
return nil, err
|
|
230
|
+
}
|
|
231
|
+
success := false
|
|
232
|
+
defer func() {
|
|
233
|
+
if !success {
|
|
234
|
+
_ = control.Close()
|
|
235
|
+
}
|
|
236
|
+
}()
|
|
237
|
+
stop := context.AfterFunc(ctx, func() { _ = control.Close() })
|
|
238
|
+
defer stop()
|
|
239
|
+
if err := control.SetDeadline(until); err != nil {
|
|
240
|
+
return nil, err
|
|
241
|
+
}
|
|
242
|
+
if err := socksClientAuth(control, user, secret); err != nil {
|
|
243
|
+
return nil, err
|
|
244
|
+
}
|
|
245
|
+
address, _ := encodeSOCKSAddress("0.0.0.0:0", true)
|
|
246
|
+
if err := writePacketAll(control, append([]byte{5, 3, 0}, address...)); err != nil {
|
|
247
|
+
return nil, err
|
|
248
|
+
}
|
|
249
|
+
var reply [3]byte
|
|
250
|
+
if _, err := io.ReadFull(control, reply[:]); err != nil {
|
|
251
|
+
return nil, err
|
|
252
|
+
}
|
|
253
|
+
if reply == [3]byte{5, 7, 0} {
|
|
254
|
+
return nil, ErrPacketUnsupported
|
|
255
|
+
}
|
|
256
|
+
if reply != [3]byte{5, 0, 0} {
|
|
257
|
+
return nil, errors.New("SOCKS UDP association rejected")
|
|
258
|
+
}
|
|
259
|
+
relay, err := readSOCKSAddress(control)
|
|
260
|
+
if err != nil || !loopbackAddress(relay) {
|
|
261
|
+
return nil, errors.New("SOCKS UDP relay is not loopback")
|
|
262
|
+
}
|
|
263
|
+
remote, err := net.ResolveUDPAddr("udp", relay)
|
|
264
|
+
if err != nil {
|
|
265
|
+
return nil, err
|
|
266
|
+
}
|
|
267
|
+
udp, err := net.DialUDP("udp", nil, remote)
|
|
268
|
+
if err != nil {
|
|
269
|
+
return nil, err
|
|
270
|
+
}
|
|
271
|
+
// Normalize literal spellings so a response cannot switch addresses/ports.
|
|
272
|
+
canonical, _ := encodeSOCKSAddress(target, false)
|
|
273
|
+
reader := &packetByteReader{data: canonical}
|
|
274
|
+
target, err = readSOCKSAddress(reader)
|
|
275
|
+
if err != nil {
|
|
276
|
+
_ = udp.Close()
|
|
277
|
+
return nil, err
|
|
278
|
+
}
|
|
279
|
+
transport := &socksUDPTransport{udp: udp, control: control, target: target}
|
|
280
|
+
packet, err := newMessageConn(transport, deadline, transport.Read, transport.Write)
|
|
281
|
+
if err != nil {
|
|
282
|
+
_ = transport.Close()
|
|
283
|
+
return nil, err
|
|
284
|
+
}
|
|
285
|
+
success = true
|
|
286
|
+
go func() { _, _ = io.Copy(io.Discard, control); _ = packet.Close() }()
|
|
287
|
+
return packet, nil
|
|
288
|
+
}
|