Skip to content

feat(policy): Add FQN to RegisteredResourceValues#3446

Merged
jakedoublev merged 7 commits into
mainfrom
DSPX-3194-registered-resource-value-fqn
May 7, 2026
Merged

feat(policy): Add FQN to RegisteredResourceValues#3446
jakedoublev merged 7 commits into
mainfrom
DSPX-3194-registered-resource-value-fqn

Conversation

@jakedoublev

@jakedoublev jakedoublev commented May 7, 2026

Copy link
Copy Markdown
Contributor
  • add fqn to policy.RegisteredResourceValue and regenerate protobuf/OpenAPI docs
  • populate registered resource value FQNs across get/list/create/update/delete and embedded resource values

Summary by CodeRabbit

  • New Features
    • RegisteredResourceValue objects now include a fully qualified name (fqn) field that is returned in all API responses. This field combines the namespace and resource value identifier into a unified reference format.

@jakedoublev
jakedoublev requested review from a team as code owners May 7, 2026 18:06
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 a Fully Qualified Name (FQN) field to the RegisteredResourceValue model. The change ensures that resource values can be uniquely identified and referenced by their FQN across the system. The implementation includes necessary protobuf updates, database hydration logic, and comprehensive integration test updates to maintain consistency across all CRUD operations.

Highlights

  • Schema Update: Added the fqn field to the RegisteredResourceValue protobuf definition and updated the associated documentation.
  • Logic Implementation: Introduced helper functions to calculate and hydrate FQNs for registered resource values across various database operations.
  • Service Integration: Updated Get, List, Create, Update, and Delete operations to ensure the fqn field is correctly populated in responses.
  • Test Coverage: Updated integration tests to verify the presence and accuracy of the fqn field in resource value lifecycle events.
New Features

🧠 You can now enable Memory (public preview) 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.

Ignored Files
  • Ignored by pattern: docs/openapi/**/* (2)
    • docs/openapi/policy/objects.openapi.yaml
    • docs/openapi/policy/registeredresources/registered_resources.openapi.yaml
  • Ignored by pattern: protocol/**/* (1)
    • protocol/go/policy/objects.pb.go
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the 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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. 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.


A resource value needed a name, To rise above its simple frame. With FQN now in the set, It's easier to find, you bet.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-actions github-actions Bot added the size/s label May 7, 2026
@coderabbitai

coderabbitai Bot commented May 7, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Rate limit exceeded

@jakedoublev has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 11 minutes and 31 seconds before requesting another review.

To continue reviewing without waiting, purchase usage credits in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 09f41fe0-0cc7-4572-b1c5-6e19e81fb61b

📥 Commits

Reviewing files that changed from the base of the PR and between 6802b34 and f3fcb05.

📒 Files selected for processing (4)
  • otdfctl/e2e/registered-resources.bats
  • service/integration/registered_resources_test.go
  • service/policy/db/registered_resources.go
  • service/policy/registeredresources/registered_resources.go
📝 Walkthrough

Walkthrough

This PR adds an fqn field to the RegisteredResourceValue message that contains a fully-qualified name composed of the namespace, resource name, and value. The field is computed and hydrated in all data access functions, documented in API schemas and gRPC docs, and verified through updated tests.

Changes

Hydrate RegisteredResourceValue with FQN

Layer / File(s) Summary
Proto message schema definition
service/policy/objects.proto
RegisteredResourceValue message now includes fqn as a string field (tag 5).
API specification updates
docs/openapi/policy/objects.openapi.yaml, docs/openapi/policy/registeredresources/registered_resources.openapi.yaml, docs/grpc/index.html
OpenAPI and gRPC documentation schemas document the new fqn field in RegisteredResourceValue.
FQN computation and hydration helpers
service/policy/db/registered_resources.go
Introduces registeredResourceValueFQN function to build FQN strings from namespace, resource name, and value, and hydrateRegisteredResourceValueFQNs to populate Fqn fields on RegisteredResourceValue slices.
FQN population in data accessors
service/policy/db/registered_resources.go
Updates GetRegisteredResource, ListRegisteredResources, GetRegisteredResourceValue, ListRegisteredResourceValues, and DeleteRegisteredResourceValue to compute and set the Fqn field using the helper functions.
FQN population test assertions
service/integration/registered_resources_test.go
Updates deletion, lookup, and batch retrieval tests to verify that returned RegisteredResourceValue objects include the computed FQN matching expected values.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • opentdf/platform#3312: Both PRs modify the same service/policy/db/registered_resources.go functions (notably ListRegisteredResources), so the changes are directly related at the code level.
  • opentdf/platform#3165: Both PRs modify the registered-resources DB/logic (service/policy/db/registered_resources.go and related registered resource handling), with the main PR adding/setting RegisteredResourceValue.fqn and the retrieved PR changing namespace handling and query behavior, so they are related.
  • opentdf/platform#3206: Both PRs touch service/policy/db/registered_resources.go and make related changes to RegisteredResourceValue handling (main PR adds/hydrates the FQN field while the retrieved PR refactors action/attribute resolution and enforces namespace consistency), so they are related.

