@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,91 @@
|
|
|
1
|
+
package runtime
|
|
2
|
+
|
|
3
|
+
import (
|
|
4
|
+
"strings"
|
|
5
|
+
"testing"
|
|
6
|
+
)
|
|
7
|
+
|
|
8
|
+
func TestProjectIdentityNamespaceAndContainerFence(t *testing.T) {
|
|
9
|
+
a, err := NewProjectBinding("11111111-1111-4111-8111-111111111111", "22222222-2222-4222-8222-222222222222")
|
|
10
|
+
if err != nil || a.Validate() != nil {
|
|
11
|
+
t.Fatal(a, err)
|
|
12
|
+
}
|
|
13
|
+
b, _ := NewProjectBinding(a.HostUID, "33333333-3333-4333-8333-333333333333")
|
|
14
|
+
if a.Namespace == b.Namespace {
|
|
15
|
+
t.Fatal("recreated project reused namespace")
|
|
16
|
+
}
|
|
17
|
+
changedHost, _ := NewProjectBinding(b.ProjectUID, a.ProjectUID)
|
|
18
|
+
if a.Namespace == changedHost.Namespace {
|
|
19
|
+
t.Fatal("host identity ignored")
|
|
20
|
+
}
|
|
21
|
+
container := ContainerBinding{ProjectBinding: a, ServiceName: "web", ContainerID: strings.Repeat("a", 64)}
|
|
22
|
+
labels := a.Labels()
|
|
23
|
+
labels["com.docker.compose.project"] = a.Namespace
|
|
24
|
+
labels["com.docker.compose.service"] = "web"
|
|
25
|
+
if !container.MatchesContainer(container.ContainerID, labels) {
|
|
26
|
+
t.Fatal("matching container rejected")
|
|
27
|
+
}
|
|
28
|
+
for _, key := range []string{HostUIDLabel, ProjectUIDLabel, ProtocolLabel, "com.docker.compose.project", "com.docker.compose.service"} {
|
|
29
|
+
old := labels[key]
|
|
30
|
+
labels[key] = "other"
|
|
31
|
+
if container.MatchesContainer(container.ContainerID, labels) {
|
|
32
|
+
t.Fatal("identity mismatch accepted", key)
|
|
33
|
+
}
|
|
34
|
+
labels[key] = old
|
|
35
|
+
}
|
|
36
|
+
if container.MatchesContainer(strings.Repeat("b", 64), labels) {
|
|
37
|
+
t.Fatal("replacement container accepted")
|
|
38
|
+
}
|
|
39
|
+
for _, uid := range []string{"", a.HostUID + " ", strings.ToUpper(a.HostUID), "00000000-0000-0000-0000-000000000000"} {
|
|
40
|
+
if uid == a.HostUID {
|
|
41
|
+
continue
|
|
42
|
+
}
|
|
43
|
+
if _, err := NewProjectBinding(uid, a.ProjectUID); err == nil {
|
|
44
|
+
t.Fatal("invalid UID accepted", uid)
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
func TestBindComposePreservesInputAndRejectsAmbiguity(t *testing.T) {
|
|
50
|
+
b, _ := NewProjectBinding("11111111-1111-4111-8111-111111111111", "22222222-2222-4222-8222-222222222222")
|
|
51
|
+
for _, labels := range []string{"", " labels: {purpose: task115}\n", " labels: [purpose=task115]\n"} {
|
|
52
|
+
input := "name: user-name\nservices:\n web:\n image: alpine:3.21\n" + labels
|
|
53
|
+
out, err := BindCompose(input, b)
|
|
54
|
+
if err != nil || !strings.Contains(out, b.Namespace) || !strings.Contains(out, b.ProjectUID) || !strings.Contains(input, "name: user-name") {
|
|
55
|
+
t.Fatal(out, err)
|
|
56
|
+
}
|
|
57
|
+
again, err := BindCompose(out, b)
|
|
58
|
+
if err != nil || again != out {
|
|
59
|
+
t.Fatal("execution binding is not idempotent", err)
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
for _, input := range []string{"null", "[]", "services: {}", "services:\n web:\n image: one\n image: two", "services:\n web:\n container_name: other", "services:\n web:\n labels:\n io.opensoha.project-uid: other", "services:\n web:\n labels: [x=1, x=2]", "services:\n web:\n extends: base\n base:\n container_name: other", "include: outside.yaml\nservices:\n web:\n image: alpine"} {
|
|
63
|
+
if _, err := BindCompose(input, b); err == nil {
|
|
64
|
+
t.Fatal("unsafe Compose accepted", input)
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
func TestRuntimeClaimProtocolsAndStrictContainerDecode(t *testing.T) {
|
|
70
|
+
for _, values := range [][]string{nil, {IdentityProtocol}, {"future-protocol"}} {
|
|
71
|
+
if err := ValidateRuntimeProtocols(values); err != nil {
|
|
72
|
+
t.Fatal(values, err)
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
for _, values := range [][]string{{IdentityProtocol, IdentityProtocol}, {""}, {"UPPER"}, {"space value"}, {strings.Repeat("a", 65)}, {"a", "b", "c", "d", "e"}} {
|
|
76
|
+
if ValidateRuntimeProtocols(values) == nil {
|
|
77
|
+
t.Fatal("invalid protocols accepted", values)
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
p, _ := NewProjectBinding("11111111-1111-4111-8111-111111111111", "22222222-2222-4222-8222-222222222222")
|
|
81
|
+
b := ContainerBinding{ProjectBinding: p, ServiceName: "web", ContainerID: strings.Repeat("a", 64)}
|
|
82
|
+
if decoded, err := ContainerBindingFromValue(b); err != nil || decoded != b {
|
|
83
|
+
t.Fatal(decoded, err)
|
|
84
|
+
}
|
|
85
|
+
if _, err := ContainerBindingFromValue(p); err == nil {
|
|
86
|
+
t.Fatal("project-only target accepted as container")
|
|
87
|
+
}
|
|
88
|
+
if _, err := ProjectBindingFromValue(b); err == nil {
|
|
89
|
+
t.Fatal("extra container fields accepted as project binding")
|
|
90
|
+
}
|
|
91
|
+
}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
package runtime
|
|
2
|
+
|
|
3
|
+
import (
|
|
4
|
+
"errors"
|
|
5
|
+
"path"
|
|
6
|
+
"strings"
|
|
7
|
+
"unicode"
|
|
8
|
+
"unicode/utf8"
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
const ReadProtocol = "docker-runtime-read-v1"
|
|
12
|
+
|
|
13
|
+
// ReadRequest never carries Compose, environment, bearer credentials or a host
|
|
14
|
+
// source path. The container binding comes from the control plane registry.
|
|
15
|
+
type ReadRequest struct {
|
|
16
|
+
Protocol string `json:"protocol"`
|
|
17
|
+
Action string `json:"action"`
|
|
18
|
+
ProjectID string `json:"projectId"`
|
|
19
|
+
Container ContainerBinding `json:"container"`
|
|
20
|
+
TailLines int `json:"tailLines,omitempty"`
|
|
21
|
+
SinceSeconds int64 `json:"sinceSeconds,omitempty"`
|
|
22
|
+
Target string `json:"target,omitempty"`
|
|
23
|
+
Path string `json:"path,omitempty"`
|
|
24
|
+
Limit int `json:"limit,omitempty"`
|
|
25
|
+
LimitBytes int64 `json:"limitBytes,omitempty"`
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
type Volume struct {
|
|
29
|
+
Target string `json:"target"`
|
|
30
|
+
Type string `json:"type"`
|
|
31
|
+
ReadOnly bool `json:"readOnly"`
|
|
32
|
+
BrowseSupported bool `json:"browseSupported"`
|
|
33
|
+
UnsupportedReason string `json:"unsupportedReason,omitempty"`
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
type FileEntry struct {
|
|
37
|
+
Name string `json:"name"`
|
|
38
|
+
Path string `json:"path"`
|
|
39
|
+
Kind string `json:"kind"`
|
|
40
|
+
SizeBytes int64 `json:"sizeBytes"`
|
|
41
|
+
ModifiedAt string `json:"modifiedAt,omitempty"`
|
|
42
|
+
ReadSupported bool `json:"readSupported"`
|
|
43
|
+
ListSupported bool `json:"listSupported"`
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
type ReadResult struct {
|
|
47
|
+
Protocol string `json:"protocol"`
|
|
48
|
+
Action string `json:"action"`
|
|
49
|
+
ProjectID string `json:"projectId"`
|
|
50
|
+
Container ContainerBinding `json:"container"`
|
|
51
|
+
Target string `json:"target,omitempty"`
|
|
52
|
+
Path string `json:"path,omitempty"`
|
|
53
|
+
Content string `json:"content,omitempty"`
|
|
54
|
+
Encoding string `json:"encoding,omitempty"`
|
|
55
|
+
SizeBytes int64 `json:"sizeBytes"`
|
|
56
|
+
// ReturnedBytes is the UTF-8 payload length. For files.read, SizeBytes is
|
|
57
|
+
// the source file's full size and can be larger when Truncated is true.
|
|
58
|
+
ReturnedBytes int64 `json:"returnedBytes"`
|
|
59
|
+
Truncated bool `json:"truncated"`
|
|
60
|
+
Complete bool `json:"complete"`
|
|
61
|
+
Volumes []Volume `json:"volumes"`
|
|
62
|
+
Files []FileEntry `json:"files"`
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
func (r ReadRequest) Normalized(action string) (ReadRequest, error) {
|
|
66
|
+
if r.Protocol != ReadProtocol || r.Action != action || !SafeText(r.ProjectID, 128) || strings.TrimSpace(r.ProjectID) != r.ProjectID || r.ProjectID == "" || r.Container.Validate() != nil {
|
|
67
|
+
return ReadRequest{}, errors.New("docker versioned read identity is invalid")
|
|
68
|
+
}
|
|
69
|
+
switch action {
|
|
70
|
+
case "logs":
|
|
71
|
+
return r.normalizedLogs()
|
|
72
|
+
case "volumes":
|
|
73
|
+
if r.Target != "" || r.Path != "" || r.Limit != 0 || r.LimitBytes != 0 || r.TailLines != 0 || r.SinceSeconds != 0 {
|
|
74
|
+
return ReadRequest{}, errors.New("docker volume inventory does not accept file or log options")
|
|
75
|
+
}
|
|
76
|
+
case "files.list", "files.read":
|
|
77
|
+
return r.normalizedFiles(action)
|
|
78
|
+
default:
|
|
79
|
+
return ReadRequest{}, errors.New("docker versioned read action is unsupported")
|
|
80
|
+
}
|
|
81
|
+
return r, nil
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
func (r ReadRequest) normalizedLogs() (ReadRequest, error) {
|
|
85
|
+
if r.Target != "" || r.Path != "" || r.Limit != 0 || r.TailLines < 0 || r.TailLines > 2000 || r.SinceSeconds < 0 || r.SinceSeconds > 604800 || r.LimitBytes < 0 || r.LimitBytes > 1<<20 {
|
|
86
|
+
return ReadRequest{}, errors.New("docker log read options are invalid")
|
|
87
|
+
}
|
|
88
|
+
if r.TailLines == 0 {
|
|
89
|
+
r.TailLines = 200
|
|
90
|
+
}
|
|
91
|
+
if r.LimitBytes == 0 {
|
|
92
|
+
r.LimitBytes = 1 << 20
|
|
93
|
+
}
|
|
94
|
+
return r, nil
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
func (r ReadRequest) normalizedFiles(action string) (ReadRequest, error) {
|
|
98
|
+
if !ValidMountTarget(r.Target) || !ValidRelativePath(r.Path) || r.TailLines != 0 || r.SinceSeconds != 0 {
|
|
99
|
+
return ReadRequest{}, errors.New("docker volume file target or path is invalid")
|
|
100
|
+
}
|
|
101
|
+
if action == "files.list" {
|
|
102
|
+
if r.Limit < 0 || r.Limit > 1000 || r.LimitBytes != 0 {
|
|
103
|
+
return ReadRequest{}, errors.New("docker directory read limit is invalid")
|
|
104
|
+
}
|
|
105
|
+
if r.Limit == 0 {
|
|
106
|
+
r.Limit = 200
|
|
107
|
+
}
|
|
108
|
+
} else {
|
|
109
|
+
if r.Limit != 0 || r.LimitBytes < 0 || r.LimitBytes > 1<<20 {
|
|
110
|
+
return ReadRequest{}, errors.New("docker file read limit is invalid")
|
|
111
|
+
}
|
|
112
|
+
if r.LimitBytes == 0 {
|
|
113
|
+
r.LimitBytes = 256 << 10
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
if r.Path == "." {
|
|
117
|
+
r.Path = ""
|
|
118
|
+
}
|
|
119
|
+
return r, nil
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
func SafeText(value string, maximum int) bool {
|
|
123
|
+
if len(value) > maximum || !utf8.ValidString(value) {
|
|
124
|
+
return false
|
|
125
|
+
}
|
|
126
|
+
return !strings.ContainsFunc(value, unicode.IsControl)
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
func ValidMountTarget(value string) bool {
|
|
130
|
+
return SafeText(value, 4096) && strings.HasPrefix(value, "/") && value != "/" && path.Clean(value) == value && !strings.Contains(value, `\`)
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
func ValidRelativePath(value string) bool {
|
|
134
|
+
if !SafeText(value, 4096) || strings.Contains(value, `\`) || strings.HasPrefix(value, "/") {
|
|
135
|
+
return false
|
|
136
|
+
}
|
|
137
|
+
if value == "" || value == "." {
|
|
138
|
+
return true
|
|
139
|
+
}
|
|
140
|
+
return path.Clean(value) == value && value != ".." && !strings.HasPrefix(value, "../")
|
|
141
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
package runtime
|
|
2
|
+
|
|
3
|
+
import (
|
|
4
|
+
"errors"
|
|
5
|
+
"path"
|
|
6
|
+
"strings"
|
|
7
|
+
"unicode/utf8"
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
// ValidateFor binds an untrusted runtime response to the original normalized
|
|
11
|
+
// request. Callers must not accept a successful HTTP status as identity proof.
|
|
12
|
+
func (r ReadResult) ValidateFor(request ReadRequest) error {
|
|
13
|
+
req, err := request.Normalized(request.Action)
|
|
14
|
+
if err != nil || r.Protocol != ReadProtocol || r.Action != req.Action || r.ProjectID != req.ProjectID || r.Container != req.Container || r.Target != req.Target || r.Path != req.Path {
|
|
15
|
+
return errors.New("docker read response identity differs from the original request")
|
|
16
|
+
}
|
|
17
|
+
if r.Volumes == nil || r.Files == nil || r.SizeBytes < 0 || r.ReturnedBytes < 0 || r.Complete == r.Truncated {
|
|
18
|
+
return errors.New("docker read response completeness is invalid")
|
|
19
|
+
}
|
|
20
|
+
switch req.Action {
|
|
21
|
+
case "logs", "files.read":
|
|
22
|
+
return r.validateTextResult(req)
|
|
23
|
+
case "volumes":
|
|
24
|
+
return r.validateVolumes()
|
|
25
|
+
case "files.list":
|
|
26
|
+
return r.validateFiles(req)
|
|
27
|
+
}
|
|
28
|
+
return errors.New("docker read response action is unsupported")
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
func (r ReadResult) validateTextResult(req ReadRequest) error {
|
|
32
|
+
if r.Encoding != "utf-8" || !utf8.ValidString(r.Content) || strings.ContainsRune(r.Content, 0) || int64(len(r.Content)) > req.LimitBytes || r.ReturnedBytes != int64(len(r.Content)) || len(r.Files) != 0 || len(r.Volumes) != 0 {
|
|
33
|
+
return errors.New("docker read text response is invalid or exceeds its limit")
|
|
34
|
+
}
|
|
35
|
+
if req.Action == "logs" && r.SizeBytes != r.ReturnedBytes {
|
|
36
|
+
return errors.New("docker log response byte count is invalid")
|
|
37
|
+
}
|
|
38
|
+
if req.Action == "files.read" && (r.SizeBytes < r.ReturnedBytes || r.Truncated != (r.SizeBytes > r.ReturnedBytes)) {
|
|
39
|
+
return errors.New("docker file source size or truncation is invalid")
|
|
40
|
+
}
|
|
41
|
+
return nil
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
func (r ReadResult) validateVolumes() error {
|
|
45
|
+
if len(r.Volumes) > 256 || len(r.Files) != 0 || r.Content != "" || r.Encoding != "" || r.SizeBytes != 0 || r.ReturnedBytes != 0 || !r.Complete {
|
|
46
|
+
return errors.New("docker read volume response is invalid")
|
|
47
|
+
}
|
|
48
|
+
seen := map[string]bool{}
|
|
49
|
+
for _, volume := range r.Volumes {
|
|
50
|
+
if !ValidMountTarget(volume.Target) || seen[volume.Target] || !SafeText(volume.Type, 32) || volume.Type == "" || !SafeText(volume.UnsupportedReason, 256) || volume.BrowseSupported == (volume.UnsupportedReason != "") {
|
|
51
|
+
return errors.New("docker read volume metadata is invalid")
|
|
52
|
+
}
|
|
53
|
+
seen[volume.Target] = true
|
|
54
|
+
}
|
|
55
|
+
return nil
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
func (r ReadResult) validateFiles(req ReadRequest) error {
|
|
59
|
+
if len(r.Files) > req.Limit || len(r.Volumes) != 0 || r.Content != "" || r.Encoding != "" || r.SizeBytes != 0 || r.ReturnedBytes != 0 {
|
|
60
|
+
return errors.New("docker read directory response is invalid")
|
|
61
|
+
}
|
|
62
|
+
seen := map[string]bool{}
|
|
63
|
+
for _, file := range r.Files {
|
|
64
|
+
if err := file.validate(req.Path); err != nil || seen[file.Name] {
|
|
65
|
+
return errors.New("docker read file entry is invalid")
|
|
66
|
+
}
|
|
67
|
+
seen[file.Name] = true
|
|
68
|
+
}
|
|
69
|
+
return nil
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
func (f FileEntry) validate(parent string) error {
|
|
73
|
+
if f.Name == "" || f.Name == "." || f.Name == ".." || strings.Contains(f.Name, "/") || !ValidRelativePath(f.Name) || f.Path != path.Join(parent, f.Name) || f.SizeBytes < 0 || !SafeText(f.ModifiedAt, 64) {
|
|
74
|
+
return errors.New("docker file entry path or metadata is invalid")
|
|
75
|
+
}
|
|
76
|
+
switch f.Kind {
|
|
77
|
+
case "file":
|
|
78
|
+
if f.ListSupported {
|
|
79
|
+
return errors.New("docker file cannot be listed as a directory")
|
|
80
|
+
}
|
|
81
|
+
case "directory":
|
|
82
|
+
if f.ReadSupported {
|
|
83
|
+
return errors.New("docker directory cannot be read as a file")
|
|
84
|
+
}
|
|
85
|
+
case "symlink", "other":
|
|
86
|
+
if f.ReadSupported || f.ListSupported {
|
|
87
|
+
return errors.New("docker special file access is unsupported")
|
|
88
|
+
}
|
|
89
|
+
default:
|
|
90
|
+
return errors.New("docker file entry kind is unsupported")
|
|
91
|
+
}
|
|
92
|
+
return nil
|
|
93
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
package runtime
|
|
2
|
+
|
|
3
|
+
import (
|
|
4
|
+
"strings"
|
|
5
|
+
"testing"
|
|
6
|
+
)
|
|
7
|
+
|
|
8
|
+
func readFixture(action string) (ReadRequest, ReadResult) {
|
|
9
|
+
project, _ := NewProjectBinding("11111111-1111-4111-8111-111111111111", "22222222-2222-4222-8222-222222222222")
|
|
10
|
+
req := ReadRequest{Protocol: ReadProtocol, Action: action, ProjectID: "project", Container: ContainerBinding{ProjectBinding: project, ServiceName: "web", ContainerID: strings.Repeat("a", 64)}}
|
|
11
|
+
if strings.HasPrefix(action, "files.") {
|
|
12
|
+
req.Target = "/data"
|
|
13
|
+
}
|
|
14
|
+
req, _ = req.Normalized(action)
|
|
15
|
+
r := ReadResult{Protocol: ReadProtocol, Action: action, ProjectID: req.ProjectID, Container: req.Container, Target: req.Target, Complete: true, Volumes: []Volume{}, Files: []FileEntry{}}
|
|
16
|
+
if action == "logs" || action == "files.read" {
|
|
17
|
+
r.Encoding = "utf-8"
|
|
18
|
+
}
|
|
19
|
+
return req, r
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
func TestReadResultBindsExactRequestAndExplicitCompleteness(t *testing.T) {
|
|
23
|
+
for _, action := range []string{"logs", "volumes", "files.list", "files.read"} {
|
|
24
|
+
t.Run(action, func(t *testing.T) {
|
|
25
|
+
req, result := readFixture(action)
|
|
26
|
+
if err := result.ValidateFor(req); err != nil {
|
|
27
|
+
t.Fatal(err)
|
|
28
|
+
}
|
|
29
|
+
for name, change := range map[string]func(*ReadResult){
|
|
30
|
+
"replacement": func(r *ReadResult) { r.Container.ContainerID = strings.Repeat("b", 64) },
|
|
31
|
+
"project": func(r *ReadResult) { r.ProjectID = "other" },
|
|
32
|
+
"protocol": func(r *ReadResult) { r.Protocol = "old" },
|
|
33
|
+
"target": func(r *ReadResult) { r.Target = "/other" },
|
|
34
|
+
"missing inventory": func(r *ReadResult) { r.Volumes = nil },
|
|
35
|
+
"missing files": func(r *ReadResult) { r.Files = nil },
|
|
36
|
+
"unknown completeness": func(r *ReadResult) { r.Complete = false },
|
|
37
|
+
"contradictory completeness": func(r *ReadResult) { r.Truncated = true },
|
|
38
|
+
} {
|
|
39
|
+
t.Run(name, func(t *testing.T) {
|
|
40
|
+
r := result
|
|
41
|
+
change(&r)
|
|
42
|
+
if r.ValidateFor(req) == nil {
|
|
43
|
+
t.Fatal("invalid result accepted")
|
|
44
|
+
}
|
|
45
|
+
})
|
|
46
|
+
}
|
|
47
|
+
})
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
func TestReadResultRejectsEscapesSpecialFilesAndUnboundedText(t *testing.T) {
|
|
52
|
+
req, r := readFixture("files.list")
|
|
53
|
+
r.Files = []FileEntry{{Name: "文件.txt", Path: "文件.txt", Kind: "file", ReadSupported: true}}
|
|
54
|
+
if err := r.ValidateFor(req); err != nil {
|
|
55
|
+
t.Fatal(err)
|
|
56
|
+
}
|
|
57
|
+
for _, file := range []FileEntry{
|
|
58
|
+
{Name: "../outside", Path: "../outside", Kind: "file"},
|
|
59
|
+
{Name: "file", Path: "elsewhere/file", Kind: "file"},
|
|
60
|
+
{Name: "link", Path: "link", Kind: "symlink", ReadSupported: true},
|
|
61
|
+
{Name: "fifo", Path: "fifo", Kind: "other", ListSupported: true},
|
|
62
|
+
{Name: "dir", Path: "dir", Kind: "directory", ReadSupported: true},
|
|
63
|
+
} {
|
|
64
|
+
r.Files = []FileEntry{file}
|
|
65
|
+
if r.ValidateFor(req) == nil {
|
|
66
|
+
t.Fatal("unsafe entry accepted", file)
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
req, r = readFixture("logs")
|
|
70
|
+
for _, content := range []string{string([]byte{0xff}), "binary\x00", strings.Repeat("x", int(req.LimitBytes)+1)} {
|
|
71
|
+
r.Content, r.SizeBytes = content, int64(len(content))
|
|
72
|
+
if r.ValidateFor(req) == nil {
|
|
73
|
+
t.Fatal("unsafe or oversized text accepted")
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
req, r = readFixture("volumes")
|
|
77
|
+
r.Volumes = []Volume{{Target: "/data", Type: "bind", UnsupportedReason: "reader disabled"}}
|
|
78
|
+
if err := r.ValidateFor(req); err != nil {
|
|
79
|
+
t.Fatal(err)
|
|
80
|
+
}
|
|
81
|
+
r.Volumes = append(r.Volumes, r.Volumes[0])
|
|
82
|
+
if r.ValidateFor(req) == nil {
|
|
83
|
+
t.Fatal("duplicate mount accepted")
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
func TestFileReadReportsActualSourceSizeSeparatelyFromReturnedText(t *testing.T) {
|
|
88
|
+
req, r := readFixture("files.read")
|
|
89
|
+
r.Content, r.ReturnedBytes, r.SizeBytes = "中", 3, 20
|
|
90
|
+
r.Truncated, r.Complete = true, false
|
|
91
|
+
if err := r.ValidateFor(req); err != nil {
|
|
92
|
+
t.Fatal(err)
|
|
93
|
+
}
|
|
94
|
+
r.ReturnedBytes = 2
|
|
95
|
+
if r.ValidateFor(req) == nil {
|
|
96
|
+
t.Fatal("incorrect UTF-8 payload size accepted")
|
|
97
|
+
}
|
|
98
|
+
r.ReturnedBytes = 3
|
|
99
|
+
r.SizeBytes = 3
|
|
100
|
+
if r.ValidateFor(req) == nil {
|
|
101
|
+
t.Fatal("truncation without additional source bytes accepted")
|
|
102
|
+
}
|
|
103
|
+
r.Truncated, r.Complete = false, true
|
|
104
|
+
if err := r.ValidateFor(req); err != nil {
|
|
105
|
+
t.Fatal(err)
|
|
106
|
+
}
|
|
107
|
+
r.SizeBytes = 20
|
|
108
|
+
if r.ValidateFor(req) == nil {
|
|
109
|
+
t.Fatal("incomplete file claimed complete")
|
|
110
|
+
}
|
|
111
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
package runtime
|
|
2
|
+
|
|
3
|
+
import (
|
|
4
|
+
"strings"
|
|
5
|
+
"testing"
|
|
6
|
+
)
|
|
7
|
+
|
|
8
|
+
func TestReadRequestRequiresFullIdentityAndActionSpecificBounds(t *testing.T) {
|
|
9
|
+
project, _ := NewProjectBinding("11111111-1111-4111-8111-111111111111", "22222222-2222-4222-8222-222222222222")
|
|
10
|
+
base := ReadRequest{Protocol: ReadProtocol, ProjectID: "project", Container: ContainerBinding{ProjectBinding: project, ServiceName: "web", ContainerID: strings.Repeat("a", 64)}}
|
|
11
|
+
for _, action := range []string{"logs", "volumes", "files.list", "files.read"} {
|
|
12
|
+
t.Run(action, func(t *testing.T) {
|
|
13
|
+
r := base
|
|
14
|
+
r.Action = action
|
|
15
|
+
if strings.HasPrefix(action, "files.") {
|
|
16
|
+
r.Target, r.Path = "/data", "."
|
|
17
|
+
}
|
|
18
|
+
if _, err := r.Normalized(action); err != nil {
|
|
19
|
+
t.Fatal(err)
|
|
20
|
+
}
|
|
21
|
+
r.Container.ContainerID = "short"
|
|
22
|
+
if _, err := r.Normalized(action); err == nil {
|
|
23
|
+
t.Fatal("short CID accepted")
|
|
24
|
+
}
|
|
25
|
+
})
|
|
26
|
+
}
|
|
27
|
+
for name, change := range map[string]func(*ReadRequest){
|
|
28
|
+
"protocol": func(r *ReadRequest) { r.Protocol = "old" },
|
|
29
|
+
"action": func(r *ReadRequest) { r.Action = "volumes" },
|
|
30
|
+
"project control": func(r *ReadRequest) { r.ProjectID = "a\nb" },
|
|
31
|
+
"negative tail": func(r *ReadRequest) { r.TailLines = -1 },
|
|
32
|
+
"large tail": func(r *ReadRequest) { r.TailLines = 2001 },
|
|
33
|
+
"unbounded bytes": func(r *ReadRequest) { r.LimitBytes = 1<<20 + 1 },
|
|
34
|
+
"unexpected mount": func(r *ReadRequest) { r.Target = "/data" },
|
|
35
|
+
} {
|
|
36
|
+
t.Run(name, func(t *testing.T) {
|
|
37
|
+
r := base
|
|
38
|
+
r.Action = "logs"
|
|
39
|
+
change(&r)
|
|
40
|
+
if _, err := r.Normalized("logs"); err == nil {
|
|
41
|
+
t.Fatal("invalid log request accepted")
|
|
42
|
+
}
|
|
43
|
+
})
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
func TestFilePathsNeverNormalizeTraversalOrControlCharacters(t *testing.T) {
|
|
48
|
+
for _, value := range []string{"", ".", "a/b", "文件名.txt", "a b"} {
|
|
49
|
+
if !ValidRelativePath(value) {
|
|
50
|
+
t.Fatal("valid path rejected", value)
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
for _, value := range []string{"/etc/passwd", "../outside", "a/../../outside", "a/../outside", "a//b", `a\b`, "a\nfile", "\x00", string([]byte{0xff}), strings.Repeat("a", 4097)} {
|
|
54
|
+
if ValidRelativePath(value) {
|
|
55
|
+
t.Fatal("unsafe path accepted", value)
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
for _, value := range []string{"/", "/data/../etc", "/data/", `C:\data`, "/data\x00"} {
|
|
59
|
+
if ValidMountTarget(value) {
|
|
60
|
+
t.Fatal("unsafe mount target accepted", value)
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
package runtime
|
|
2
|
+
|
|
3
|
+
import (
|
|
4
|
+
"errors"
|
|
5
|
+
"strings"
|
|
6
|
+
"time"
|
|
7
|
+
|
|
8
|
+
"github.com/opensoha/soha/contracts/resource"
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
const TerminalProtocol = "docker-native-terminal-v1"
|
|
12
|
+
const TerminalInputHeader = "X-Soha-Docker-Terminal-Input"
|
|
13
|
+
|
|
14
|
+
type TerminalInput struct {
|
|
15
|
+
ExpectedContainerID string `json:"expectedContainerId"`
|
|
16
|
+
ServiceName string `json:"serviceName"`
|
|
17
|
+
Shell string `json:"shell,omitempty"`
|
|
18
|
+
Width uint16 `json:"width,omitempty"`
|
|
19
|
+
Height uint16 `json:"height,omitempty"`
|
|
20
|
+
TimeoutSeconds int64 `json:"timeoutSeconds,omitempty"`
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
func (input TerminalInput) Normalized() (TerminalInput, error) {
|
|
24
|
+
if !containerIDPattern.MatchString(input.ExpectedContainerID) || !serviceNamePattern.MatchString(input.ServiceName) {
|
|
25
|
+
return TerminalInput{}, errors.New("terminal requires an exact service and full container ID")
|
|
26
|
+
}
|
|
27
|
+
options, err := (resource.NativeTerminalOptions{Shell: input.Shell, Width: input.Width, Height: input.Height, TimeoutSeconds: input.TimeoutSeconds}).Normalized()
|
|
28
|
+
if err != nil {
|
|
29
|
+
return TerminalInput{}, err
|
|
30
|
+
}
|
|
31
|
+
input.Shell, input.Width, input.Height, input.TimeoutSeconds = options.Shell, options.Width, options.Height, options.TimeoutSeconds
|
|
32
|
+
return input, nil
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// The stream uses the same closed PTY frames and outcome semantics as native
|
|
36
|
+
// Pod terminals. UID verification here means host/project UID labels and CID.
|
|
37
|
+
type TerminalResult = resource.PodTerminalResult
|
|
38
|
+
|
|
39
|
+
type TerminalLease struct {
|
|
40
|
+
Protocol string `json:"protocol"`
|
|
41
|
+
ID string `json:"id"`
|
|
42
|
+
Status string `json:"status"`
|
|
43
|
+
ProjectID string `json:"projectId"`
|
|
44
|
+
Target ContainerBinding `json:"target"`
|
|
45
|
+
Shell string `json:"shell"`
|
|
46
|
+
CreatedAt time.Time `json:"createdAt"`
|
|
47
|
+
TicketExpiresAt time.Time `json:"ticketExpiresAt"`
|
|
48
|
+
DeadlineAt time.Time `json:"deadlineAt"`
|
|
49
|
+
ClosedAt *time.Time `json:"closedAt,omitempty"`
|
|
50
|
+
MaxInputBytes int64 `json:"maxInputBytes"`
|
|
51
|
+
MaxOutputBytes int64 `json:"maxOutputBytes"`
|
|
52
|
+
Result *TerminalResult `json:"result,omitempty"`
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
type TerminalCreated struct {
|
|
56
|
+
Session TerminalLease `json:"session"`
|
|
57
|
+
Ticket string `json:"ticket"`
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
type TerminalRequest struct {
|
|
61
|
+
Protocol string `json:"protocol"`
|
|
62
|
+
ProjectID string `json:"projectId"`
|
|
63
|
+
Container ContainerBinding `json:"container"`
|
|
64
|
+
Input TerminalInput `json:"input"`
|
|
65
|
+
DeadlineAt time.Time `json:"deadlineAt"`
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
func (input TerminalRequest) Normalized(now time.Time) (TerminalRequest, error) {
|
|
69
|
+
options, err := input.Input.Normalized()
|
|
70
|
+
if err != nil || input.Protocol != TerminalProtocol || input.ProjectID == "" || !SafeText(input.ProjectID, 128) || strings.TrimSpace(input.ProjectID) != input.ProjectID || input.Container.Validate() != nil || input.Container.ContainerID != options.ExpectedContainerID || input.Container.ServiceName != options.ServiceName {
|
|
71
|
+
return TerminalRequest{}, errors.New("docker native terminal identity or protocol is invalid")
|
|
72
|
+
}
|
|
73
|
+
if !input.DeadlineAt.After(now) || input.DeadlineAt.After(now.Add(time.Duration(options.TimeoutSeconds)*time.Second)) {
|
|
74
|
+
return TerminalRequest{}, errors.New("docker native terminal deadline is invalid")
|
|
75
|
+
}
|
|
76
|
+
input.Input = options
|
|
77
|
+
return input, nil
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
type TerminalCapabilities struct {
|
|
81
|
+
Protocol string `json:"protocol"`
|
|
82
|
+
NativePTY bool `json:"nativePty"`
|
|
83
|
+
MaxTimeoutSeconds int64 `json:"maxTimeoutSeconds"`
|
|
84
|
+
MaxInputBytes int64 `json:"maxInputBytes"`
|
|
85
|
+
MaxOutputBytes int64 `json:"maxOutputBytes"`
|
|
86
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
package runtime
|
|
2
|
+
|
|
3
|
+
import (
|
|
4
|
+
"strings"
|
|
5
|
+
"testing"
|
|
6
|
+
"time"
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
func TestNativeTerminalInputBindsFullContainerAndSharedPTYLimits(t *testing.T) {
|
|
10
|
+
input := TerminalInput{ExpectedContainerID: strings.Repeat("a", 64), ServiceName: "owned"}
|
|
11
|
+
normal, err := input.Normalized()
|
|
12
|
+
if err != nil || normal.Shell != "/bin/sh" || normal.Width != 80 || normal.Height != 24 || normal.TimeoutSeconds != 300 {
|
|
13
|
+
t.Fatalf("defaults=%+v err=%v", normal, err)
|
|
14
|
+
}
|
|
15
|
+
for _, change := range []func(*TerminalInput){
|
|
16
|
+
func(v *TerminalInput) { v.ExpectedContainerID = "prefix" }, func(v *TerminalInput) { v.ServiceName = "../other" },
|
|
17
|
+
func(v *TerminalInput) { v.Shell = "sh -c unsafe" }, func(v *TerminalInput) { v.Width = 1001 }, func(v *TerminalInput) { v.Height = 1001 },
|
|
18
|
+
func(v *TerminalInput) { v.TimeoutSeconds = -1 }, func(v *TerminalInput) { v.TimeoutSeconds = 901 },
|
|
19
|
+
} {
|
|
20
|
+
changed := input
|
|
21
|
+
change(&changed)
|
|
22
|
+
if _, err := changed.Normalized(); err == nil {
|
|
23
|
+
t.Fatal("unsafe terminal input accepted")
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
func TestNativeTerminalRequestRequiresExactBindingAndDeadline(t *testing.T) {
|
|
29
|
+
binding, err := NewProjectBinding("6f773cfe-a522-468c-8c85-4b326d41b781", "65b279e6-ea7c-412f-a822-228349f35585")
|
|
30
|
+
if err != nil {
|
|
31
|
+
t.Fatal(err)
|
|
32
|
+
}
|
|
33
|
+
now := time.Now().UTC()
|
|
34
|
+
input := TerminalRequest{Protocol: TerminalProtocol, ProjectID: "project:owned", Container: ContainerBinding{ProjectBinding: binding, ServiceName: "owned", ContainerID: strings.Repeat("a", 64)}, Input: TerminalInput{ExpectedContainerID: strings.Repeat("a", 64), ServiceName: "owned"}, DeadlineAt: now.Add(5 * time.Minute)}
|
|
35
|
+
if _, err := input.Normalized(now); err != nil {
|
|
36
|
+
t.Fatal(err)
|
|
37
|
+
}
|
|
38
|
+
for _, change := range []func(*TerminalRequest){
|
|
39
|
+
func(v *TerminalRequest) { v.Protocol = "old" }, func(v *TerminalRequest) { v.Container.ContainerID = strings.Repeat("b", 64) },
|
|
40
|
+
func(v *TerminalRequest) { v.Container.ServiceName = "foreign" }, func(v *TerminalRequest) { v.DeadlineAt = now },
|
|
41
|
+
func(v *TerminalRequest) { v.DeadlineAt = now.Add(901 * time.Second) }, func(v *TerminalRequest) { v.ProjectID = "\nother" },
|
|
42
|
+
func(v *TerminalRequest) { v.Input.TimeoutSeconds = 1 },
|
|
43
|
+
} {
|
|
44
|
+
changed := input
|
|
45
|
+
change(&changed)
|
|
46
|
+
if _, err := changed.Normalized(now); err == nil {
|
|
47
|
+
t.Fatal("unbound or expired terminal request accepted")
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"runId": "run-1",
|
|
3
|
+
"callbackToken": "agent-run-token",
|
|
4
|
+
"agentId": "agent-1",
|
|
5
|
+
"status": "succeeded",
|
|
6
|
+
"payload": {
|
|
7
|
+
"summary": "Completed"
|
|
8
|
+
},
|
|
9
|
+
"events": [
|
|
10
|
+
{
|
|
11
|
+
"type": "agent.status",
|
|
12
|
+
"providerId": "dsh",
|
|
13
|
+
"providerKind": "dsh",
|
|
14
|
+
"status": "running"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{
|
|
2
|
+
"protocol": "docker-project-identity-v1",
|
|
3
|
+
"hostUid": "11111111-1111-4111-8111-111111111111",
|
|
4
|
+
"projectUid": "22222222-2222-4222-8222-222222222222",
|
|
5
|
+
"namespace": "soha-90b3f6e0fe9888c051f30305c43f6b8ab04e99944980f8715cc9",
|
|
6
|
+
"serviceName": "web",
|
|
7
|
+
"containerId": "web-1"
|
|
8
|
+
}
|