Skip to content

docs(sdk): add KAS Registry page#276

Open
marythought wants to merge 1 commit intomainfrom
DSPX-2536/kas-registry-docs
Open

docs(sdk): add KAS Registry page#276
marythought wants to merge 1 commit intomainfrom
DSPX-2536/kas-registry-docs

Conversation

@marythought
Copy link
Copy Markdown
Contributor

@marythought marythought commented Apr 7, 2026

Summary

  • Adds a new standalone SDK docs page (/sdks/kas-registry) covering the full KeyAccessServerRegistry service API https://opentdf-docs-pr-276.surge.sh/sdks/kas-registry
  • Documents 11 methods across Go, Java, and JavaScript SDKs:
    • KAS Servers: CreateKeyAccessServer, ListKeyAccessServers, GetKeyAccessServer, UpdateKeyAccessServer, DeleteKeyAccessServer
    • KAS Keys: CreateKey, ListKeys, GetKey, RotateKey, SetBaseKey, GetBaseKey
  • Each method follows the Signature / Example / Parameters / Returns / Errors pattern from the TDF docs
  • Includes a Key Modes reference table explaining CONFIG_ROOT_KEY, PROVIDER_ROOT_KEY, REMOTE, and PUBLIC_KEY_ONLY

Test plan

  • Verify the Surge preview renders the page correctly at /sdks/kas-registry
  • Confirm all <details> blocks expand and language tabs switch properly
  • Check sidebar ordering (position 9, after Troubleshooting)
  • Review code samples for accuracy against current SDK APIs

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation

    • Added comprehensive KAS Registry SDK documentation covering server and key management operations with multi-language examples (Go, Java, JavaScript).
    • Added API documentation for CreateKeyAccessServer and ListKeyAccessServers with usage examples.
    • Clarified parameter documentation for authorization and attribute timestamp specifications.
  • API Updates

    • Added attribute sorting capability with support for sorting by name, creation date, or update date.

@marythought marythought requested review from a team as code owners April 7, 2026 01:08
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

📄 Preview deployed to https://opentdf-docs-pr-276.surge.sh

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces comprehensive documentation and code samples for the KAS Registry, covering server registration and key management across Go, Java, and JavaScript. The review feedback identifies a consistent error in the Java code examples where .execute() is incorrectly called on blocking service methods that already return the response object directly.

Comment on lines +91 to +92
var resp = sdk.getServices().kasRegistry()
.createKeyAccessServerBlocking(req, Collections.emptyMap()).execute();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The Java SDK's blocking service methods return the response object directly. Calling .execute() on the result of createKeyAccessServerBlocking is incorrect as it contradicts the method signature provided in the documentation above.

var resp = sdk.getServices().kasRegistry()
    .createKeyAccessServerBlocking(req, Collections.emptyMap());

Comment on lines +83 to +84
var resp = sdk.getServices().kasRegistry()
.listKeyAccessServersBlocking(req, Collections.emptyMap()).execute();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The Java SDK's blocking service methods return the response object directly. Calling .execute() on the result of listKeyAccessServersBlocking is incorrect.

var resp = sdk.getServices().kasRegistry()
    .listKeyAccessServersBlocking(req, Collections.emptyMap());

Comment on lines +126 to +127
var resp = sdk.getServices().kasRegistry()
.getKeyAccessServerBlocking(req, Collections.emptyMap()).execute();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The Java SDK's blocking service methods return the response object directly. Calling .execute() on the result of getKeyAccessServerBlocking is incorrect.

var resp = sdk.getServices().kasRegistry()
    .getKeyAccessServerBlocking(req, Collections.emptyMap());

Comment on lines +267 to +268
var resp = sdk.getServices().kasRegistry()
.updateKeyAccessServerBlocking(req, Collections.emptyMap()).execute();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The Java SDK's blocking service methods return the response object directly. Calling .execute() on the result of updateKeyAccessServerBlocking is incorrect.