Suggested labels

comp:db, comp:policy, size/m, docs

Suggested reviewers

  • c-r33d
  • elizabethhealy

Poem

🐰 A fully-qualified name takes form,
Through namespaces and values warm,
Each resource now declares its way,
With FQN lighting up the day! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat(policy): Add FQN to RegisteredResourceValues' accurately and clearly summarizes the main change—adding an FQN field to the RegisteredResourceValue schema, as evidenced by the proto definition update, OpenAPI schema changes, and database/API logic additions.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch DSPX-3194-registered-resource-value-fqn

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added comp:db DB component comp:policy Policy Configuration ( attributes, subject mappings, resource mappings, kas registry) docs Documentation labels May 7, 2026
@jakedoublev jakedoublev changed the title DSPX-3194 Add FQN to registered resource values feat(policy): Add FQN to RegisteredResourceValues May 7, 2026
@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown
Contributor
Benchmark results, click to expand

Benchmark authorization.GetDecisions Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 169.150431ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 94.443558ms

Benchmark Statistics

Name № Requests Avg Duration Min Duration Max Duration

Bulk Benchmark Results

Metric Value
Total Decrypts 100
Successful Decrypts 100
Failed Decrypts 0
Total Time 439.83648ms
Throughput 227.36 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 43.183650181s
Average Latency 429.754579ms
Throughput 115.78 requests/second

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new fqn (Fully Qualified Name) field to the RegisteredResourceValue object, updating the protobuf definition, documentation, and database logic to populate this field. Integration tests have been expanded to verify the FQN in various service responses. Feedback was provided regarding a potential performance regression in the DeleteRegisteredResourceValue method, where an additional database fetch was added; it is recommended to use a SQL RETURNING clause to improve efficiency and maintain consistency with other deletion methods.

Comment thread service/policy/db/registered_resources.go
@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown
Contributor

X-Test Failure Report

opentdfplatformIF5HPK.dockerbuild
govulncheck-failure-8

@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown
Contributor
Benchmark results, click to expand

Benchmark authorization.GetDecisions Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 198.22811ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 102.497441ms

Benchmark Statistics

Name № Requests Avg Duration Min Duration Max Duration

Bulk Benchmark Results

Metric Value
Total Decrypts 100
Successful Decrypts 100
Failed Decrypts 0
Total Time 413.064803ms
Throughput 242.09 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 43.999897994s
Average Latency 438.367107ms
Throughput 113.64 requests/second

@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown
Contributor
Benchmark results, click to expand

Benchmark authorization.GetDecisions Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 140.243767ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 77.47134ms

Benchmark Statistics

Name № Requests Avg Duration Min Duration Max Duration

Bulk Benchmark Results

Metric Value
Total Decrypts 100
Successful Decrypts 100
Failed Decrypts 0
Total Time 400.907935ms
Throughput 249.43 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 40.468726632s
Average Latency 403.406945ms
Throughput 123.55 requests/second

@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown
Contributor

X-Test Failure Report

opentdfplatform7WTNEG.dockerbuild
govulncheck-failure-8

@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown
Contributor
Benchmark results, click to expand

Benchmark authorization.GetDecisions Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 182.444856ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 90.79466ms

Benchmark Statistics

Name № Requests Avg Duration Min Duration Max Duration

Bulk Benchmark Results

Metric Value
Total Decrypts 100
Successful Decrypts 100
Failed Decrypts 0
Total Time 428.541042ms
Throughput 233.35 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 42.959232504s
Average Latency 427.558819ms
Throughput 116.39 requests/second

@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown
Contributor

X-Test Failure Report

opentdfplatformNCB3BJ.dockerbuild
govulncheck-failure-8

@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown
Contributor
Benchmark results, click to expand

Benchmark authorization.GetDecisions Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 185.401557ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 93.417265ms

Benchmark Statistics

Name № Requests Avg Duration Min Duration Max Duration

Bulk Benchmark Results

Metric Value
Total Decrypts 100
Successful Decrypts 100
Failed Decrypts 0
Total Time 413.181875ms
Throughput 242.02 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 43.728833497s
Average Latency 435.493385ms
Throughput 114.34 requests/second

@jakedoublev
jakedoublev enabled auto-merge May 7, 2026 18:35
@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown
Contributor
Benchmark results, click to expand

Benchmark authorization.GetDecisions Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 192.047334ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 103.006417ms

Benchmark Statistics

Name № Requests Avg Duration Min Duration Max Duration

Bulk Benchmark Results

Metric Value
Total Decrypts 100
Successful Decrypts 100
Failed Decrypts 0
Total Time 418.469732ms
Throughput 238.97 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 43.265946745s
Average Latency 431.557979ms
Throughput 115.56 requests/second

