Problem
The ListSandboxPolicies and GetSandboxPolicyStatus RPCs accept a global boolean flag that switches them from sandbox-scoped to gateway-global policy mode. The SDK's Policy().List() and Policy().GetStatus() methods don't expose this flag.
Impact
The openshell-dashboard BFF needs to fetch global policy revisions for the Platform Admin "Global Policy" page. Without the global flag, the SDK sends name="" which the gateway rejects with InvalidArgument: name is required.
Currently worked around by returning an empty policy view in the dashboard.
Proposed API
Add a Global option to ListPolicyOption and GetStatusOption:
// List with global flag
revisions, err := client.Policy().List(ctx, "", openshell.WithGlobal(true))
// GetStatus with global flag
status, err := client.Policy().GetStatus(ctx, "", "", openshell.WithGlobal(true))
The workspace and name parameters would be ignored when global=true, matching the gateway's behavior.
Affected RPCs
| RPC |
Proto field |
SDK method |
ListSandboxPolicies |
global (bool) |
Policy().List() |
GetSandboxPolicyStatus |
global (bool) |
Policy().GetStatus() |
Context
Discovered while integrating the SDK into the openshell-dashboard BFF (PR #2).
Problem
The
ListSandboxPoliciesandGetSandboxPolicyStatusRPCs accept aglobalboolean flag that switches them from sandbox-scoped to gateway-global policy mode. The SDK'sPolicy().List()andPolicy().GetStatus()methods don't expose this flag.Impact
The openshell-dashboard BFF needs to fetch global policy revisions for the Platform Admin "Global Policy" page. Without the
globalflag, the SDK sendsname=""which the gateway rejects withInvalidArgument: name is required.Currently worked around by returning an empty policy view in the dashboard.
Proposed API
Add a
Globaloption toListPolicyOptionandGetStatusOption:The workspace and name parameters would be ignored when
global=true, matching the gateway's behavior.Affected RPCs
ListSandboxPoliciesglobal(bool)Policy().List()GetSandboxPolicyStatusglobal(bool)Policy().GetStatus()Context
Discovered while integrating the SDK into the openshell-dashboard BFF (PR #2).