@opensoha/contracts 0.1.26 → 0.1.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/COMPATIBILITY.md +10 -0
  2. package/auth/catalog_generated.go +2 -2
  3. package/auth/permission-catalog.json +481 -1
  4. package/compat/json-schema-ecosystem-0.1.0.json +1 -1
  5. package/compat/openapi-loose-boundaries-0.1.0.json +1 -1
  6. package/endpointcontrol/decode.go +64 -0
  7. package/endpointcontrol/models.go +138 -0
  8. package/endpointcontrol/models_test.go +51 -0
  9. package/endpointcontrol/protocol.schema.json +397 -0
  10. package/fixtures/json-schema/endpoint-controls/invalid/controls.json +16 -0
  11. package/fixtures/json-schema/endpoint-controls/invalid/missing-channel-decision.json +15 -0
  12. package/fixtures/json-schema/endpoint-controls/invalid/receipt-content.json +36 -0
  13. package/fixtures/json-schema/endpoint-controls/valid/controls.json +16 -0
  14. package/fixtures/json-schema/endpoint-controls/valid/receipt.json +35 -0
  15. package/fixtures/json-schema/network-runtime-protocol/invalid/eap-activate-bad-fingerprint.json +14 -0
  16. package/fixtures/json-schema/network-runtime-protocol/invalid/eap-gateway-request.json +14 -0
  17. package/fixtures/json-schema/network-runtime-protocol/invalid/eap-private-key-request.json +15 -0
  18. package/fixtures/json-schema/network-runtime-protocol/invalid/eap-profile-without-eap-credential.json +22 -0
  19. package/fixtures/json-schema/network-runtime-protocol/invalid/endpoint-dns-observation.json +25 -0
  20. package/fixtures/json-schema/network-runtime-protocol/invalid/gateway-presence.json +22 -0
  21. package/fixtures/json-schema/network-runtime-protocol/invalid/mihomo-protection-zero-version.json +45 -0
  22. package/fixtures/json-schema/network-runtime-protocol/invalid/presence-raw-key.json +23 -0
  23. package/fixtures/json-schema/network-runtime-protocol/invalid/presence-zero-sequence.json +22 -0
  24. package/fixtures/json-schema/network-runtime-protocol/invalid/workload-wide-vpn.json +17 -0
  25. package/fixtures/json-schema/network-runtime-protocol/valid/eap-certificate-activate.json +14 -0
  26. package/fixtures/json-schema/network-runtime-protocol/valid/eap-certificate-request.json +14 -0
  27. package/fixtures/json-schema/network-runtime-protocol/valid/eap-profile-enrollment.json +24 -0
  28. package/fixtures/json-schema/network-runtime-protocol/valid/endpoint-presence.json +22 -0
  29. package/fixtures/json-schema/network-runtime-protocol/valid/ipv6-configuration.json +102 -0
  30. package/fixtures/json-schema/network-runtime-protocol/valid/mihomo-protected-policy.json +45 -0
  31. package/fixtures/json-schema/network-runtime-protocol/valid/site-dns-ipv6.json +25 -0
  32. package/fixtures/json-schema/network-runtime-protocol/valid/workload-direct-ztna.json +20 -0
  33. package/fixtures/openapi/DLPShadowDecision/invalid/step-up-type.json +14 -0
  34. package/fixtures/openapi/DLPShadowDecision/valid/archive-v2.json +14 -0
  35. package/fixtures/openapi/DLPShadowDecision/valid/step-up.json +14 -0
  36. package/fixtures/openapi/DLPShadowInput/invalid/self-reported-result.json +7 -0
  37. package/fixtures/openapi/DLPShadowInput/invalid/too-many-samples.json +14 -0
  38. package/fixtures/openapi/DLPShadowInput/valid/bounded.json +7 -0
  39. package/fixtures/openapi/DockerVolumeDLPAppealInput/invalid/p4-response.json +3 -0
  40. package/fixtures/openapi/DockerVolumeDLPAppealInput/valid/p4-response.json +3 -0
  41. package/fixtures/openapi/DockerVolumeDLPAppealReviewInput/invalid/p4-response.json +5 -0
  42. package/fixtures/openapi/DockerVolumeDLPAppealReviewInput/valid/p4-response.json +5 -0
  43. package/fixtures/openapi/DockerVolumeDLPAuthorizationInput/invalid/p4-response.json +3 -0
  44. package/fixtures/openapi/DockerVolumeDLPAuthorizationInput/valid/p4-response.json +3 -0
  45. package/fixtures/openapi/DockerVolumeDLPContent/invalid/archive-unsupported-channel.json +9 -0
  46. package/fixtures/openapi/DockerVolumeDLPContent/invalid/p4.json +6 -0
  47. package/fixtures/openapi/DockerVolumeDLPContent/invalid/step-up-audit.json +9 -0
  48. package/fixtures/openapi/DockerVolumeDLPContent/invalid/unavailable-engine.json +9 -0
  49. package/fixtures/openapi/DockerVolumeDLPContent/invalid/unknown-data-level.json +12 -0
  50. package/fixtures/openapi/DockerVolumeDLPContent/valid/classified-rule.json +16 -0
  51. package/fixtures/openapi/DockerVolumeDLPContent/valid/p4.json +8 -0
  52. package/fixtures/openapi/DockerVolumeDLPContent/valid/step-up.json +9 -0
  53. package/fixtures/openapi/DockerVolumeDLPDecision/invalid/p4.json +9 -0
  54. package/fixtures/openapi/DockerVolumeDLPDecision/invalid/step-up-type.json +12 -0
  55. package/fixtures/openapi/DockerVolumeDLPDecision/valid/archive-v2.json +12 -0
  56. package/fixtures/openapi/DockerVolumeDLPDecision/valid/p4.json +11 -0
  57. package/fixtures/openapi/DockerVolumeDLPDecision/valid/step-up.json +12 -0
  58. package/fixtures/openapi/DockerVolumeDLPSaveInput/invalid/p4.json +11 -0
  59. package/fixtures/openapi/DockerVolumeDLPSaveInput/valid/p4.json +11 -0
  60. package/fixtures/openapi/DockerVolumeFileReadInput/invalid/p4-response.json +5 -0
  61. package/fixtures/openapi/DockerVolumeFileReadInput/valid/p4-response.json +4 -0
  62. package/fixtures/openapi/EndpointDeviceInput/invalid/reported-management.json +5 -0
  63. package/fixtures/openapi/EndpointDeviceInput/valid/management-state.json +5 -0
  64. package/fixtures/openapi/EndpointDeviceRegistrationInput/invalid/self-promote-management.json +5 -0
  65. package/fixtures/openapi/ManagedContentPasteInput/invalid/boundary.json +5 -0
  66. package/fixtures/openapi/ManagedContentPasteInput/valid/boundary.json +6 -0
  67. package/fixtures/openapi/ManagedContentPolicy/invalid/self-reported-allow.json +8 -0
  68. package/fixtures/openapi/ManagedContentPolicy/invalid/step-up-audit.json +8 -0
  69. package/fixtures/openapi/ManagedContentPolicy/invalid/unknown-extractor.json +8 -0
  70. package/fixtures/openapi/ManagedContentPolicy/valid/archive-v2.json +8 -0
  71. package/fixtures/openapi/ManagedContentPolicy/valid/network-and-level.json +10 -0
  72. package/fixtures/openapi/ManagedContentPolicy/valid/step-up.json +8 -0
  73. package/fixtures/openapi/ManagedContentReviewInput/invalid/boundary.json +5 -0
  74. package/fixtures/openapi/ManagedContentReviewInput/valid/boundary.json +5 -0
  75. package/fixtures/openapi/ManagedContentSaveInput/invalid/boundary.json +14 -0
  76. package/fixtures/openapi/ManagedContentSaveInput/valid/boundary.json +16 -0
  77. package/fixtures/openapi/ManagedContentUploadInput/invalid/boundary.json +7 -0
  78. package/fixtures/openapi/ManagedContentUploadInput/valid/boundary.json +6 -0
  79. package/fixtures/openapi/NetworkAccessPolicyInput/invalid/unknown-management-state.json +35 -0
  80. package/fixtures/openapi/NetworkAccessPolicyInput/valid/managed-device.json +35 -0
  81. package/fixtures/openapi/NetworkAdmissionPreviewRequest/invalid/deviceId-characters.json +4 -0
  82. package/fixtures/openapi/NetworkAdmissionPreviewRequest/invalid/nasBindingId-characters.json +4 -0
  83. package/fixtures/openapi/NetworkAdmissionPreviewRequest/invalid/subject-override.json +1 -0
  84. package/fixtures/openapi/NetworkAdmissionPreviewRequest/valid/device-nas.json +1 -0
  85. package/fixtures/openapi/NetworkAdmissionPreviewResult/invalid/missing-attributeVersion.json +13 -0
  86. package/fixtures/openapi/NetworkAdmissionPreviewResult/invalid/missing-evaluatedAt.json +13 -0
  87. package/fixtures/openapi/NetworkAdmissionPreviewResult/valid/versioned.json +14 -0
  88. package/fixtures/openapi/NetworkConflictAnalysisRequest/invalid/missing-runtime-ranges.json +1 -0
  89. package/fixtures/openapi/NetworkConflictAnalysisRequest/invalid/unknown-source-type.json +9 -0
  90. package/fixtures/openapi/NetworkConflictAnalysisRequest/valid/empty-runtime-ranges.json +3 -0
  91. package/fixtures/openapi/NetworkConflictAnalysisRequest/{invalid → valid}/ipv6-range.json +1 -1
  92. package/fixtures/openapi/NetworkEAPServerTrust/invalid/no-server-validation.json +5 -0
  93. package/fixtures/openapi/NetworkEAPServerTrust/valid/named-server.json +9 -0
  94. package/fixtures/openapi/NetworkEndpointResponsePolicyInput/invalid/all-sites-implicit.json +45 -0
  95. package/fixtures/openapi/NetworkEndpointResponsePolicyInput/invalid/unbounded-stages.json +54 -0
  96. package/fixtures/openapi/NetworkEndpointResponsePolicyInput/invalid/zero-heartbeat.json +47 -0
  97. package/fixtures/openapi/NetworkEndpointResponsePolicyInput/valid/staged-protection.json +47 -0
  98. package/fixtures/openapi/NetworkEndpointResponseRestoreInput/invalid/missing-reason.json +3 -0
  99. package/fixtures/openapi/NetworkEndpointResponseRestoreInput/valid/expected-current.json +4 -0
  100. package/fixtures/openapi/NetworkPolicyPreviewResult/invalid/attribute-version.json +1 -0
  101. package/fixtures/openapi/NetworkPolicyPreviewResult/valid/admission-version.json +1 -0
  102. package/fixtures/openapi/NetworkPolicySubjects/invalid/duplicate-role.json +1 -0
  103. package/fixtures/openapi/NetworkPolicySubjects/invalid/role-characters.json +5 -0
  104. package/fixtures/openapi/NetworkPolicySubjects/valid/role-bound.json +1 -0
  105. package/fixtures/openapi/NetworkProxyConfigurationInput/invalid/missing-content.json +1 -0
  106. package/fixtures/openapi/NetworkProxyConfigurationPatchInput/invalid/bad-binding-id.json +9 -0
  107. package/fixtures/openapi/NetworkProxyConfigurationPatchInput/invalid/empty-content.json +1 -0
  108. package/fixtures/openapi/NetworkProxyConfigurationPatchInput/valid/binding-only.json +11 -0
  109. package/fixtures/openapi/NetworkProxyConfigurationPatchInput/valid/clear-binding-disabled.json +5 -0
  110. package/fixtures/openapi/NetworkProxyConfigurationPatchInput/valid/enabled.json +1 -0
  111. package/fixtures/openapi/NetworkSiteInput/invalid/unknown-governance.json +6 -0
  112. package/fixtures/openapi/NetworkSiteInput/valid/restricted-unmanaged.json +6 -0
  113. package/gen/go/sohaapi/client.go +1 -1
  114. package/gen/go/sohaapi/proxy_configuration_test.go +38 -0
  115. package/gen/go/sohaapi/types.go +2825 -196
  116. package/gen/ts/sohaapi/index.ts +14533 -9883
  117. package/network/README.md +34 -0
  118. package/network/network-radius-accounting.schema.json +4 -1
  119. package/network/network-runtime-protocol.schema.json +2166 -317
  120. package/network/proxy-runtime.schema.json +482 -67
  121. package/openapi/network_control_test.go +64 -0
  122. package/openapi/soha-api.json +52989 -45064
  123. package/openapi/soha-api.yaml +26472 -20872
  124. package/openapi/spec_generated.go +3 -3
  125. package/package.json +6 -3
  126. package/proxytransport/handler.go +271 -0
  127. package/proxytransport/probe.go +30 -0
  128. package/proxytransport/scope.go +89 -0
  129. package/proxytransport/transport_test.go +60 -0
