feat(sdk): KAS Allowlist#245
Merged
Merged
Conversation
Member
Author
|
passing xtest with kao tamper test https://github.com/opentdf/tests/actions/runs/14650704622/job/41115585915 |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a KAS allowlist feature to restrict KAS URL usage and adds comprehensive test cases to validate the new behavior. Key changes include:
- Implementing allowlist and ignore-allowlist logic in TDF and NanoTDF load methods.
- Extending tests and examples to cover scenarios with valid and invalid KAS URLs.
- Updating SDK and SDKBuilder to expose and normalize the platform URL.
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/src/test/java/io/opentdf/platform/sdk/TDFTest.java | Updates tests to use proper KAS URL formats and include allowlist scenarios. |
| sdk/src/test/java/io/opentdf/platform/sdk/TDFE2ETest.java | Adjusts service method calls to include kasRegistry and platformUrl. |
| sdk/src/test/java/io/opentdf/platform/sdk/NanoTDFTest.java | Incorporates allowlist checks in NanoTDF tests and mocks new KAS registry. |
| sdk/src/test/java/io/opentdf/platform/sdk/Fuzzing.java | Adds URISyntaxException to fuzz test signature. |
| sdk/src/main/java/io/opentdf/platform/sdk/TDF.java | Adds new overloads and allowlist exception handling for TDF loading. |
| sdk/src/main/java/io/opentdf/platform/sdk/SDKBuilder.java | Normalizes platformEndpoint usage by calling the updated KASClient method. |
| sdk/src/main/java/io/opentdf/platform/sdk/SDK.java | Updates SDK construction to include platformUrl along with new KAS registry. |
| sdk/src/main/java/io/opentdf/platform/sdk/NanoTDF.java | Adds overloads for NanoTDF methods to support the allowlist logic. |
| sdk/src/main/java/io/opentdf/platform/sdk/KASClient.java | Makes normalizeAddress static for wider accessibility. |
| sdk/src/main/java/io/opentdf/platform/sdk/Config.java | Introduces helper functions to set and process kasAllowlist configurations. |
| examples/* and cmdline/* | Updates examples and CLI commands to handle the new allowlist configuration. |
| .github/workflows/checks.yaml | Adjusts platformEndpoint URLs to include an appropriate scheme. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
strantalis
approved these changes
Apr 28, 2025
strantalis
pushed a commit
that referenced
this pull request
Apr 28, 2025
🤖 I have created a release *beep* *boop* --- <details><summary>0.7.9</summary> ## [0.7.9](v0.7.8...v0.7.9) (2025-04-28) ### Features * **sdk:** KAS Allowlist ([#245](#245)) ([e48cdbd](e48cdbd)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: opentdf-automation[bot] <149537512+opentdf-automation[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Adds an allowlist for kas urls