Conversation
Summary of ChangesHello, 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
🧠 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
Activity
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
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.
jp-ayyappan
left a comment
There was a problem hiding this comment.
Maybe my feedback is a big fat nothing-burger. I am not sure I have a good opinion on whether we should really expose the fact that implementation of features varies between SDKs
I am ok with hiding that information for now.
| System.out.println("Attribute: " + attr.attribute); | ||
| } | ||
| } | ||
| ``` |
There was a problem hiding this comment.
Do we not have this implemented in JS /TS? Maybe call that out?
There was a problem hiding this comment.
it looks like we do -- added
- 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>
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>
- Add **Errors** sub-section to IsValidTdf (was missing) - Fix broken anchor: #validate-attributes → #validateattributes - Correct CreateTDF Go signature: io.Reader → io.ReadSeeker, *Manifest → *TDFObject (matches actual sdk/tdf.go:139) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Cross-checked all documented signatures against the Go, Java, and JS SDK source. Fixed the following discrepancies: - Go: BulkDecrypt/PrepareBulkDecrypt receivers (client *SDK → s SDK) - Go: PrepareBulkDecrypt return type (*PreparedBulkDecrypt → *BulkDecryptPrepared) - Go: Reader.Manifest() return type (*Manifest → Manifest, value not pointer) - Java: createTDF return type (void → Manifest) - Java: createTDF exceptions (AutoConfigureException → SDKException) - Java: loadTDF/isTDF channel type (ReadableByteChannel → SeekableByteChannel) - Java: isTDF removes throws IOException (method doesn't declare it) - Java: readPolicyObject removes throws IOException (method doesn't declare it) - JS: createZTDF return type (Promise<ReadableStream> → Promise<DecoratedStream>) Also updated the Java createTDF example to capture the Manifest return value. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Re-verified all TDF SDK method signatures against the main branch of each SDK repository (opentdf/platform, opentdf/java-sdk, opentdf/web-sdk) via gh api. Fixed remaining discrepancies: - Go Reader.Policy(): *policy.PolicyObject → PolicyObject (SDK-local value type, not a pointer to the protobuf type from protocol/go/policy) - Java createTDF: TDFConfig → Config.TDFConfig (inner class, not top-level) - Java loadTDF: TDFReaderConfig → Config.TDFReaderConfig (inner class) - Java reader.readPayload: add SDK.SegmentSignatureMismatch to throws clause (declared in source alongside IOException) Skipped parameter-name differences (w vs writer, opts vs options, etc.) as these do not affect callers and the documented names are more descriptive. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds compile-only type-assertion tests for the OpenTDF Go (v0.13.0) and TypeScript (v0.4.0) SDKs, plus a GitHub Actions workflow that runs them on every PR touching docs/sdks/ or the test files themselves. A type mismatch in a documented signature produces a build error, making future SDK API drift detectable before publishing. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove "ztdf" from the filename per reviewer feedback. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
File was never imported anywhere in the docs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Clarify IsValidTdf description: validates ZIP structure + manifest schema; no HMAC check, no KAS contact, no payload decryption - Retitle the manifest-inspection note to be SDK-neutral - Add JS/TS equivalent showing TDFReader.manifest() / .attributes() work without triggering decryption (per jp-ayyappan feedback) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
96b41d0 to
2b5883e
Compare
Preview: https://opentdf-docs-pr-225.surge.sh/sdks/tdf
Summary
CreateTDF,LoadTDF,IsValidTdf,BulkDecrypt/PrepareBulkDecrypt(Go), and all TDF Reader methodsKASInfo,PolicyObject, andManifest Objectwith field tables — clearly separated from callable methods in the TOCclassification/secret) withclearance/executiveacross all SDK pagestdf.mdx,encrypt_options.mdx,decrypt_options.mdxTest plan
🤖 Generated with Claude Code