feat(policy)!: namespace Registered Resources#3111
Conversation
Signed-off-by: Krish Suchak <suchak.krish@gmail.com>
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 introduces fundamental support for namespacing Registered Resources across the system. The primary goal is to allow for greater organization and isolation of resources by associating them with specific namespaces. This involves significant changes to the data model, identifier handling, and service layer logic to ensure that resources can be uniquely identified and managed within their respective namespaces, while also maintaining compatibility with existing, non-namespaced resources. 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. Namespaces now define, Resources neatly align, No more global strife. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces namespace support for Registered Resources across the service layer, database queries, and migrations. It updates the identifier library to handle new namespaced FQN formats for registered resource values, while maintaining backward compatibility with the legacy format. The changes are well-supported by new integration and unit tests.
My review identifies a critical issue that could lead to a panic when handling legacy resources, and a medium-severity validation gap for namespaces in FQNs. I've provided suggestions to address both. Overall, the changes are well-structured and the test coverage is good.
There was a problem hiding this comment.
Code Review
This pull request introduces namespace support for Registered Resources, which is a significant and breaking change. The modifications span across the database layer with new migrations and updated queries, the identifier library for FQN parsing, and includes a comprehensive set of new integration and unit tests. Overall, the changes are well-structured. However, I've identified a few issues related to correctness and performance that should be addressed. Specifically, there's a bug in FQN generation that could break round-trip serialization, missing validation for namespace components in FQNs, and an inefficient query being used for namespace enforcement.
Note: Security Review did not run due to the size of the PR.
X-Test Failure Report✅ go-v0.9.0 |
Signed-off-by: Krish Suchak <suchak.krish@gmail.com>
X-Test Failure Report✅ go-v0.9.0 |
X-Test Failure Report✅ go-v0.9.0 |
…espace-rr-service
Benchmark results, click to expandBenchmark authorization.GetDecisions Results:
Benchmark authorization.v2.GetMultiResourceDecision Results:
Benchmark Statistics
Bulk Benchmark Results
TDF3 Benchmark Results:
|
X-Test Failure Report |
Benchmark results, click to expandBenchmark authorization.GetDecisions Results:
Benchmark authorization.v2.GetMultiResourceDecision Results:
Benchmark Statistics
Bulk Benchmark Results
TDF3 Benchmark Results:
|
Benchmark results, click to expandBenchmark authorization.GetDecisions Results:
Benchmark authorization.v2.GetMultiResourceDecision Results:
Benchmark Statistics
Bulk Benchmark Results
TDF3 Benchmark Results:
|
Benchmark results, click to expandBenchmark authorization.GetDecisions Results:
Benchmark authorization.v2.GetMultiResourceDecision Results:
Benchmark Statistics
Bulk Benchmark Results
TDF3 Benchmark Results:
|
Benchmark results, click to expandBenchmark authorization.GetDecisions Results:
Benchmark authorization.v2.GetMultiResourceDecision Results:
Benchmark Statistics
Bulk Benchmark Results
TDF3 Benchmark Results:
|
I'm leaning towards handling existing RRs through a manual script via otdfctl. There's a branch with the script The main reason is by convention and best practice we've kept the schema migrations separate from data migrations since data migrations are often more difficult to revert. A script allows users to migrate in a user-friendly way (prompting, tables, etc) on their own timeline (since we did this in a backwards-compatible way). Inferring namespace from action-attribute-values also has a bit of complexity in cases. For example, we ignore RRs that have not only no AAVs but also AAVs with mixed namepaces? |
This makes sense. Thanks for outlining your thoughts. |
…espace-rr-service
Invalidated by push of 4f65a8f
Benchmark results, click to expandBenchmark authorization.GetDecisions Results:
Benchmark authorization.v2.GetMultiResourceDecision Results:
Benchmark Statistics
Bulk Benchmark Results
TDF3 Benchmark Results:
|
Benchmark results, click to expandBenchmark authorization.GetDecisions Results:
Benchmark authorization.v2.GetMultiResourceDecision Results:
Benchmark Statistics
Bulk Benchmark Results
TDF3 Benchmark Results:
|
elizabethhealy
left a comment
There was a problem hiding this comment.
addition of namespaceid lgtm!
🤖 I have created a release *beep* *boop* --- ## [0.18.0](protocol/go/v0.17.0...protocol/go/v0.18.0) (2026-03-12) ### ⚠ BREAKING CHANGES * **policy:** add namespace field to Actions proto ([#3130](#3130)) * **policy:** namespace Registered Resources ([#3111](#3111)) ### Features * **policy:** add namespace field to Actions proto ([#3130](#3130)) ([bedc9b3](bedc9b3)) * **policy:** namespace Registered Resources ([#3111](#3111)) ([6db1883](6db1883)) ### Bug Fixes * **ci:** Upgrade toolchain version to 1.25.8 ([#3116](#3116)) ([e1b7882](e1b7882)) * **policy:** deprecate ListAttributeValues in favor of existing GetAttribute ([#3108](#3108)) ([7e17c2d](7e17c2d)) --- 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>
🤖 I have created a release *beep* *boop* --- ## [0.3.0](lib/identifier/v0.2.0...lib/identifier/v0.3.0) (2026-03-13) ### ⚠ BREAKING CHANGES * **policy:** namespace Registered Resources ([#3111](#3111)) ### Features * **policy:** namespace Registered Resources ([#3111](#3111)) ([6db1883](6db1883)) ### Bug Fixes * **ci:** Upgrade toolchain version to 1.25.8 ([#3116](#3116)) ([e1b7882](e1b7882)) * Go 1.25 ([#3053](#3053)) ([65eb7c3](65eb7c3)) --- 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>
Summary
Depends on #3110 (proto changes) being merged first.
This is part 2 of splitting #3106 into two PRs.
Test plan