package/COMPATIBILITY.md CHANGED
@@ -22,6 +22,16 @@ Current stream: `0.1.x`.
22
22
  - `1.0.0` starts the stable contract line. After `1.0.0`, breaking changes
23
23
  require a major version bump, a migration note, and consumer coordination.
24
24
 
25
+ ## Proxy Configuration Inputs
26
+
27
+ The proxy configuration endpoint accepts partial updates through
28
+ `NetworkProxyConfigurationPatchInput`. Its optional `content` distinguishes omission
29
+ from an explicit empty value. Existing Go consumers retain
30
+ `NetworkProxyConfigurationInput.Content` as a string and the full-input
31
+ `UpdateNetworkProxyConfigurationJSONRequestBody` alias. New Go consumers that omit
32
+ encrypted content must explicitly use the Patch input. TypeScript operation types
33
+ follow the partial HTTP schema. Both full and partial requests use the same endpoint.
34
+
25
35
  ## Version Synchronization
26
36
 
27
37
  Each release must keep these values aligned:
@@ -6,8 +6,8 @@ import _ "embed"
6
6
 
7
7
  const (
8
8
  PermissionCatalogVersion = "2.0.0"
9
- PermissionCatalogContentSHA256 = "2d98b53189afa67c09a2917325e3b1b1b70aafe00d370bdabaef7d6b11ef493c"
10
- PermissionCatalogSHA256 = "ae344007ad96fa0b24a0bf74121e1db762a1b904e58b8c8b53a8ac9168abea80"
9
+ PermissionCatalogContentSHA256 = "bd4a7240d34750d3fcf38b4649f6dbe67b17fb0f6ebeb96a32f8d874685e5150"
10
+ PermissionCatalogSHA256 = "835ccdfccfa955ae3ee9377fffb4c523b53d2eb647d01840f79cce5524d72c36"
11
11
  )