var resp = sdk.getServices().kasRegistry()
    .updateKeyAccessServerBlocking(req, Collections.emptyMap());

Comment on lines +393 to +394
var resp = sdk.getServices().kasRegistry()
.deleteKeyAccessServerBlocking(req, Collections.emptyMap()).execute();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The Java SDK's blocking service methods return the response object directly. Calling .execute() on the result of deleteKeyAccessServerBlocking is incorrect.

var resp = sdk.getServices().kasRegistry()
    .deleteKeyAccessServerBlocking(req, Collections.emptyMap());

Comment on lines +690 to +691
var resp = sdk.getServices().kasRegistry()
.listKeysBlocking(req, Collections.emptyMap()).execute();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The Java SDK's blocking service methods return the response object directly. Calling .execute() on the result of listKeysBlocking is incorrect.

var resp = sdk.getServices().kasRegistry()
    .listKeysBlocking(req, Collections.emptyMap());

Comment on lines +835 to +836
var resp = sdk.getServices().kasRegistry()
.getKeyBlocking(req, Collections.emptyMap()).execute();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The Java SDK's blocking service methods return the response object directly. Calling .execute() on the result of getKeyBlocking is incorrect.

var resp = sdk.getServices().kasRegistry()
    .getKeyBlocking(req, Collections.emptyMap());

Comment on lines +1002 to +1003
var resp = sdk.getServices().kasRegistry()
.rotateKeyBlocking(req, Collections.emptyMap()).execute();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The Java SDK's blocking service methods return the response object directly. Calling .execute() on the result of rotateKeyBlocking is incorrect.

var resp = sdk.getServices().kasRegistry()
    .rotateKeyBlocking(req, Collections.emptyMap());

Comment on lines +1157 to +1158
var resp = sdk.getServices().kasRegistry()
.setBaseKeyBlocking(req, Collections.emptyMap()).execute();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The Java SDK's blocking service methods return the response object directly. Calling .execute() on the result of setBaseKeyBlocking is incorrect.

var resp = sdk.getServices().kasRegistry()
    .setBaseKeyBlocking(req, Collections.emptyMap());

Comment on lines +1282 to +1283
var resp = sdk.getServices().kasRegistry()
.getBaseKeyBlocking(req, Collections.emptyMap()).execute();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The Java SDK's blocking service methods return the response object directly. Calling .execute() on the result of getBaseKeyBlocking is incorrect.

var resp = sdk.getServices().kasRegistry()
    .getBaseKeyBlocking(req, Collections.emptyMap());

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

❌ Surge preview build failed — no preview was deployed. Check the workflow logs for details.

Once the build passes, the preview will be at: https://opentdf-docs-pr-276.surge.sh

Common cause: If the build failed on vendored YAML validation, run the following locally and commit the result:

npm run update-vendored-yaml
git add specs/
git commit -m "chore(deps): update vendored OpenAPI specs"

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 7, 2026

Warning

Rate limit exceeded

@marythought has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 5 minutes and 43 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 5 minutes and 43 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 934cf682-8d87-4cbc-8cf0-f5c08063639f

📥 Commits

Reviewing files that changed from the base of the PR and between e32a8c4 and 86aa54c.

📒 Files selected for processing (3)
  • code_samples/policy_code/create_kas.mdx
  • code_samples/policy_code/list_kas.mdx
  • docs/sdks/kas-registry.mdx
📝 Walkthrough

Walkthrough

Added comprehensive documentation for Key Access Server (KAS) Registry operations, including CreateKeyAccessServer and ListKeyAccessServers guides, plus a full KAS Registry reference covering server and key management operations. Also added OpenAPI schema support for attribute sorting and clarified timestamp parameter bounds in authorization specifications.

Changes

