Skip to content

Conversation

@elizabethhealy
Copy link
Member

@elizabethhealy elizabethhealy commented Apr 24, 2025

Adds an allowlist for kas urls

@elizabethhealy
Copy link
Member Author

passing xtest with kao tamper test https://github.com/opentdf/tests/actions/runs/14650704622/job/41115585915

@elizabethhealy elizabethhealy marked this pull request as ready for review April 25, 2025 15:01
@elizabethhealy elizabethhealy requested review from a team as code owners April 25, 2025 15:01
@strantalis strantalis requested a review from Copilot April 25, 2025 20:08
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

elizabethhealy and others added 3 commits April 25, 2025 16:22
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@strantalis strantalis merged commit e48cdbd into main Apr 28, 2025
9 of 10 checks passed
@strantalis strantalis deleted the dspx-967-kas-allowlist branch April 28, 2025 14:07
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>
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.

3 participants