12
12
 
13
13
  //go:embed permission-catalog.json
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": "authorization.opensoha.io/v1",
3
3
  "catalogVersion": "2.0.0",
4
- "contentHash": "sha256:2d98b53189afa67c09a2917325e3b1b1b70aafe00d370bdabaef7d6b11ef493c",
4
+ "contentHash": "sha256:bd4a7240d34750d3fcf38b4649f6dbe67b17fb0f6ebeb96a32f8d874685e5150",
5
5
  "permissions": [
6
6
  {
7
7
  "key": "access.directory.create",
@@ -3624,6 +3624,86 @@
3624
3624
  "status": "active",
3625
3625
  "assignable": true
3626
3626
  },
3627
+ {
3628
+ "key": "docker.dlp-appeals.review",
3629
+ "domain": "docker",
3630
+ "resource": "dlp-appeals",
3631
+ "action": "approve",
3632
+ "displayName": "审查卷文件 DLP 申诉",
3633
+ "riskLevel": "high",
3634
+ "scopeKinds": [
3635
+ "tenant",
3636
+ "workspace",
3637
+ "resource"
3638
+ ],
3639
+ "approvalPolicy": "eligible",
3640
+ "status": "active",
3641
+ "assignable": true
3642
+ },
3643
+ {
3644
+ "key": "docker.dlp-events.view",
3645
+ "domain": "docker",
3646
+ "resource": "dlp-events",
3647
+ "action": "view",
3648
+ "displayName": "查看卷文件 DLP 事件",
3649
+ "riskLevel": "read",
3650
+ "scopeKinds": [
3651
+ "tenant",
3652
+ "workspace",
3653
+ "resource"
3654
+ ],
3655
+ "approvalPolicy": "never",
3656
+ "status": "active",
3657
+ "assignable": true
3658
+ },
3659
+ {
3660
+ "key": "docker.dlp-policy.publish",
3661
+ "domain": "docker",
3662
+ "resource": "dlp-policy",
3663
+ "action": "trigger",
3664
+ "displayName": "发布卷文件 DLP 策略",
3665
+ "riskLevel": "high",
3666
+ "scopeKinds": [
3667
+ "tenant",
3668
+ "workspace",
3669
+ "resource"
3670
+ ],
3671
+ "approvalPolicy": "eligible",
3672
+ "status": "active",
3673
+ "assignable": true
3674
+ },
3675
+ {
3676
+ "key": "docker.dlp-policy.update",
3677
+ "domain": "docker",
3678
+ "resource": "dlp-policy",
3679
+ "action": "update",
3680
+ "displayName": "编辑卷文件 DLP 草稿",
3681
+ "riskLevel": "high",
3682
+ "scopeKinds": [
3683
+ "tenant",
3684
+ "workspace",
3685
+ "resource"
3686
+ ],
3687
+ "approvalPolicy": "eligible",
3688
+ "status": "active",
3689
+ "assignable": true
3690
+ },
3691
+ {
3692
+ "key": "docker.dlp-policy.view",
3693
+ "domain": "docker",
3694
+ "resource": "dlp-policy",
3695
+ "action": "view",
3696
+ "displayName": "查看卷文件 DLP 策略",
3697
+ "riskLevel": "read",
3698
+ "scopeKinds": [
3699
+ "tenant",
3700
+ "workspace",
3701
+ "resource"
3702
+ ],
3703
+ "approvalPolicy": "never",
3704
+ "status": "active",
3705
+ "assignable": true
3706
+ },
3627
3707
  {
3628
3708
  "key": "docker.hosts.create",
3629
3709
  "domain": "docker",
@@ -4742,6 +4822,214 @@
4742
4822
  "status": "active",
4743
4823
  "assignable": true
4744
4824
  },
4825
+ {
4826
+ "key": "network_access.content_destinations.publish",
4827
+ "domain": "network_access",
4828
+ "resource": "content_destinations",
4829
+ "action": "publish",
4830
+ "displayName": "发布受管内容目的连接",
4831
+ "riskLevel": "high",
4832
+ "scopeKinds": [
4833
+ "tenant",
4834
+ "workspace",
4835
+ "resource"
4836
+ ],
4837
+ "approvalPolicy": "eligible",
4838
+ "status": "active",
4839
+ "assignable": true
4840
+ },
4841
+ {
4842
+ "key": "network_access.content_destinations.update",
4843
+ "domain": "network_access",
4844
+ "resource": "content_destinations",
4845
+ "action": "update",
4846
+ "displayName": "编辑受管内容目的连接",
4847
+ "riskLevel": "high",
4848
+ "scopeKinds": [
4849
+ "tenant",
4850
+ "workspace",
4851
+ "resource"
4852
+ ],
4853
+ "approvalPolicy": "eligible",
4854
+ "status": "active",
4855
+ "assignable": true
4856
+ },
4857
+ {
4858
+ "key": "network_access.content_destinations.view",
4859
+ "domain": "network_access",
4860
+ "resource": "content_destinations",
4861
+ "action": "view",
4862
+ "displayName": "查看受管内容目的连接",
4863
+ "riskLevel": "read",
4864
+ "scopeKinds": [
4865
+ "tenant",
4866
+ "workspace",
4867
+ "resource"
4868
+ ],
4869
+ "approvalPolicy": "never",
4870
+ "status": "active",
4871
+ "assignable": true
4872
+ },
4873
+ {
4874
+ "key": "network_access.content_transfer_appeals.review",
4875
+ "domain": "network_access",
4876
+ "resource": "content_transfer_appeals",
4877
+ "action": "review",
4878
+ "displayName": "审查受管内容申诉",
4879
+ "riskLevel": "high",
4880
+ "scopeKinds": [
4881
+ "tenant",
4882
+ "workspace",
4883
+ "resource"
4884
+ ],
4885
+ "approvalPolicy": "eligible",
4886
+ "status": "active",
4887
+ "assignable": true
4888
+ },
4889
+ {
4890
+ "key": "network_access.content_transfer_events.view",
4891
+ "domain": "network_access",
4892
+ "resource": "content_transfer_events",
4893
+ "action": "view",
4894
+ "displayName": "查看受管内容安全事件",
4895
+ "riskLevel": "read",
4896
+ "scopeKinds": [
4897
+ "tenant",
4898
+ "workspace",
4899
+ "resource"
4900
+ ],
4901
+ "approvalPolicy": "never",
4902
+ "status": "active",
4903
+ "assignable": true
4904
+ },
4905
+ {
4906
+ "key": "network_access.content_transfers.create",
4907
+ "domain": "network_access",
4908
+ "resource": "content_transfers",
4909
+ "action": "create",
4910
+ "displayName": "提交受管内容传输",
4911
+ "riskLevel": "mutate",
4912
+ "scopeKinds": [
4913
+ "tenant",
4914
+ "workspace",
4915
+ "resource"
4916
+ ],
4917
+ "approvalPolicy": "eligible",
4918
+ "status": "active",
4919
+ "assignable": true
4920
+ },
4921
+ {
4922
+ "key": "network_access.content_transfers.delete",
4923
+ "domain": "network_access",
4924
+ "resource": "content_transfers",
4925
+ "action": "delete",
4926
+ "displayName": "删除自己的受管文件",
4927
+ "riskLevel": "high",
4928
+ "scopeKinds": [
4929
+ "tenant",
4930
+ "workspace",
4931
+ "resource"
4932
+ ],
4933
+ "approvalPolicy": "eligible",
4934
+ "status": "active",
4935
+ "assignable": true
4936
+ },
4937
+ {
4938
+ "key": "network_access.content_transfers.download",
4939
+ "domain": "network_access",
4940
+ "resource": "content_transfers",
4941
+ "action": "download",
4942
+ "displayName": "下载自己的受管文件",
4943
+ "riskLevel": "read",
4944
+ "scopeKinds": [
4945
+ "tenant",
4946
+ "workspace",
4947
+ "resource"
4948
+ ],
4949
+ "approvalPolicy": "never",
4950
+ "status": "active",
4951
+ "assignable": true
4952
+ },
4953
+ {
4954
+ "key": "network_access.content_transfers.view",
4955
+ "domain": "network_access",
4956
+ "resource": "content_transfers",
4957
+ "action": "view",
4958
+ "displayName": "查看自己的受管内容记录",
4959
+ "riskLevel": "read",
4960
+ "scopeKinds": [
4961
+ "tenant",
4962
+ "workspace",
4963
+ "resource"
4964
+ ],
4965
+ "approvalPolicy": "never",
4966
+ "status": "active",
4967
+ "assignable": true
4968
+ },
4969
+ {
4970
+ "key": "network_access.dlp_linkage.manage",
4971
+ "domain": "network_access",
4972
+ "resource": "dlp_linkage",
4973
+ "action": "update",
4974
+ "displayName": "管理全主体 DLP 网络联动",
4975
+ "riskLevel": "high",
4976
+ "scopeKinds": [
4977
+ "tenant",
4978
+ "workspace",
4979
+ "resource"
4980
+ ],
4981
+ "approvalPolicy": "eligible",
4982
+ "status": "active",
4983
+ "assignable": true
4984
+ },
4985
+ {
4986
+ "key": "network_access.endpoint_controls.publish",
4987
+ "domain": "network_access",
4988
+ "resource": "endpoint_controls",
4989
+ "action": "publish",
4990
+ "displayName": "发布端点通道控制",
4991
+ "riskLevel": "high",
4992
+ "scopeKinds": [
4993
+ "tenant",
4994
+ "workspace",
4995
+ "resource"
4996
+ ],
4997
+ "approvalPolicy": "eligible",
4998
+ "status": "active",
4999
+ "assignable": true
5000
+ },
5001
+ {
5002
+ "key": "network_access.endpoint_controls.update",
5003
+ "domain": "network_access",
5004
+ "resource": "endpoint_controls",
5005
+ "action": "update",
5006
+ "displayName": "编辑端点通道策略",
5007
+ "riskLevel": "high",
5008
+ "scopeKinds": [
5009
+ "tenant",
5010
+ "workspace",
5011
+ "resource"
5012
+ ],
5013
+ "approvalPolicy": "eligible",
5014
+ "status": "active",
5015
+ "assignable": true
5016
+ },
5017
+ {
5018
+ "key": "network_access.endpoint_controls.view",
5019
+ "domain": "network_access",
5020
+ "resource": "endpoint_controls",
5021
+ "action": "view",
5022
+ "displayName": "查看端点通道策略与回执",
5023
+ "riskLevel": "read",
5024
+ "scopeKinds": [
5025
+ "tenant",
5026
+ "workspace",
5027
+ "resource"
5028
+ ],
5029
+ "approvalPolicy": "eligible",
5030
+ "status": "active",
5031
+ "assignable": true
5032
+ },
4745
5033
  {
4746
5034
  "key": "network_access.endpoint_devices.update",
4747
5035
  "domain": "network_access",
@@ -4774,6 +5062,150 @@
4774
5062
  "status": "active",
4775
5063
  "assignable": true
4776
5064
  },
5065
+ {
5066
+ "key": "network_access.endpoint_response_events.maintenance",
5067
+ "domain": "network_access",
5068
+ "resource": "endpoint_response_events",
5069
+ "action": "maintenance",
5070
+ "displayName": "管理终端维护例外",
5071
+ "riskLevel": "mutate",
5072
+ "scopeKinds": [
5073
+ "tenant",
5074
+ "workspace",
5075
+ "resource"
5076
+ ],
5077
+ "approvalPolicy": "never",
5078
+ "status": "active",
5079
+ "assignable": true
5080
+ },
5081
+ {
5082
+ "key": "network_access.endpoint_response_events.restore",
5083
+ "domain": "network_access",
5084
+ "resource": "endpoint_response_events",
5085
+ "action": "restore",
5086
+ "displayName": "解除终端联动限制",
5087
+ "riskLevel": "mutate",
5088
+ "scopeKinds": [
5089
+ "tenant",
5090
+ "workspace",
5091
+ "resource"
5092
+ ],
5093
+ "approvalPolicy": "never",
5094
+ "status": "active",
5095
+ "assignable": true
5096
+ },
5097
+ {
5098
+ "key": "network_access.endpoint_response_events.view",
5099
+ "domain": "network_access",
5100
+ "resource": "endpoint_response_events",
5101
+ "action": "view",
5102
+ "displayName": "查看终端联动事件",
5103
+ "riskLevel": "read",
5104
+ "scopeKinds": [
5105
+ "tenant",
5106
+ "workspace",
5107
+ "resource"
5108
+ ],
5109
+ "approvalPolicy": "never",
5110
+ "status": "active",
5111
+ "assignable": true
5112
+ },
5113
+ {
5114
+ "key": "network_access.endpoint_response_policies.create",
5115
+ "domain": "network_access",
5116
+ "resource": "endpoint_response_policies",
5117
+ "action": "create",
5118
+ "displayName": "创建终端联动策略",
5119
+ "riskLevel": "mutate",
5120
+ "scopeKinds": [
5121
+ "tenant",
5122
+ "workspace",
5123
+ "resource"
5124
+ ],
5125
+ "approvalPolicy": "never",
5126
+ "status": "active",
5127
+ "assignable": true
5128
+ },
5129
+ {
5130
+ "key": "network_access.endpoint_response_policies.delete",
5131
+ "domain": "network_access",
5132
+ "resource": "endpoint_response_policies",
5133
+ "action": "delete",
5134
+ "displayName": "停用终端联动策略",
5135
+ "riskLevel": "mutate",
5136
+ "scopeKinds": [
5137
+ "tenant",
5138
+ "workspace",
5139
+ "resource"
5140
+ ],
5141
+ "approvalPolicy": "never",
5142
+ "status": "active",
5143
+ "assignable": true
5144
+ },
5145
+ {
5146
+ "key": "network_access.endpoint_response_policies.preview",
5147
+ "domain": "network_access",
5148
+ "resource": "endpoint_response_policies",
5149
+ "action": "preview",
5150
+ "displayName": "预览终端联动策略",
5151
+ "riskLevel": "read",
5152
+ "scopeKinds": [
5153
+ "tenant",
5154
+ "workspace",
5155
+ "resource"
5156
+ ],
5157
+ "approvalPolicy": "never",
5158
+ "status": "active",
5159
+ "assignable": true
5160
+ },
5161
+ {
5162
+ "key": "network_access.endpoint_response_policies.publish",
5163
+ "domain": "network_access",
5164
+ "resource": "endpoint_response_policies",
5165
+ "action": "publish",
5166
+ "displayName": "发布终端联动策略",
5167
+ "riskLevel": "mutate",
5168
+ "scopeKinds": [
5169
+ "tenant",
5170
+ "workspace",
5171
+ "resource"
5172
+ ],
5173
+ "approvalPolicy": "never",
5174
+ "status": "active",
5175
+ "assignable": true
5176
+ },
5177
+ {
5178
+ "key": "network_access.endpoint_response_policies.update",
5179
+ "domain": "network_access",
5180
+ "resource": "endpoint_response_policies",
5181
+ "action": "update",
5182
+ "displayName": "修改终端联动策略",
5183
+ "riskLevel": "mutate",
5184
+ "scopeKinds": [
5185
+ "tenant",
5186
+ "workspace",
5187
+ "resource"
5188
+ ],
5189
+ "approvalPolicy": "never",
5190
+ "status": "active",
5191
+ "assignable": true
5192
+ },
5193
+ {
5194
+ "key": "network_access.endpoint_response_policies.view",
5195
+ "domain": "network_access",
5196
+ "resource": "endpoint_response_policies",
5197
+ "action": "view",
5198
+ "displayName": "查看终端联动策略",
5199
+ "riskLevel": "read",
5200
+ "scopeKinds": [
5201
+ "tenant",
5202
+ "workspace",
5203
+ "resource"
5204
+ ],
5205
+ "approvalPolicy": "never",
5206
+ "status": "active",
5207
+ "assignable": true
5208
+ },
4777
5209
  {
4778
5210
  "key": "network_access.enrollments.create",
4779
5211
  "domain": "network_access",
@@ -5478,6 +5910,54 @@
5478
5910
  "status": "active",
5479
5911
  "assignable": true
5480
5912
  },
5913
+ {
5914
+ "key": "network_access.vpn_sessions.release",
5915
+ "domain": "network_access",
5916
+ "resource": "vpn_sessions",
5917
+ "action": "release",
5918
+ "displayName": "解除 VPN 重连限制",
5919
+ "riskLevel": "mutate",
5920
+ "scopeKinds": [
5921
+ "tenant",
5922
+ "workspace",
5923
+ "resource"
5924
+ ],
5925
+ "approvalPolicy": "never",
5926
+ "status": "active",
5927
+ "assignable": true
5928
+ },
5929
+ {
5930
+ "key": "network_access.vpn_sessions.revoke",
5931
+ "domain": "network_access",
5932
+ "resource": "vpn_sessions",
5933
+ "action": "revoke",
5934
+ "displayName": "撤销 VPN 会话与重连",
5935
+ "riskLevel": "execute",
5936
+ "scopeKinds": [
5937
+ "tenant",
5938
+ "workspace",
5939
+ "resource"
5940
+ ],
5941
+ "approvalPolicy": "never",
5942
+ "status": "active",
5943
+ "assignable": true
5944
+ },
5945
+ {
5946
+ "key": "network_access.vpn_sessions.view",
5947
+ "domain": "network_access",
5948
+ "resource": "vpn_sessions",
5949
+ "action": "view",
5950
+ "displayName": "查看 VPN 会话限制",
5951
+ "riskLevel": "read",
5952
+ "scopeKinds": [
5953
+ "tenant",
5954
+ "workspace",
5955
+ "resource"
5956
+ ],
5957
+ "approvalPolicy": "never",
5958
+ "status": "active",
5959
+ "assignable": true
5960
+ },
5481
5961
  {
5482
5962
  "key": "observe.ai.chat",
5483
5963
  "domain": "observe",
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.1.26",
2
+ "version": "0.1.27",
3
3
  "schemas": {
4
4
  "plugins/plugin-manifest.schema.json": {
5
5
  "rootRequired": ["id", "name", "publisher", "type", "version"],
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.1.26",
2
+ "version": "0.1.27",
3
3
  "generatedFrom": "openapi/soha-api.yaml",
4
4
  "entries": [
5
5
  {
@@ -0,0 +1,64 @@
1
+ package endpointcontrol
2
+
3
+ import (
4
+ "errors"
5
+ "time"
6
+ )
7
+
8
+ // Required booleans must be present, including explicit false. Missing input
9
+ // must never become a newer all-off policy through Go zero values.
10
+ func (c *Controls) UnmarshalJSON(raw []byte) error {
11
+ var w struct {
12
+ USB *bool `json:"usb"`
13
+ Print *bool `json:"print"`
14
+ Clipboard *bool `json:"clipboard"`
15
+ }
16
+ if err := Decode(raw, &w); err != nil {
17
+ return err
18
+ }
19
+ if w.USB == nil || w.Print == nil || w.Clipboard == nil {
20
+ return errors.New("all native channel decisions are required")
21
+ }
22
+ *c = Controls{USB: *w.USB, Print: *w.Print, Clipboard: *w.Clipboard}
23
+ return nil
24
+ }
25
+ func (d *Desired) UnmarshalJSON(raw []byte) error {
26
+ var w struct {
27
+ Configured *bool `json:"configured"`
28
+ SchemaVersion string `json:"schemaVersion"`
29
+ DeviceID string `json:"deviceId"`
30
+ RuntimeID string `json:"runtimeId"`
31
+ CredentialID string `json:"credentialId"`
32
+ PolicyVersion *int64 `json:"policyVersion"`
33
+ Controls *Controls `json:"controls"`
34
+ Challenge string `json:"challenge"`
35
+ IssuedAt *time.Time `json:"issuedAt"`
36
+ ValidUntil *time.Time `json:"validUntil"`
37
+ }
38
+ if err := Decode(raw, &w); err != nil {
39
+ return err
40
+ }
41
+ if w.Configured == nil || w.PolicyVersion == nil || w.Controls == nil || w.IssuedAt == nil || w.ValidUntil == nil {
42
+ return errors.New("native channel envelope has missing required fields")
43
+ }
44
+ *d = Desired{Configured: *w.Configured, SchemaVersion: w.SchemaVersion, DeviceID: w.DeviceID, RuntimeID: w.RuntimeID, CredentialID: w.CredentialID, PolicyVersion: *w.PolicyVersion, Controls: *w.Controls, Challenge: w.Challenge, IssuedAt: *w.IssuedAt, ValidUntil: *w.ValidUntil}
45
+ return nil
46
+ }
47
+ func (c *Channel) UnmarshalJSON(raw []byte) error {
48
+ var w struct {
49
+ Name string `json:"name"`
50
+ Scope string `json:"scope"`
51
+ State string `json:"state"`
52
+ Targets *int `json:"targets"`
53
+ Controlled *int `json:"controlled"`
54
+ ReasonCode string `json:"reasonCode"`
55
+ }
56
+ if err := Decode(raw, &w); err != nil {
57
+ return err
58
+ }
59
+ if w.Targets == nil || w.Controlled == nil {
60
+ return errors.New("native channel counts are required")
61
+ }
62
+ *c = Channel{Name: w.Name, Scope: w.Scope, State: w.State, Targets: *w.Targets, Controlled: *w.Controlled, ReasonCode: w.ReasonCode}
63
+ return nil
64
+ }