Cohort / File(s) Summary
KAS Registry Documentation
code_samples/policy_code/create_kas.mdx, code_samples/policy_code/list_kas.mdx, docs/sdks/kas-registry.mdx
Added new documentation pages detailing KAS Registry operations with API signatures, usage examples, parameter documentation, and error handling across Go, Java, and JavaScript languages.
Authorization Specification Updates
specs/authorization/authorization.openapi.yaml
Updated OpenAPI documentation for timestamp query parameters to specify numeric inclusive bounds (year 0001–9999) and clarified nanosecond field semantics.
Attributes Sorting Schema
specs/policy/attributes/attributes.openapi.yaml
Added new OpenAPI schemas (SortDirection, SortAttributesType, AttributesSort) and extended ListAttributesRequest with optional sorting support.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

Suggested reviewers

  • eugenioenko
  • elizabethhealy
  • pflynn-virtru

Poem

🐰 A registry of keys so fine and grand,
🔑 Hopping through docs across the land,
Sorting attributes with grace and care,
Timestamps bounded with bounds so fair,
KAS operations blooming everywhere! 🌱

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly matches the PR's main objective—adding the KAS Registry documentation page at /sdks/kas-registry.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch DSPX-2536/kas-registry-docs

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
docs/sdks/kas-registry.mdx (1)

123-1240: Move long inline SDK examples into code_samples/ and include them here.

This page still embeds very large per-language examples inline (Line 123 through Line 1240), which will be harder to maintain and keep consistent with SDK changes. Prefer extracting these examples to code_samples/ and importing them like CreateKas/ListKas.

As per coding guidelines, "Keep long examples in code_samples/ directory and reference them from docs instead of duplicating content."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/sdks/kas-registry.mdx` around lines 123 - 1240, The page currently
embeds very long per-language examples (the Example blocks for
GetKeyAccessServer, UpdateKeyAccessServer, CreateKey, ListKeys, GetKey,
RotateKey, SetBaseKey, GetBaseKey and their TabItem/Tab code blocks), so extract
each language-specific code sample into separate files under code_samples/ (one
file per API + language), replace the inline fenced-code TabItem blocks with
imports/references to those sample files (same pattern used by
CreateKas/ListKas), and ensure the MDX imports reference the new sample
filenames and the original example headings (e.g., GetKeyAccessServer,
CreateKey, RotateKey) so the docs render the samples in place without
duplicating large inline blocks.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@docs/sdks/kas-registry.mdx`:
- Around line 123-1240: The page currently embeds very long per-language
examples (the Example blocks for GetKeyAccessServer, UpdateKeyAccessServer,
CreateKey, ListKeys, GetKey, RotateKey, SetBaseKey, GetBaseKey and their
TabItem/Tab code blocks), so extract each language-specific code sample into
separate files under code_samples/ (one file per API + language), replace the
inline fenced-code TabItem blocks with imports/references to those sample files
(same pattern used by CreateKas/ListKas), and ensure the MDX imports reference
the new sample filenames and the original example headings (e.g.,
GetKeyAccessServer, CreateKey, RotateKey) so the docs render the samples in
place without duplicating large inline blocks.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1bdb2ce7-30d7-4e47-907d-bd66e87e3a09

📥 Commits

Reviewing files that changed from the base of the PR and between 7d49ef7 and e32a8c4.

📒 Files selected for processing (5)
  • code_samples/policy_code/create_kas.mdx
  • code_samples/policy_code/list_kas.mdx
  • docs/sdks/kas-registry.mdx
  • specs/authorization/authorization.openapi.yaml
  • specs/policy/attributes/attributes.openapi.yaml

Adds a new standalone SDK docs page covering all KeyAccessServerRegistry
service methods across Go, Java, and JavaScript SDKs. Includes Setup
section, KAS server CRUD, and key management operations. Each method
follows the Signature/Parameters/Example/Returns/Errors pattern.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@marythought marythought force-pushed the DSPX-2536/kas-registry-docs branch from e32a8c4 to 86aa54c Compare April 7, 2026 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant