-
Notifications
You must be signed in to change notification settings - Fork 15
feat(sdk): Add a KAS allowlist #2085
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Standard Benchmark Skipped or FailedBulk Benchmark Results
|
Standard Benchmark Skipped or FailedBulk Benchmark Results
|
Standard Benchmark Skipped or FailedBulk Benchmark Results
|
Standard Benchmark Skipped or FailedBulk Benchmark Results
|
There was a problem hiding this 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 adds a KAS allowlist feature to the SDK decryption functionality to restrict which KAS URLs may be used during decryption. Key changes include:
- Implementation of functions to construct and manage the allowlist in both TDF3 and Nano TDF reader configurations.
- Integration of allowlist checks in the decryption flows, including BulkDecrypt.
- Addition of extensive tests to validate the intended allowlist behavior.
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
service/rttests/rt_test.go | Tests that decryption fails when using a disallowed KAS URL. |
sdk/tdf_test.go | Introduces tests for KAS allowlist functionality in TDF decryption. |
sdk/tdf_config_test.go | Updates tests to verify correct processing of valid and invalid KAS URLs. |
sdk/tdf_config.go | Implements allowlist functions and new reader options. |
sdk/tdf.go | Integrates KAS allowlist checking in the TDF decryption flow. |
sdk/nanotdf_config_test.go | Adds tests for Nano TDF allowlist options and ignore settings. |
sdk/nanotdf_config.go | Implements NanoTDFReaderConfig support for KAS allowlist. |
sdk/nanotdf.go | Adds allowlist verification in the NanoTDF decryption flow. |
sdk/bulk.go | Updates bulk decryption to incorporate new KAS allowlist options. |
Comments suppressed due to low confidence (1)
sdk/tdf_config.go:293
- The function getKasAddress returns an empty string for URLs without a scheme, which may lead to unintended errors when valid host:port values are provided without a scheme. Consider handling such cases explicitly by inferring a default scheme or adjusting the parsing logic.
if parsedURL.Host == "" && parsedURL.Port() == "" {
Standard Benchmark Skipped or FailedBulk Benchmark Results
|
Standard Benchmark Skipped or FailedBulk Benchmark Results
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A good start, but I have some questions before merging
Standard Benchmark Skipped or FailedBulk Benchmark Results
|
Standard Benchmark Skipped or FailedBulk Benchmark Results
|
Standard Benchmark Skipped or FailedBulk Benchmark Results
|
Standard Benchmark Skipped or FailedBulk Benchmark Results
|
Standard Benchmark Skipped or FailedBulk Benchmark Results
Error Summary
|
Standard Benchmark Skipped or FailedBulk Benchmark Results
|
Standard Benchmark Skipped or FailedBulk Benchmark Results
|
…latform into dspx-966-kas-allowlist
Standard Benchmark Skipped or FailedBulk Benchmark Results
|
Standard Benchmark Skipped or FailedBulk Benchmark Results
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks generally pretty good, remaining comments are relatively minor
Standard Benchmark Skipped or FailedBulk Benchmark Results
|
Invalidated by push of bdf6ed4
Benchmark results, click to expandBulk Benchmark Results
TDF3 Benchmark Results:
NANOTDF Benchmark Results:
Error Summary:
Standard Benchmark Metrics Skipped or Failed |
Proposed Changes
scheme://host:port
and adds that to a set, if no scheme provided, will default to httpsOther additions to support the above:
Things to note:
Checklist
Testing Instructions