feat(sdk/go): complete Go SDK with domain clients, auth, and hardening - #20
feat(sdk/go): complete Go SDK with domain clients, auth, and hardening#20rhuss wants to merge 8 commits into
Conversation
|
Important Review skippedToo many files! This PR contains 286 files, which is 186 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (6)
📒 Files selected for processing (286)
You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
328958b to
9273cdc
Compare
Signed-off-by: John Myers <johntmyers@users.noreply.github.com> Co-authored-by: John Myers <johntmyers@users.noreply.github.com>
…#2654) * perf(supervisor-network): avoid reparsing native policy input Convert the existing Serde JSON policy input directly into Regorus. Preserve conversion errors while avoiding JSON string allocation and parsing. Signed-off-by: Shiju <shiju@nvidia.com> * perf(supervisor-network): use direct OPA input conversion Signed-off-by: Shiju <shiju@nvidia.com> --------- Signed-off-by: Shiju <shiju@nvidia.com>
On macOS, bind the standalone Podman gateway to IPv6 loopback while registering localhost as the TLS endpoint. This keeps IPv4 loopback available for the callback-only listener, matching the e2e fix in commit 4cb77a9. Signed-off-by: Kris Hicks <khicks@nvidia.com>
* feat(sandbox): add suspend and resume operations Signed-off-by: Seth Jennings <sjenning@redhat.com> * fix(server): preserve lifecycle work after cancellation Signed-off-by: Seth Jennings <sjenning@redhat.com> * fix(server): reconcile ambiguous lifecycle outcomes Signed-off-by: Seth Jennings <sjenning@redhat.com> * fix(server): complete suspended session cleanup Signed-off-by: Seth Jennings <sjenning@redhat.com> * fix(vm): preserve suspension state on resume failure Signed-off-by: Seth Jennings <sjenning@redhat.com> * fix(server): retry retained lifecycle transitions Signed-off-by: Seth Jennings <sjenning@redhat.com> * fix(server): clean sessions after suspend reconciliation Signed-off-by: Seth Jennings <sjenning@redhat.com> * test(sandbox): cover deleting suspended sandbox Signed-off-by: Seth Jennings <sjenning@redhat.com> * fix(kubernetes): preserve progressing sandbox suspension Signed-off-by: Seth Jennings <sjenning@redhat.com> * fix(kubernetes): bound suspend status polling Signed-off-by: Seth Jennings <sjenning@redhat.com> * fix(kubernetes): detect legacy sandbox suspension Signed-off-by: Seth Jennings <sjenning@redhat.com> * fix(tui): render suspended sandbox phases Signed-off-by: Seth Jennings <sjenning@redhat.com> * refactor(sandbox): rename suspend and resume lifecycle Signed-off-by: Seth Jennings <sjenning@redhat.com> * perf(server): clean stopped sessions on transition Signed-off-by: Seth Jennings <sjenning@redhat.com> * fix(kubernetes): fail fast on rejected stop Signed-off-by: Seth Jennings <sjenning@redhat.com> * fix(compute): fence stale restart lifecycle events Signed-off-by: Seth Jennings <sjenning@redhat.com> --------- Signed-off-by: Seth Jennings <sjenning@redhat.com>
Add cargo-deny to check dependencies for vulnerabilities, license violations, and banned crates. Runs as a step in branch-checks for PRs and as a separate scheduled workflow for daily advisory scanning. Signed-off-by: Ignas Baranauskas <ibaranau@redhat.com>
Add the Go SDK implementation covering all gateway RPC services with domain-typed clients, comprehensive OIDC authentication flows, fake test doubles, and proto converters. Domain clients: Sandbox, Provider, Exec, File, TCP, SSH, Policy, Profile, Health, Service, Config, Workspace, Inference, Refresh. Each client validates inputs, resolves sandboxes by name, and converts between domain types and proto at the boundary. Auth: OIDC authorization code (PKCE), device code (RFC 8628), and client credentials (RFC 6749 Section 4.4) flows with gateway config auto-resolution. Token refresh with singleflight deduplication and exponential backoff. Edge tunnel proxy for gRPC-over-WebSocket. Gateway: On-disk gateway discovery with user/system directory precedence, lazy token loading, and auth mode mapping. Testing: In-memory fake client with deep-copy isolation, watch broadcasting with filtering, and workspace-scoped object stores. Bufconn-based gRPC tests for all domain clients. Ref: NVIDIA#2044 Signed-off-by: Roland Huß <rhuss@redhat.com>
Add WithLogger, WithTimeout, and WithRetryPolicy options to the gateway package's NewClient function. These forward the corresponding Config fields (Logger, Timeout, RetryPolicy) through to the underlying SDK client, giving callers full control over observability, connection timeouts, and retry behavior when constructing clients from on-disk gateway configurations. Also adds RetryPolicy type to types package and extends Config with the three new fields.
1361267 to
323050d
Compare
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
Summary
Complete Go SDK implementation covering all gateway RPC services (Drop B). This is a preview PR for review before submitting upstream to NVIDIA/OpenShell.
Hardening applied from multi-agent code review
interactiveSession.ExitCode()made idempotent (was draining channel on each call)diskTokenSourceno longer misusesexpires_inas relative-to-read-timeCredentialBindingpointer deep-copied in fake sandbox storeExecResultFromEventsuses boolean flag instead of exitCode == -1 sentinelRef: NVIDIA#2044
Test plan
go build ./...passesgo test ./openshell/v1/...(1265 tests pass)mise run go:cifull pipeline