From db5685f58690b0cfc8bce646d2055e6468af555e Mon Sep 17 00:00:00 2001 From: Mary Dickson Date: Tue, 21 Apr 2026 14:13:33 -0700 Subject: [PATCH 01/12] feat(docs): add SDK version annotations to discovery and authorization Add "Available since" tags with release links to: - 5 discovery methods (ListAttributes, AttributeExists, AttributeValueExists, ValidateAttributes, GetEntityAttributes) - EntityIdentifier constructor helpers in authorization Each language tab links to its own SDK release since Go, Java, and JS ship independently. Co-Authored-By: Claude Opus 4.6 (1M context) --- docs/sdks/authorization.mdx | 6 ++++++ docs/sdks/discovery.mdx | 30 ++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/docs/sdks/authorization.mdx b/docs/sdks/authorization.mdx index 0524e2cb..607018ed 100644 --- a/docs/sdks/authorization.mdx +++ b/docs/sdks/authorization.mdx @@ -89,6 +89,8 @@ req := &authorizationv2.GetDecisionRequest{ } ``` +*Available since [Go SDK v0.16.0](https://github.com/opentdf/platform/releases/tag/sdk/v0.16.0)* + @@ -108,6 +110,8 @@ GetDecisionRequest request = GetDecisionRequest.newBuilder() .build(); ``` +*Available since [Java SDK v0.13.0](https://github.com/opentdf/java-sdk/releases/tag/v0.13.0)* +
Without helpers (manual proto construction) @@ -146,6 +150,8 @@ const response = await platformClient.v2.authorization.getDecision({ }); ``` +*Available since [JS SDK v0.14.0](https://github.com/opentdf/web-sdk/releases/tag/sdk-v0.14.0)* +
Without helpers (manual object construction) diff --git a/docs/sdks/discovery.mdx b/docs/sdks/discovery.mdx index cf06cf26..007fbd33 100644 --- a/docs/sdks/discovery.mdx +++ b/docs/sdks/discovery.mdx @@ -81,6 +81,8 @@ Returns all active attributes on the platform. Use this to see what's available client.ListAttributes(ctx, ...namespaceFilter) ``` +*Available since [Go SDK v0.14.0](https://github.com/opentdf/platform/releases/tag/sdk/v0.14.0)* + @@ -89,6 +91,8 @@ sdk.listAttributes() sdk.listAttributes(namespaceFilter) ``` +*Available since [Java SDK v0.13.0](https://github.com/opentdf/java-sdk/releases/tag/v0.13.0)* + @@ -96,6 +100,8 @@ sdk.listAttributes(namespaceFilter) await listAttributes(platformUrl, auth, namespaceFilter?) ``` +*Available since [JS SDK v0.10.0](https://github.com/opentdf/web-sdk/releases/tag/sdk-v0.10.0)* + @@ -194,6 +200,8 @@ Reports whether an attribute definition exists on the platform. Returns `true`/` client.AttributeExists(ctx, attributeFqn) ``` +*Available since [Go SDK v0.14.0](https://github.com/opentdf/platform/releases/tag/sdk/v0.14.0)* + @@ -201,6 +209,8 @@ client.AttributeExists(ctx, attributeFqn) sdk.attributeExists(attributeFqn) ``` +*Available since [Java SDK v0.13.0](https://github.com/opentdf/java-sdk/releases/tag/v0.13.0)* + @@ -208,6 +218,8 @@ sdk.attributeExists(attributeFqn) await attributeExists(platformUrl, auth, attributeFqn) ``` +*Available since [JS SDK v0.10.0](https://github.com/opentdf/web-sdk/releases/tag/sdk-v0.10.0)* + @@ -276,6 +288,8 @@ Reports whether a specific attribute value FQN exists on the platform. Returns ` client.AttributeValueExists(ctx, valueFqn) ``` +*Available since [Go SDK v0.14.0](https://github.com/opentdf/platform/releases/tag/sdk/v0.14.0)* + @@ -283,6 +297,8 @@ client.AttributeValueExists(ctx, valueFqn) sdk.attributeValueExists(valueFqn) ``` +*Available since [Java SDK v0.13.0](https://github.com/opentdf/java-sdk/releases/tag/v0.13.0)* + @@ -290,6 +306,8 @@ sdk.attributeValueExists(valueFqn) await attributeValueExists(platformUrl, auth, valueFqn) ``` +*Available since [JS SDK v0.10.0](https://github.com/opentdf/web-sdk/releases/tag/sdk-v0.10.0)* + @@ -358,6 +376,8 @@ Checks that a list of attribute value FQNs exist on the platform **before** call client.ValidateAttributes(ctx, fqns...) ``` +*Available since [Go SDK v0.14.0](https://github.com/opentdf/platform/releases/tag/sdk/v0.14.0)* + @@ -365,6 +385,8 @@ client.ValidateAttributes(ctx, fqns...) sdk.validateAttributes(fqns) ``` +*Available since [Java SDK v0.13.0](https://github.com/opentdf/java-sdk/releases/tag/v0.13.0)* + @@ -372,6 +394,8 @@ sdk.validateAttributes(fqns) await validateAttributes(platformUrl, auth, fqns) ``` +*Available since [JS SDK v0.10.0](https://github.com/opentdf/web-sdk/releases/tag/sdk-v0.10.0)* + @@ -479,6 +503,8 @@ Returns the attribute value FQNs assigned to a specific entity (person or non-pe client.GetEntityAttributes(ctx, entity) ``` +*Available since [Go SDK v0.14.0](https://github.com/opentdf/platform/releases/tag/sdk/v0.14.0)* + @@ -486,6 +512,8 @@ client.GetEntityAttributes(ctx, entity) sdk.getEntityAttributes(entity) ``` +*Available since [Java SDK v0.13.0](https://github.com/opentdf/java-sdk/releases/tag/v0.13.0)* + @@ -493,6 +521,8 @@ sdk.getEntityAttributes(entity) await platform.v2.authorization.getEntitlements({ ... }) ``` +*Available since [JS SDK v0.10.0](https://github.com/opentdf/web-sdk/releases/tag/sdk-v0.10.0)* + The JS SDK does not expose a standalone `getEntityAttributes` function. Use `getEntitlements` via `PlatformClient` in a Node.js server environment. From f4feb507242eac9397dc9a799726f9a11007899e Mon Sep 17 00:00:00 2001 From: Mary Dickson Date: Tue, 21 Apr 2026 14:44:40 -0700 Subject: [PATCH 02/12] feat(docs): add SdkVersion MDX component for version annotations Replace raw markdown "Available since" lines with a reusable component that constructs release URLs from props. dsp-docs can register a no-op version to suppress these cleanly. Co-Authored-By: Claude Opus 4.6 (1M context) --- docs/sdks/authorization.mdx | 7 +++--- docs/sdks/discovery.mdx | 31 ++++++++++++------------ docs/sdks/obligations.mdx | 3 ++- src/components/SdkVersion/index.tsx | 37 +++++++++++++++++++++++++++++ 4 files changed, 59 insertions(+), 19 deletions(-) create mode 100644 src/components/SdkVersion/index.tsx diff --git a/docs/sdks/authorization.mdx b/docs/sdks/authorization.mdx index 607018ed..08b8ae6a 100644 --- a/docs/sdks/authorization.mdx +++ b/docs/sdks/authorization.mdx @@ -6,6 +6,7 @@ title: Authorization import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import JsAuthNote from '../../code_samples/js_auth_note.mdx' +import SdkVersion from '@site/src/components/SdkVersion'; # Authorization @@ -89,7 +90,7 @@ req := &authorizationv2.GetDecisionRequest{ } ``` -*Available since [Go SDK v0.16.0](https://github.com/opentdf/platform/releases/tag/sdk/v0.16.0)* + @@ -110,7 +111,7 @@ GetDecisionRequest request = GetDecisionRequest.newBuilder() .build(); ``` -*Available since [Java SDK v0.13.0](https://github.com/opentdf/java-sdk/releases/tag/v0.13.0)* +
Without helpers (manual proto construction) @@ -150,7 +151,7 @@ const response = await platformClient.v2.authorization.getDecision({ }); ``` -*Available since [JS SDK v0.14.0](https://github.com/opentdf/web-sdk/releases/tag/sdk-v0.14.0)* +
Without helpers (manual object construction) diff --git a/docs/sdks/discovery.mdx b/docs/sdks/discovery.mdx index 007fbd33..9b7719aa 100644 --- a/docs/sdks/discovery.mdx +++ b/docs/sdks/discovery.mdx @@ -6,6 +6,7 @@ title: Discovery import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import JsAuthNote from '../../code_samples/js_auth_note.mdx' +import SdkVersion from '@site/src/components/SdkVersion'; # Discovery @@ -81,7 +82,7 @@ Returns all active attributes on the platform. Use this to see what's available client.ListAttributes(ctx, ...namespaceFilter) ``` -*Available since [Go SDK v0.14.0](https://github.com/opentdf/platform/releases/tag/sdk/v0.14.0)* + @@ -91,7 +92,7 @@ sdk.listAttributes() sdk.listAttributes(namespaceFilter) ``` -*Available since [Java SDK v0.13.0](https://github.com/opentdf/java-sdk/releases/tag/v0.13.0)* + @@ -100,7 +101,7 @@ sdk.listAttributes(namespaceFilter) await listAttributes(platformUrl, auth, namespaceFilter?) ``` -*Available since [JS SDK v0.10.0](https://github.com/opentdf/web-sdk/releases/tag/sdk-v0.10.0)* + @@ -200,7 +201,7 @@ Reports whether an attribute definition exists on the platform. Returns `true`/` client.AttributeExists(ctx, attributeFqn) ``` -*Available since [Go SDK v0.14.0](https://github.com/opentdf/platform/releases/tag/sdk/v0.14.0)* + @@ -209,7 +210,7 @@ client.AttributeExists(ctx, attributeFqn) sdk.attributeExists(attributeFqn) ``` -*Available since [Java SDK v0.13.0](https://github.com/opentdf/java-sdk/releases/tag/v0.13.0)* + @@ -218,7 +219,7 @@ sdk.attributeExists(attributeFqn) await attributeExists(platformUrl, auth, attributeFqn) ``` -*Available since [JS SDK v0.10.0](https://github.com/opentdf/web-sdk/releases/tag/sdk-v0.10.0)* + @@ -288,7 +289,7 @@ Reports whether a specific attribute value FQN exists on the platform. Returns ` client.AttributeValueExists(ctx, valueFqn) ``` -*Available since [Go SDK v0.14.0](https://github.com/opentdf/platform/releases/tag/sdk/v0.14.0)* + @@ -297,7 +298,7 @@ client.AttributeValueExists(ctx, valueFqn) sdk.attributeValueExists(valueFqn) ``` -*Available since [Java SDK v0.13.0](https://github.com/opentdf/java-sdk/releases/tag/v0.13.0)* + @@ -306,7 +307,7 @@ sdk.attributeValueExists(valueFqn) await attributeValueExists(platformUrl, auth, valueFqn) ``` -*Available since [JS SDK v0.10.0](https://github.com/opentdf/web-sdk/releases/tag/sdk-v0.10.0)* + @@ -376,7 +377,7 @@ Checks that a list of attribute value FQNs exist on the platform **before** call client.ValidateAttributes(ctx, fqns...) ``` -*Available since [Go SDK v0.14.0](https://github.com/opentdf/platform/releases/tag/sdk/v0.14.0)* + @@ -385,7 +386,7 @@ client.ValidateAttributes(ctx, fqns...) sdk.validateAttributes(fqns) ``` -*Available since [Java SDK v0.13.0](https://github.com/opentdf/java-sdk/releases/tag/v0.13.0)* + @@ -394,7 +395,7 @@ sdk.validateAttributes(fqns) await validateAttributes(platformUrl, auth, fqns) ``` -*Available since [JS SDK v0.10.0](https://github.com/opentdf/web-sdk/releases/tag/sdk-v0.10.0)* + @@ -503,7 +504,7 @@ Returns the attribute value FQNs assigned to a specific entity (person or non-pe client.GetEntityAttributes(ctx, entity) ``` -*Available since [Go SDK v0.14.0](https://github.com/opentdf/platform/releases/tag/sdk/v0.14.0)* + @@ -512,7 +513,7 @@ client.GetEntityAttributes(ctx, entity) sdk.getEntityAttributes(entity) ``` -*Available since [Java SDK v0.13.0](https://github.com/opentdf/java-sdk/releases/tag/v0.13.0)* + @@ -521,7 +522,7 @@ sdk.getEntityAttributes(entity) await platform.v2.authorization.getEntitlements({ ... }) ``` -*Available since [JS SDK v0.10.0](https://github.com/opentdf/web-sdk/releases/tag/sdk-v0.10.0)* + The JS SDK does not expose a standalone `getEntityAttributes` function. Use `getEntitlements` via `PlatformClient` in a Node.js server environment. diff --git a/docs/sdks/obligations.mdx b/docs/sdks/obligations.mdx index e83997eb..1cd38883 100644 --- a/docs/sdks/obligations.mdx +++ b/docs/sdks/obligations.mdx @@ -5,6 +5,7 @@ title: Obligations import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; +import SdkVersion from '@site/src/components/SdkVersion'; # Obligations @@ -1001,7 +1002,7 @@ The created [Obligation Trigger object](#obligation-trigger-object). client.Obligations.GetObligationTrigger(ctx, &obligations.GetObligationTriggerRequest{...}) ``` -*Available since [SDK v0.16.0](https://github.com/opentdf/platform/releases/tag/sdk/v0.16.0)* + diff --git a/src/components/SdkVersion/index.tsx b/src/components/SdkVersion/index.tsx new file mode 100644 index 00000000..39d960f7 --- /dev/null +++ b/src/components/SdkVersion/index.tsx @@ -0,0 +1,37 @@ +import React from 'react'; + +type SdkVersionProps = { + language: 'go' | 'java' | 'js'; + version: string; + source: 'opentdf'; +}; + +const labels: Record = { + go: 'Go SDK', + java: 'Java SDK', + js: 'JS SDK', +}; + +function releaseUrl(language: string, version: string, source: string): string { + if (source === 'opentdf') { + switch (language) { + case 'go': + return `https://github.com/opentdf/platform/releases/tag/sdk/v${version}`; + case 'java': + return `https://github.com/opentdf/java-sdk/releases/tag/v${version}`; + case 'js': + return `https://github.com/opentdf/web-sdk/releases/tag/sdk-v${version}`; + } + } + return ''; +} + +export default function SdkVersion({ language, version, source }: SdkVersionProps) { + const label = labels[language] ?? language; + const url = releaseUrl(language, version, source); + return ( + + Available since {label} v{version} + + ); +} From 053f85db79435b4535956af76e536a6806fa24b6 Mon Sep 17 00:00:00 2001 From: Mary Dickson Date: Tue, 21 Apr 2026 14:47:51 -0700 Subject: [PATCH 03/12] feat(docs): add deprecated status and removal prop to SdkVersion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Supports three modes: - — "Available since Go SDK v0.14.0" - — "Deprecated in Go SDK v0.16.0" - — adds "scheduled for removal in v0.18.0" Co-Authored-By: Claude Opus 4.6 (1M context) --- src/components/SdkVersion/index.tsx | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/src/components/SdkVersion/index.tsx b/src/components/SdkVersion/index.tsx index 39d960f7..712fe4aa 100644 --- a/src/components/SdkVersion/index.tsx +++ b/src/components/SdkVersion/index.tsx @@ -4,6 +4,8 @@ type SdkVersionProps = { language: 'go' | 'java' | 'js'; version: string; source: 'opentdf'; + status?: 'added' | 'deprecated'; + removal?: string; }; const labels: Record = { @@ -26,12 +28,29 @@ function releaseUrl(language: string, version: string, source: string): string { return ''; } -export default function SdkVersion({ language, version, source }: SdkVersionProps) { +export default function SdkVersion({ language, version, source, status = 'added', removal }: SdkVersionProps) { const label = labels[language] ?? language; const url = releaseUrl(language, version, source); + const versionLink = {label} v{version}; + + if (status === 'deprecated') { + const removalUrl = removal ? releaseUrl(language, removal, source) : ''; + return ( + + Deprecated in {versionLink} + {removal && ( + <>, scheduled for removal in {removalUrl + ? v{removal} + : <>v{removal} + } + )} + + ); + } + return ( - Available since {label} v{version} + Available since {versionLink} ); } From f0e6c8a1176b2dd1d5fe5754f24390948ff3fbf7 Mon Sep 17 00:00:00 2001 From: Mary Dickson Date: Tue, 21 Apr 2026 14:54:57 -0700 Subject: [PATCH 04/12] fix(docs): handle empty URL and add target=_blank to SdkVersion links - Render plain text when releaseUrl returns empty string (no broken links) - Add target="_blank" rel="noopener noreferrer" for external GitHub release links Co-Authored-By: Claude Opus 4.6 (1M context) --- src/components/SdkVersion/index.tsx | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/components/SdkVersion/index.tsx b/src/components/SdkVersion/index.tsx index 712fe4aa..ca6f896a 100644 --- a/src/components/SdkVersion/index.tsx +++ b/src/components/SdkVersion/index.tsx @@ -28,21 +28,24 @@ function releaseUrl(language: string, version: string, source: string): string { return ''; } +function VersionLink({ url, children }: { url: string; children: React.ReactNode }) { + if (url) { + return {children}; + } + return <>{children}; +} + export default function SdkVersion({ language, version, source, status = 'added', removal }: SdkVersionProps) { const label = labels[language] ?? language; const url = releaseUrl(language, version, source); - const versionLink = {label} v{version}; if (status === 'deprecated') { const removalUrl = removal ? releaseUrl(language, removal, source) : ''; return ( - Deprecated in {versionLink} + Deprecated in {label} v{version} {removal && ( - <>, scheduled for removal in {removalUrl - ? v{removal} - : <>v{removal} - } + <>, scheduled for removal in v{removal} )} ); @@ -50,7 +53,7 @@ export default function SdkVersion({ language, version, source, status = 'added' return ( - Available since {versionLink} + Available since {label} v{version} ); } From 9b9a32c23ecc6d0ed58461a4b62247acde5ebcb2 Mon Sep 17 00:00:00 2001 From: Mary Dickson Date: Tue, 21 Apr 2026 14:56:46 -0700 Subject: [PATCH 05/12] fix(docs): add missing Go imports to discovery Setup section Co-Authored-By: Claude Opus 4.6 (1M context) --- docs/sdks/authorization.mdx | 27 +++++++++++++++++++++------ docs/sdks/discovery.mdx | 27 +++++++++++++++++++++------ 2 files changed, 42 insertions(+), 12 deletions(-) diff --git a/docs/sdks/authorization.mdx b/docs/sdks/authorization.mdx index 08b8ae6a..1054a86c 100644 --- a/docs/sdks/authorization.mdx +++ b/docs/sdks/authorization.mdx @@ -20,20 +20,34 @@ All examples on this page assume you have created a platform client. See [Authen ```go -client, err := sdk.New("http://localhost:8080", - sdk.WithClientCredentials("opentdf", "secret", nil), +package main + +import ( + "context" + "log" + + "github.com/opentdf/platform/sdk" ) -if err != nil { - log.Fatal(err) -} -// All Go snippets below use `client` and `context.Background()`. +func main() { + client, err := sdk.New("http://localhost:8080", + sdk.WithClientCredentials("opentdf", "secret", nil), + ) + if err != nil { + log.Fatal(err) + } + + // All Go snippets below use `client` and `context.Background()`. +} ``` ```java +import io.opentdf.platform.sdk.*; +import java.util.Collections; + SDK sdk = SDKBuilder.newBuilder() .platformEndpoint("http://localhost:8080") .clientSecret("opentdf", "secret") @@ -41,6 +55,7 @@ SDK sdk = SDKBuilder.newBuilder() .build(); // All Java snippets below use `sdk`. +// Remember to call sdk.close() when done. ``` diff --git a/docs/sdks/discovery.mdx b/docs/sdks/discovery.mdx index 9b7719aa..744b8b34 100644 --- a/docs/sdks/discovery.mdx +++ b/docs/sdks/discovery.mdx @@ -22,20 +22,34 @@ All examples on this page assume you have created a platform client. See [Authen ```go -client, err := sdk.New("http://localhost:8080", - sdk.WithClientCredentials("opentdf", "secret", nil), +package main + +import ( + "context" + "log" + + "github.com/opentdf/platform/sdk" ) -if err != nil { - log.Fatal(err) -} -// All Go snippets below use `client` and `context.Background()`. +func main() { + client, err := sdk.New("http://localhost:8080", + sdk.WithClientCredentials("opentdf", "secret", nil), + ) + if err != nil { + log.Fatal(err) + } + + // All Go snippets below use `client` and `context.Background()`. +} ``` ```java +import io.opentdf.platform.sdk.*; +import java.util.Collections; + SDK sdk = SDKBuilder.newBuilder() .platformEndpoint("http://localhost:8080") .clientSecret("opentdf", "secret") @@ -43,6 +57,7 @@ SDK sdk = SDKBuilder.newBuilder() .build(); // All Java snippets below use `sdk`. +// Remember to call sdk.close() when done. ``` From 02f812c01cf2883ee20a16b43d81ab32e0ebde01 Mon Sep 17 00:00:00 2001 From: Mary Dickson Date: Tue, 21 Apr 2026 15:16:49 -0700 Subject: [PATCH 06/12] fix(docs): standardize SDK setup sections across pages - authorization.mdx: rename JS `platformClient` to `platform` to match policy, discovery, and obligations pages - tdf.mdx: add sdk.close() reminder to Java setup Co-Authored-By: Claude Opus 4.6 (1M context) --- docs/sdks/authorization.mdx | 20 ++++++++++---------- docs/sdks/tdf.mdx | 1 + 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/docs/sdks/authorization.mdx b/docs/sdks/authorization.mdx index 1054a86c..0bee89e6 100644 --- a/docs/sdks/authorization.mdx +++ b/docs/sdks/authorization.mdx @@ -65,7 +65,7 @@ SDK sdk = SDKBuilder.newBuilder() import { authTokenInterceptor, clientCredentialsTokenProvider } from '@opentdf/sdk'; import { PlatformClient } from '@opentdf/sdk/platform'; -const platformClient = new PlatformClient({ +const platform = new PlatformClient({ interceptors: [authTokenInterceptor(clientCredentialsTokenProvider({ clientId: 'opentdf', clientSecret: 'secret', oidcOrigin: 'http://localhost:8080/auth/realms/opentdf', @@ -73,7 +73,7 @@ const platformClient = new PlatformClient({ platformUrl: 'http://localhost:8080', }); -// All JavaScript snippets below use `platformClient`. +// All JavaScript snippets below use `platform`. ``` @@ -160,7 +160,7 @@ EntityIdentifier.newBuilder() ```typescript import { EntityIdentifiers } from '@opentdf/sdk'; -const response = await platformClient.v2.authorization.getDecision({ +const response = await platform.v2.authorization.getDecision({ entityIdentifier: EntityIdentifiers.forEmail('alice@example.com'), // ... }); @@ -238,7 +238,7 @@ sdk.getServices().authorization().getEntitlements(req).get() ```typescript -await platformClient.v2.authorization.getEntitlements({ ... }) +await platform.v2.authorization.getEntitlements({ ... }) ``` @@ -374,7 +374,7 @@ for (EntityEntitlements entitlement : resp.getEntitlementsList()) { ```typescript import { EntityIdentifiers } from '@opentdf/sdk'; -const response = await platformClient.v2.authorization.getEntitlements({ +const response = await platform.v2.authorization.getEntitlements({ entityIdentifier: EntityIdentifiers.forEmail('bob@OrgA.com'), }); @@ -388,7 +388,7 @@ To expand hierarchy rules: ```typescript import { EntityIdentifiers } from '@opentdf/sdk'; -const response = await platformClient.v2.authorization.getEntitlements({ +const response = await platform.v2.authorization.getEntitlements({ entityIdentifier: EntityIdentifiers.forEmail('user@company.com'), withComprehensiveHierarchy: true, }); @@ -429,7 +429,7 @@ sdk.getServices().authorization().getDecision(req).get() ```typescript -await platformClient.v2.authorization.getDecision({ ... }) +await platform.v2.authorization.getDecision({ ... }) ``` @@ -616,7 +616,7 @@ if (decision.getDecision() == Decision.DECISION_PERMIT) { import { EntityIdentifiers } from '@opentdf/sdk'; import { Decision } from '@opentdf/sdk/platform/authorization/v2/authorization_pb.js'; -const response = await platformClient.v2.authorization.getDecision({ +const response = await platform.v2.authorization.getDecision({ entityIdentifier: EntityIdentifiers.forEmail('user@company.com'), action: { name: 'decrypt' }, resource: { @@ -676,7 +676,7 @@ sdk.getServices().authorization().getDecisionBulk(req).get() ```typescript -await platformClient.v2.authorization.getDecisionBulk({ ... }) +await platform.v2.authorization.getDecisionBulk({ ... }) ``` @@ -857,7 +857,7 @@ import GetDecisionsExample from '@site/code_samples/java/get-decisions.mdx'; ```typescript import { EntityIdentifiers } from '@opentdf/sdk'; -const response = await platformClient.v2.authorization.getDecisionBulk({ +const response = await platform.v2.authorization.getDecisionBulk({ decisionRequests: [ { entityIdentifier: EntityIdentifiers.forEmail('user@company.com'), diff --git a/docs/sdks/tdf.mdx b/docs/sdks/tdf.mdx index 4f387684..0364aa94 100644 --- a/docs/sdks/tdf.mdx +++ b/docs/sdks/tdf.mdx @@ -98,6 +98,7 @@ SDK sdk = SDKBuilder.newBuilder() .platformEndpoint("https://platform.example.com") .clientSecret("client-id", "client-secret") .build(); +// Remember to call sdk.close() when done. // Encrypt var kasInfo = new Config.KASInfo(); From f47d8b6e84ae2e3b58128efdfd6c3e18a7b096bd Mon Sep 17 00:00:00 2001 From: Mary Dickson Date: Tue, 21 Apr 2026 16:46:12 -0700 Subject: [PATCH 07/12] fix(docs): rename Value to AttributeValue in Obligation Trigger Object table Co-Authored-By: Claude Opus 4.6 (1M context) --- docs/sdks/obligations.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sdks/obligations.mdx b/docs/sdks/obligations.mdx index 1cd38883..b476e3bf 100644 --- a/docs/sdks/obligations.mdx +++ b/docs/sdks/obligations.mdx @@ -1186,5 +1186,5 @@ The removed [Obligation Trigger object](#obligation-trigger-object). | `id` | `string` (UUID) | Unique identifier, generated by the platform. | | `obligationValue` | [`ObligationValue`](#obligation-value-object) | The obligation value this trigger fires for. | | `action` | [`Action`](/sdks/policy#action) | The action that activates this trigger (e.g., `read`). | -| `attributeValue` | [`Value`](/sdks/policy#attribute-value-object) | The attribute value that must be present on the data. | +| `attributeValue` | [`AttributeValue`](/sdks/policy#attribute-value-object) | The attribute value that must be present on the data. | | `metadata` | [`Metadata`](/sdks/policy#metadata) | Optional [labels](/sdks/policy#metadata). | From b379b3cc06cad60e078aa0f4ba29d44561fa21df Mon Sep 17 00:00:00 2001 From: Mary Dickson Date: Tue, 21 Apr 2026 16:46:50 -0700 Subject: [PATCH 08/12] fix(docs): clarify obligations are part of the policy package Co-Authored-By: Claude Opus 4.6 (1M context) --- docs/sdks/obligations.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/sdks/obligations.mdx b/docs/sdks/obligations.mdx index b476e3bf..2b6cb69e 100644 --- a/docs/sdks/obligations.mdx +++ b/docs/sdks/obligations.mdx @@ -11,6 +11,8 @@ import SdkVersion from '@site/src/components/SdkVersion'; An **obligation** is a PDP-to-PEP directive that accompanies an access decision: "permit, provided these controls are enforced." Obligations are scoped to a namespace and can carry multiple values and triggers. See [Obligations](/components/policy/obligations) for the policy concept. +Obligations are managed through the [**policy** service](/sdks/policy) — the methods on this page use the same `client` (Go) or `platform` (JS) instance as [Policy](/sdks/policy). + ## Setup All examples on this page assume you have created a platform client. See [Authentication](/sdks/authentication) for full details including DPoP key binding. From 97be120652384b7d9df3e8dd994321a2da9fb9d8 Mon Sep 17 00:00:00 2001 From: Mary Dickson Date: Tue, 21 Apr 2026 16:49:22 -0700 Subject: [PATCH 09/12] fix(docs): add obligations and anchor links to policy intro Co-Authored-By: Claude Opus 4.6 (1M context) --- docs/sdks/policy.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sdks/policy.mdx b/docs/sdks/policy.mdx index dbc75f62..a63b0c1b 100644 --- a/docs/sdks/policy.mdx +++ b/docs/sdks/policy.mdx @@ -16,7 +16,7 @@ import JsAuthNote from '../../code_samples/js_auth_note.mdx' # Managing Policy -Policy is the set of rules that govern who can access data and under what conditions. It is made up of **namespaces**, **attributes**, **subject mappings**, and **subject condition sets**. See [Policy](/components/policy) for the concept overview. The SDK provides CRUD access to these policy rules through remote gRPC calls powered by the [platform service client](/sdks/platform-client). +Policy is the set of rules that govern who can access data and under what conditions. It is made up of [**namespaces**](#namespaces), [**attributes**](#attributes), [**subject mappings**](#subject-mappings), [**subject condition sets**](#subject-condition-sets), and [**obligations**](/sdks/obligations). See [Policy](/components/policy) for the concept overview. The SDK provides CRUD access to these policy rules through remote gRPC calls powered by the [platform service client](/sdks/platform-client). ## Setup From f5fa33cbd33cf98c37d436ddb3da5fac917ee26a Mon Sep 17 00:00:00 2001 From: Mary Dickson Date: Wed, 22 Apr 2026 09:58:28 -0700 Subject: [PATCH 10/12] chore(docs): use concise version annotation format MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Switch from "Available since Go SDK v0.16.0" to "Go SDK v0.16.0+" and from "Deprecated in Go SDK v0.16.0, scheduled for removal in v0.17.0" to "Go SDK v0.16.0–v0.17.0 (deprecated)". Co-Authored-By: Claude Opus 4.6 (1M context) --- src/components/SdkVersion/index.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/SdkVersion/index.tsx b/src/components/SdkVersion/index.tsx index ca6f896a..e2cd74a5 100644 --- a/src/components/SdkVersion/index.tsx +++ b/src/components/SdkVersion/index.tsx @@ -43,17 +43,18 @@ export default function SdkVersion({ language, version, source, status = 'added' const removalUrl = removal ? releaseUrl(language, removal, source) : ''; return ( - Deprecated in {label} v{version} + {label} v{version} {removal && ( - <>, scheduled for removal in v{removal} + <>–v{removal} )} + {' (deprecated)'} ); } return ( - Available since {label} v{version} + {label} v{version}+ ); } From cd46980022dfd921e8638e72d76d8cc01b3bf29a Mon Sep 17 00:00:00 2001 From: Mary Dickson Date: Wed, 22 Apr 2026 10:35:19 -0700 Subject: [PATCH 11/12] fix(docs): Go setup compilability and manual EntityIdentifier example Add `_, _ = client, context.Background()` to Go setup blocks so they compile without unused variable/import errors. Add "Without helpers" collapsible section to Go EntityIdentifier tab matching Java and JS. Co-Authored-By: Claude Opus 4.6 (1M context) --- docs/sdks/authorization.mdx | 31 +++++++++++++++++++++++++++++++ docs/sdks/discovery.mdx | 1 + 2 files changed, 32 insertions(+) diff --git a/docs/sdks/authorization.mdx b/docs/sdks/authorization.mdx index 0bee89e6..03812e6c 100644 --- a/docs/sdks/authorization.mdx +++ b/docs/sdks/authorization.mdx @@ -38,6 +38,7 @@ func main() { } // All Go snippets below use `client` and `context.Background()`. + _, _ = client, context.Background() } ``` @@ -107,6 +108,36 @@ req := &authorizationv2.GetDecisionRequest{ +
+Without helpers (manual proto construction) + +```go +import ( + "github.com/opentdf/platform/protocol/go/entity" + authorizationv2 "github.com/opentdf/platform/protocol/go/authorization/v2" +) + +req := &authorizationv2.GetDecisionRequest{ + EntityIdentifier: &authorizationv2.EntityIdentifier{ + Identifier: &authorizationv2.EntityIdentifier_EntityChain{ + EntityChain: &entity.EntityChain{ + Entities: []*entity.Entity{ + { + EntityType: &entity.Entity_EmailAddress{EmailAddress: "alice@example.com"}, + // or &entity.Entity_ClientId{ClientId: "..."} + // or &entity.Entity_UserName{UserName: "..."} + Category: entity.Entity_CATEGORY_SUBJECT, + }, + }, + }, + }, + }, + // ... +} +``` + +
+ diff --git a/docs/sdks/discovery.mdx b/docs/sdks/discovery.mdx index 744b8b34..f548b99e 100644 --- a/docs/sdks/discovery.mdx +++ b/docs/sdks/discovery.mdx @@ -40,6 +40,7 @@ func main() { } // All Go snippets below use `client` and `context.Background()`. + _, _ = client, context.Background() } ``` From 8a15c031b6bf1ab1d1b97107d27587775acb2856 Mon Sep 17 00:00:00 2001 From: Mary Dickson Date: Wed, 22 Apr 2026 10:39:52 -0700 Subject: [PATCH 12/12] chore(docs): move version annotations to top of language tabs Move tags from below the code blocks to directly after the opening, so the version badge appears at the top of each language-specific section. Co-Authored-By: Claude Opus 4.6 (1M context) --- docs/sdks/authorization.mdx | 15 +++----- docs/sdks/discovery.mdx | 75 +++++++++++++++---------------------- docs/sdks/obligations.mdx | 5 +-- 3 files changed, 38 insertions(+), 57 deletions(-) diff --git a/docs/sdks/authorization.mdx b/docs/sdks/authorization.mdx index 03812e6c..72640fb5 100644 --- a/docs/sdks/authorization.mdx +++ b/docs/sdks/authorization.mdx @@ -89,6 +89,8 @@ Every authorization call requires an `EntityIdentifier` — the entity (user, se + + | Helper | Description | |--------|-------------| | `authorizationv2.ForEmail(email)` | Identify by email address | @@ -105,9 +107,6 @@ req := &authorizationv2.GetDecisionRequest{ // ... } ``` - - -
Without helpers (manual proto construction) @@ -141,6 +140,8 @@ req := &authorizationv2.GetDecisionRequest{ + + | Helper | Description | |--------|-------------| | `EntityIdentifiers.forEmail(email)` | Identify by email address | @@ -156,9 +157,6 @@ GetDecisionRequest request = GetDecisionRequest.newBuilder() // ... .build(); ``` - - -
Without helpers (manual proto construction) @@ -180,6 +178,8 @@ EntityIdentifier.newBuilder() + + | Helper | Description | |--------|-------------| | `EntityIdentifiers.forEmail(email)` | Identify by email address | @@ -196,9 +196,6 @@ const response = await platform.v2.authorization.getDecision({ // ... }); ``` - - -
Without helpers (manual object construction) diff --git a/docs/sdks/discovery.mdx b/docs/sdks/discovery.mdx index f548b99e..f47ed8bd 100644 --- a/docs/sdks/discovery.mdx +++ b/docs/sdks/discovery.mdx @@ -94,31 +94,28 @@ Returns all active attributes on the platform. Use this to see what's available + + ```go client.ListAttributes(ctx, ...namespaceFilter) ``` - - - + + ```java sdk.listAttributes() sdk.listAttributes(namespaceFilter) ``` - - - + + ```typescript await listAttributes(platformUrl, auth, namespaceFilter?) ``` - - - @@ -213,30 +210,27 @@ Reports whether an attribute definition exists on the platform. Returns `true`/` + + ```go client.AttributeExists(ctx, attributeFqn) ``` - - - + + ```java sdk.attributeExists(attributeFqn) ``` - - - + + ```typescript await attributeExists(platformUrl, auth, attributeFqn) ``` - - - @@ -301,30 +295,27 @@ Reports whether a specific attribute value FQN exists on the platform. Returns ` + + ```go client.AttributeValueExists(ctx, valueFqn) ``` - - - + + ```java sdk.attributeValueExists(valueFqn) ``` - - - + + ```typescript await attributeValueExists(platformUrl, auth, valueFqn) ``` - - - @@ -389,30 +380,27 @@ Checks that a list of attribute value FQNs exist on the platform **before** call + + ```go client.ValidateAttributes(ctx, fqns...) ``` - - - + + ```java sdk.validateAttributes(fqns) ``` - - - + + ```typescript await validateAttributes(platformUrl, auth, fqns) ``` - - - @@ -516,30 +504,27 @@ Returns the attribute value FQNs assigned to a specific entity (person or non-pe + + ```go client.GetEntityAttributes(ctx, entity) ``` - - - + + ```java sdk.getEntityAttributes(entity) ``` - - - + + ```typescript await platform.v2.authorization.getEntitlements({ ... }) ``` - - - The JS SDK does not expose a standalone `getEntityAttributes` function. Use `getEntitlements` via `PlatformClient` in a Node.js server environment. diff --git a/docs/sdks/obligations.mdx b/docs/sdks/obligations.mdx index 2b6cb69e..33df801d 100644 --- a/docs/sdks/obligations.mdx +++ b/docs/sdks/obligations.mdx @@ -1000,12 +1000,11 @@ The created [Obligation Trigger object](#obligation-trigger-object). + + ```go client.Obligations.GetObligationTrigger(ctx, &obligations.GetObligationTriggerRequest{...}) ``` - - -