GebSecure Docs v0.1.0

Help

Migrating the SDKs from 0.1 to 0.2

What changed between SDK 0.1.x and 0.2.0 in all five languages, and what to change in your code.

All five SDKs moved from 0.1.0 to 0.2.0 together. Both versions target API v1 (gateway and control-plane OpenAPI contract 0.1.0); 0.2.0 needs a server that exposes the runtime endpoints it adds (/v1/inspect, /v1/dlp/scan, /v1/traces/spans, /v1/simulations/run) — older servers answer not_found for them, never silently.

Under SemVer 0.x rules a MINOR release may break, and every break is called out below.

Update the dependency#

SDK 0.2 dependency
TypeScript npm install @gebsecure01/sdk@^0.2.0
Python pip install "gebsecure>=0.2,<0.3"
Go go get github.com/gebsecure/gebsecure-go@v0.2.0
Java com.gebsecure:gebsecure-sdk:0.2.0
.NET dotnet add package GebSecure --version 0.2.0

Ranges written for 0.1 (^0.1.0, <0.2) do not admit 0.2.0. Packages that depend on the SDK must widen them — in this repository cli/package.json, integrations/typescript/*/package.json and integrations/python/gebsecure-integrations/pyproject.toml did so in the same change.

Breaking changes#

Retry classification follows the HTTP method (all SDKs). In 0.1 only the call types the SDK knew to be idempotent were retried on 5xx/network errors. In 0.2:

  • GET, PUT and DELETE are idempotent and retried on 502/503/504 and network errors — except updatePolicy (PUT /v1/policies/{id}), which appends a version and is never retried.
  • PATCH and other POSTs are retried on 5xx/network errors only when you pass a per-call idempotency key (sent as Idempotency-Key): { idempotencyKey } (TypeScript), idempotency_key= (Python), WithIdempotencyKey (Go), RequestOptions.withIdempotencyKey (Java), RequestOptions.IdempotencyKey (.NET).
  • 429 is still retried for everything.

If you relied on a POST being retried, pass an idempotency key — only when repeating the call is safe.

Go: optional numeric fields became pointers. Fields whose valid range includes 0 and that have no server default are now pointers so 0 can be sent explicitly — DelegationConstraints.MaxAmount (*float64), and in the new models e.g. AuditSearchParams.AfterSeq / MinRisk, UpdateConnectionRequest.MaxRetries, RevokeSecretRequest.Version.

Python: invalid input raises ValueError without echoing values. Previously the pydantic ValidationError (also a ValueError) included the input; request bodies can carry secrets, so 0.2 names the fields only. Code catching ValueError is unaffected; code that parsed the pydantic error must change.

204 responses. Operations without a response body resolve to undefined (TypeScript), None (Python), only an error (Go), void (Java) or a completed Task (.NET).

New in 0.2#

  • Runtime protection: inspect (prompt injection + inbound DLP), dlpScan, reportSpans with buildSpan/traceparentOf, and runSimulation (with failOnMismatch raising SimulationFailedError, which carries the typed run).
  • Session auth for CLIs and CI: login (refresh token in the body), refreshSession (never retried except 429), logout, me, and an unauthenticated provider for logging in.
  • Management APIs: policies (versions, diff, tests including PUT replace, deploy — a 412 deploy report is returned with deployed: false — rollback, simulate), agents and credentials, secrets (write-only values), connectors and connections (OAuth, client-credentials and JWT-bearer installs, health), audit (search with afterSeq tailing, export, verify), approvals (details, decide with the snapshot hash), alerts, traces and session replay.
  • Parity: Python gained with_delegation, get_access_token and traceparent on wait_for_approval; Go gained Client.AccessToken and Client.WithDelegation; Java getAccessToken(); .NET GetAccessTokenAsync.

The complete method lists are on the SDK reference pages; each SDK's CHANGELOG.md has the details.

Checklist#

  1. Bump the dependency (and any ranges in packages that depend on the SDK).
  2. Add idempotency keys to POST/PATCH calls you want retried on 5xx; drop custom retry wrappers around updatePolicy.
  3. Go: take addresses for the pointer fields listed above.
  4. Python: update code that inspected pydantic validation errors from request coercion.
  5. Replace hand-written calls to /v1/inspect, /v1/dlp/scan, /v1/traces/spans or the management endpoints with the new SDK methods.