Skip to content

feat(docs): expand TDF documentation#225

Open
marythought wants to merge 18 commits intomainfrom
docs/DSPX-2427-expand-tdf-documentation
Open

feat(docs): expand TDF documentation#225
marythought wants to merge 18 commits intomainfrom
docs/DSPX-2427-expand-tdf-documentation

Conversation

@marythought
Copy link
Contributor

@marythought marythought commented Mar 4, 2026

Preview: https://opentdf-docs-pr-225.surge.sh/sdks/tdf

Summary

  • Restructures the TDF page as a proper API reference with signature, parameter table, returns, errors, and working code example per method
  • Adds a Quick Start section with SDK initialization and end-to-end encrypt/decrypt in Go, Java, and JavaScript
  • Adds a page intro with a linked map of all sections
  • Methods documented: CreateTDF, LoadTDF, IsValidTdf, BulkDecrypt / PrepareBulkDecrypt (Go), and all TDF Reader methods
  • Adds Type Reference section grouping KASInfo, PolicyObject, and Manifest Object with field tables — clearly separated from callable methods in the TOC
  • Improves prose throughout: explains KAS with a link to the component docs, clarifies what key wrapping and ephemeral session keys mean, expands assertion examples from STANAG-only to generic JSON with signing key code
  • Replaces example attribute FQNs (classification/secret) with clearance/executive across all SDK pages
  • Adds complete imports to all code blocks across tdf.mdx, encrypt_options.mdx, decrypt_options.mdx

Test plan

  • Page intro renders with working anchor links to all sections
  • Quick Start renders with working tabs for Go, Java, JavaScript
  • All method sections render with signature tabs, parameter table, returns, errors, and example
  • Type Reference section renders with field tables for KASInfo, PolicyObject, Manifest Object
  • Encrypt Options and Decrypt Options import and render correctly
  • TOC shows only method names and Type Reference — not Signature/Parameters/Returns/Errors
  • No broken anchors or MDX errors in build output

🤖 Generated with Claude Code

- Adds intro paragraph explaining TDF structure and page scope
- Imports and displays encrypt options and decrypt options sections
- Adds "Inspecting a TDF Without Decrypting" section (Go, Java, TypeScript)
- Adds Prerequisites tip linking to SDK Quickstart

Closes DSPX-2427

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@marythought marythought requested review from a team as code owners March 4, 2026 01:13
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the TDF documentation, providing developers with comprehensive guidance on encrypting and decrypting data using the Trusted Data Format. It clarifies various configuration options across Go, Java, and TypeScript SDKs and introduces a new section on inspecting TDF metadata without requiring full decryption, making it easier for users to understand and implement TDF functionalities.

Highlights

  • Expanded TDF Documentation Introduction: An introductory paragraph was added to explain the TDF structure and the content covered on the page, providing a clearer starting point for users.
  • Comprehensive Encrypt Options: The documentation now includes a full set of encrypt options across Go, Java, and TypeScript SDKs, detailing various configurations for TDF creation.
  • Comprehensive Decrypt Options: The documentation now includes a full set of decrypt options across Go, Java, and TypeScript SDKs, outlining how to control TDF opening and validation.
  • New 'Inspecting a TDF Without Decrypting' Section: A new section was added that demonstrates how to read a TDF's manifest, policy, and attributes without requiring a key access request or full decryption.
  • Prerequisites Tip Added: A 'Prerequisites' tip was included, linking directly to the SDK Quickstart guide to ensure users have the necessary setup before proceeding with TDF examples.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • code_samples/tdf/decrypt_options.mdx
    • Added comprehensive documentation for TDF decryption options, covering KAS allowlist, assertion verification, session key types, fulfillable obligations, max manifest size, and methods for reading decrypted payload and metadata.
  • code_samples/tdf/encrypt_options.mdx
    • Added comprehensive documentation for TDF encryption options, detailing data attributes, KAS configuration, autoconfigure, key splitting, metadata, MIME type, segment size, assertions, wrapping key algorithm, and TDF spec version.
  • docs/sdks/tdf.mdx
    • Updated the main TDF documentation page by adding an introductory explanation, integrating new encrypt and decrypt options, including a prerequisites tip, and introducing sections for inspecting TDFs without decryption and bulk decryption for Go.
Activity
  • No human activity (comments, reviews, etc.) has been recorded for this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
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 significantly expands the TDF documentation, which is a great improvement. The new content on encrypt and decrypt options, as well as inspecting TDFs, will be very helpful for users. My review focuses on improving the clarity and correctness of the new documentation by pointing out some formatting issues with Docusaurus admonitions and several inconsistencies or errors in the code samples, such as incorrect method capitalization in Java examples and missing imports in Go examples. Addressing these points will make the documentation more polished and easier for developers to use.

marythought and others added 16 commits March 3, 2026 17:19
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ction

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…meter tables

Add method signatures, parameter tables, return values, and error
descriptions for CreateTDF, LoadTDF, IsValidTdf, BulkDecrypt, and
TDF Reader methods. Replace the top-level narrative structure with
per-method API reference blocks followed by the existing encrypt and
decrypt options detail sections.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…rypt examples

- Remove unused client.open() from JavaScript metadata example in decrypt_options.mdx
- Add ctx := context.Background() to BulkDecrypt and PrepareBulkDecrypt Go snippets

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Link prose mentions of TDF reader, TDFReader, PolicyObject, and
  Manifest Object to their respective reference sections
- Fix broken anchor #manifest--getmanifest--... → #manifest
- Fix HTML entities for List<Type> in PolicyObject table to prevent
  MDX JSX parse errors

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signature, Parameters, Returns, Errors, Example, and type-reference
field headings were ### headings, polluting the TOC and visually
competing with method names. Changed to bold text so only method
names and TDF Reader sub-methods appear in the page outline.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
HTML entities inside backtick code spans render literally. Real angle
brackets inside backticks are safe from MDX JSX parsing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Both sections previously said "wrap the data encryption key" or
"ephemeral session key" without explaining the underlying mechanism.
Added plain-language explanations of the DEK wrapping flow and the
ephemeral key exchange, and what rsa:2048 means as an identifier.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…oss SDK pages

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
decrypt_options.mdx included a full Reading the Decrypted Payload
section (Payload, Unencrypted Metadata, Policy Object, Data
Attributes, Manifest) that was already covered by TDF Reader in
tdf.mdx. Removing it eliminates 3 duplicate heading anchors on
the composed page.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add Quick Start section with SDK initialization and end-to-end
  encrypt/decrypt example in Go, Java, and JavaScript
- Add JavaScript source type table (buffer, stream) to LoadTDF parameters
- Replace unhelpful Java IOException table with a plain note
- Replace STANAG 5636 assertion example with generic application/json
- Add signing key code examples for assertions (Go, Java, JavaScript)
- Add KAS link and explanation to KAS Configuration option description
- Group KASInfo, PolicyObject, Manifest Object under ## Type Reference
  to clearly distinguish types from callable methods in the TOC

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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