feat(policy)!: add namespace field to Actions proto#3130
feat(policy)!: add namespace field to Actions proto#3130elizabethhealy wants to merge 4 commits intomainfrom
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 introduces namespace support to the policy service, primarily focusing on 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
Ignored Files
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. New fields now appear, Namespaces bring order clear, Code review, no fear. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a namespace field to the Action proto message, associating actions with namespaces and propagating this through the gRPC API. However, a critical security vulnerability has been identified: the backend implementation (Go code and SQL queries) has not been updated to utilize these new namespace fields, leading to a security bypass where namespace isolation is not enforced. Additionally, the breaking change in GetActionRequest will disrupt existing internal logic for updating and deleting actions. It is recommended to complete the implementation of namespace filtering in the backend and update internal service calls to ensure consistency and security. Furthermore, consider adding comments to the new namespace_id and namespace_fqn fields in actions.proto to improve clarity and maintainability.
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:
|
X-Test Failure Reporttest-cases-mapping-report |
Benchmark results, click to expandBenchmark authorization.GetDecisions Results:
Benchmark authorization.v2.GetMultiResourceDecision Results:
Benchmark Statistics
Bulk Benchmark Results
TDF3 Benchmark Results:
|
Proposed Changes
This pull request introduces namespace support to the policy service, primarily focusing on
Actions. It adds anamespacefield to theActionprotobuf definition and integratesnamespace_idandnamespace_fqnfields into request messages for creating, retrieving, and listing actions. These new fields are accompanied by robust validation rules to ensure data consistency and proper identification of namespaces. The changes also include updates to the gRPC documentation and expanded unit tests to cover the new validation logic.Highlights
namespacefield of typeNamespacehas been introduced to thepolicy.Actionmessage inservice/policy/objects.proto, providing a namespace context for actions.GetActionRequest,ListActionsRequest, andCreateActionRequestinservice/policy/actions/actions.protonow includenamespace_id(UUID) andnamespace_fqn(URI) fields, which are required and mutually exclusive (oneof).namespace_idandnamespace_fqnfields, ensuring they adhere to UUID and URI formats respectively, and that one of them is always provided.Checklist
Testing Instructions