@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown
Contributor
Benchmark results, click to expand

Benchmark authorization.GetDecisions Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 177.597405ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 89.824997ms

Benchmark Statistics

Name № Requests Avg Duration Min Duration Max Duration

Bulk Benchmark Results

Metric Value
Total Decrypts 100
Successful Decrypts 100
Failed Decrypts 0
Total Time 429.848076ms
Throughput 232.64 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 42.116025659s
Average Latency 419.185415ms
Throughput 118.72 requests/second

@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown
Contributor

⚠️ Govulncheck found vulnerabilities ⚠️

The following modules have known vulnerabilities:

  • tests-bdd

See the workflow run for details.

@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown
Contributor

@jakedoublev
jakedoublev added this pull request to the merge queue May 7, 2026
Merged via the queue into main with commit 3199583 May 7, 2026
39 checks passed
@jakedoublev
jakedoublev deleted the DSPX-3194-registered-resource-value-fqn branch May 7, 2026 22:55
JBCongdon pushed a commit to JBCongdon/platform that referenced this pull request May 24, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.30.0](opentdf/platform@protocol/go/v0.29.0...protocol/go/v0.30.0)
(2026-05-11)


### Features

* **policy:** Add FQN to RegisteredResourceValues
([opentdf#3446](opentdf#3446))
([3199583](opentdf@3199583))
* **policy:** Add resource mapping group FQNs
([opentdf#3447](opentdf#3447))
([6a0b3c6](opentdf@6a0b3c6))

---
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>
JBCongdon pushed a commit to JBCongdon/platform that referenced this pull request May 24, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.32.0](opentdf/platform@otdfctl/v0.31.0...otdfctl/v0.32.0)
(2026-05-19)


### Features

* **cli:** Add better unit testing.
([opentdf#3378](opentdf#3378))
([3ad33dc](opentdf@3ad33dc))
* **cli:** Add interactive review for prune plans
([opentdf#3421](opentdf#3421))
([c11680b](opentdf@c11680b))
* **cli:** Add prune confirmation.
([opentdf#3469](opentdf#3469))
([c6d47ec](opentdf@c6d47ec))
* **cli:** Add prune planner.
([opentdf#3411](opentdf#3411))
([3e294e6](opentdf@3e294e6))
* **cli:** Add prune summary information
([opentdf#3456](opentdf#3456))
([c900c53](opentdf@c900c53))
* **cli:** add sensitive flag annotation to DocFlag
([opentdf#3457](opentdf#3457))
([98f48d2](opentdf@98f48d2))
* **cli:** Confirm and execute pruning of legacy objects
([opentdf#3458](opentdf#3458))
([24c09dd](opentdf@24c09dd))
* **cli:** Print report on failure
([opentdf#3365](opentdf#3365))
([05a4473](opentdf@05a4473))
* **cli:** Sort parameters.
([opentdf#3478](opentdf#3478))
([73ad878](opentdf@73ad878))
* **policy:** Add FQN to RegisteredResourceValues
([opentdf#3446](opentdf#3446))
([3199583](opentdf@3199583))
* **policy:** Add resource mapping group FQNs
([opentdf#3447](opentdf#3447))
([6a0b3c6](opentdf@6a0b3c6))


### Bug Fixes

* **cli:** Prune was not classifying multi-namespaced RRs properly.
([opentdf#3488](opentdf#3488))
([eae8645](opentdf@eae8645))
* **cli:** support json profile output
([opentdf#3448](opentdf#3448))
([61f194c](opentdf@61f194c))
* **deps:** bump github.com/opentdf/platform/lib/identifier from 0.3.0
to 0.4.0 in /otdfctl
([opentdf#3367](opentdf#3367))
([aa23179](opentdf@aa23179))
* **deps:** bump github.com/opentdf/platform/protocol/go from 0.27.0 to
0.28.0 in /otdfctl
([opentdf#3419](opentdf#3419))
([c80374f](opentdf@c80374f))
* **deps:** bump github.com/opentdf/platform/sdk from 0.16.0 to 0.17.0
in /otdfctl ([opentdf#3397](opentdf#3397))
([bb9fcd6](opentdf@bb9fcd6))
* **deps:** bump go.opentelemetry.io/otel from 1.40.0 to 1.41.0 in
/otdfctl ([opentdf#3400](opentdf#3400))
([5631c37](opentdf@5631c37))
* **deps:** bump module protocol/go to v0.30.0 throughout
([opentdf#3459](opentdf#3459))
([8eaa502](opentdf@8eaa502))

---
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>
Co-authored-by: Chris Reed <87077975+c-r33d@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp:db DB component comp:policy Policy Configuration ( attributes, subject mappings, resource mappings, kas registry) docs Documentation size/s

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants