Skip to content

feat(policy): deprecate GetAttributeValuesByFqns in favor of narrow read APIs - #3745

Merged
alkalescent merged 5 commits into
mainfrom
deprecate-getattributevaluesbyfqns
Jul 13, 2026
Merged

feat(policy): deprecate GetAttributeValuesByFqns in favor of narrow read APIs#3745
alkalescent merged 5 commits into
mainfrom
deprecate-getattributevaluesbyfqns

Conversation

@alkalescent

@alkalescent alkalescent commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Deprecates the GetAttributeValuesByFqns RPC (option deprecated = true), steering new use to the narrow read APIs:

  • GetKeyMappingsByFqns for client-side key splits
  • GetEntitleableAttributesByFqns for server-side entitlement resolution

Non-breaking: the RPC still functions; this is an annotation. release-please will cut a protocol/go minor.

Also excludes the generated sdk/sdkconnect connect wrappers from lint. Those wrappers forward every RPC, including the now-deprecated one, so once the deprecation is visible in the workspace they would trip staticcheck SA1019; the wrappers are generated, so a path exclusion (like .pb.go) is the appropriate handling.

Dynamic Value Mapping Proto Docs

Also adds contract-level doc comments to the DynamicValueMapping protos so the semantics surface in the generated SDK / OpenAPI / gRPC docs (kept out of the service PR #3568 to avoid coupling it to a protocol/go release):

  • DynamicValueResolver.operator: IN_CONTAINS is substring-based and over-matches by design (e.g. admin matches superadmin); prefer IN unless substring matching is intended.
  • DynamicValueMapping: multiple mappings on a definition are OR-ed; a mapping's subject sets are AND-ed; and coexistence rules (no value-level subject mappings on the same definition; values under such a definition cannot be added to a registered resource's action attribute values).

Comment-only, so non-breaking; regenerated protocol/go and policy docs.

Notes

  • Method-level deprecation, so only actual GetAttributeValuesByFqns calls are affected; the ...Response_AttributeAndValue response types used elsewhere are not.
  • Follow-up consumer PRs will add //nolint:staticcheck at the remaining call sites (sdk/granter.go, sdk/discovery.go, service/authorization, tests-bdd) and bump their protocol/go pins. Those must land after this releases, since the nolint directives are only valid once the deprecation exists.
  • The RPC remains in use as the SDK granter's grant fallback and in the v2 PDP path; deprecation is the signal, removal is separate future work.

Testing

  • buf lint service passes; protocol/go builds.
  • Generated connect/grpc clients now carry the // Deprecated: marker for GetAttributeValuesByFqns.

Summary by CodeRabbit

  • Documentation

    • Marked GetAttributeValuesByFqns as deprecated across API documentation and client interfaces.
    • Added guidance to use GetKeyMappingsByFqns or GetEntitleableAttributesByFqns instead.
  • Chores

    • Updated linting exclusions to account for generated and deprecated API wrappers.

…ead APIs

Signed-off-by: Krish Suchak <suchak.krish@gmail.com>
Signed-off-by: Krish Suchak <suchak.krish@gmail.com>
@alkalescent
alkalescent requested review from a team as code owners July 10, 2026 17:48
@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 deprecation notice for the GetAttributeValuesByFqns RPC to encourage the adoption of more specific read APIs. The change is non-breaking and serves as a signal for future migration. Additionally, it adjusts linting rules to accommodate generated code that references this deprecated method.

Highlights

  • RPC Deprecation: Marked the GetAttributeValuesByFqns RPC as deprecated in the service definition, providing guidance to use GetKeyMappingsByFqns and GetEntitleableAttributesByFqns instead.
  • Linting Configuration: Updated .golangci.yaml to exclude the generated sdk/sdkconnect directory from linting to prevent staticcheck warnings on forwarded deprecated RPCs.
  • Documentation Update: Updated the generated gRPC documentation to reflect the deprecation status of the RPC.
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/**/* (1)
    • docs/openapi/policy/attributes/attributes.openapi.yaml
  • Ignored by pattern: protocol/**/* (3)
    • protocol/go/policy/attributes/attributes.pb.go
    • protocol/go/policy/attributes/attributes_grpc.pb.go
    • protocol/go/policy/attributes/attributesconnect/attributes.connect.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.


The old RPC must fade away, / New methods take the light of day. / With deprecation tags in place, / We move at a much faster pace.

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 comp:policy Policy Configuration ( attributes, subject mappings, resource mappings, kas registry) docs Documentation size/xs labels Jul 10, 2026
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

GetAttributeValuesByFqns is deprecated across protobuf, Connect bindings, gRPC documentation, and OpenAPI. Dynamic value mapping and resolver semantics are expanded across protocol and API documentation, and generated Connect wrappers are excluded from linting and formatting.

Changes

Attributes RPC deprecation

Layer / File(s) Summary
RPC contract and generated bindings
service/policy/attributes/attributes.proto, protocol/go/policy/attributes/attributesconnect/attributes.connect.go, .golangci.yaml
The RPC gains deprecated = true and replacement guidance; Connect interfaces document the deprecation, and generated wrappers are excluded from linting and formatting.
Published API documentation
docs/grpc/index.html, docs/openapi/policy/attributes/attributes.openapi.yaml
gRPC and OpenAPI documentation mark the RPC as deprecated and reference replacement methods.

Dynamic policy documentation

Layer / File(s) Summary
Dynamic value semantics
service/policy/objects.proto, docs/openapi/policy/dynamicvaluemapping/..., docs/openapi/policy/objects.openapi.yaml, docs/grpc/index.html
Documentation describes OR/AND mapping evaluation, coexistence restrictions, and substring over-matching for IN_CONTAINS, with guidance to prefer IN when appropriate.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: dmihalcik-virtru, c-r33d, jakedoublev

Poem

A rabbit hops through docs so bright,
Marking old RPCs with “deprecated” right.
Mappings join in OR and AND,
New keys guide the service land.
Hop, hop—the contracts now align!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: deprecating GetAttributeValuesByFqns in favor of narrower read APIs.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch deprecate-getattributevaluesbyfqns

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.

@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 deprecates the GetAttributeValuesByFqns RPC in the attributes service protobuf definition, updating the generated documentation and linter exclusions accordingly. The review feedback suggests formatting the deprecation comment using the standard // Deprecated: ... prefix to ensure that IDEs and code generators correctly parse and display the deprecation notice.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread service/policy/attributes/attributes.proto Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.golangci.yaml:
- Line 213: Add sdk/sdkconnect/ to the formatters exclusions.paths section,
mirroring its existing entry under linters exclusions.paths and preserving the
generated: lax configuration.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 4df700e4-918b-458a-bf0f-9ee9b91c19b7

📥 Commits

Reviewing files that changed from the base of the PR and between 3f32839 and 478635b.

⛔ Files ignored due to path filters (2)
  • protocol/go/policy/attributes/attributes.pb.go is excluded by !**/*.pb.go
  • protocol/go/policy/attributes/attributes_grpc.pb.go is excluded by !**/*.pb.go
📒 Files selected for processing (5)
  • .golangci.yaml
  • docs/grpc/index.html
  • docs/openapi/policy/attributes/attributes.openapi.yaml
  • protocol/go/policy/attributes/attributesconnect/attributes.connect.go
  • service/policy/attributes/attributes.proto

Comment thread .golangci.yaml
@github-actions

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 219.925281ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

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

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.159138ms
Throughput 233.56 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 47.694839644s
Average Latency 475.312947ms
Throughput 104.83 requests/second

Signed-off-by: Krish Suchak <suchak.krish@gmail.com>
Signed-off-by: Krish Suchak <suchak.krish@gmail.com>
@github-actions

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.970368ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

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

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 422.005551ms
Throughput 236.96 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 44.990919324s
Average Latency 448.729803ms
Throughput 111.13 requests/second

@alkalescent
alkalescent enabled auto-merge July 10, 2026 20:25
Add proto doc comments (surfaced in generated SDK/OpenAPI/gRPC docs) for the
dynamic value mapping contract:
- DynamicValueResolver.operator: IN_CONTAINS is substring-based and over-matches
  by design; prefer IN unless substring matching is intended.
- DynamicValueMapping: multiple mappings on a definition are OR-ed, a mapping's
  subject sets are AND-ed, and coexistence rules (no value-level subject mappings
  on the same definition; values under such a definition cannot be added to a
  registered resource's action attribute values).

Comment-only; buf breaking passes. Regenerated protocol/go and policy docs.

Signed-off-by: Krish Suchak <suchak.krish@gmail.com>
@github-actions

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 322.831534ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

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

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 441.410734ms
Throughput 226.55 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 44.813294603s
Average Latency 446.438373ms
Throughput 111.57 requests/second

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Govulncheck found vulnerabilities ⚠️

The following modules have known vulnerabilities:

  • examples
  • otdfctl
  • sdk
  • service
  • lib/fixtures
  • tests-bdd

See the workflow run for details.

@alkalescent
alkalescent added this pull request to the merge queue Jul 13, 2026
Merged via the queue into main with commit baba709 Jul 13, 2026
47 checks passed
@alkalescent
alkalescent deleted the deprecate-getattributevaluesbyfqns branch July 13, 2026 13:09
khvirtru pushed a commit to khvirtru/platform that referenced this pull request Jul 22, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.39.0](opentdf/platform@protocol/go/v0.38.0...protocol/go/v0.39.0)
(2026-07-21)


### Features

* **policy:** Add name and manager lookup
([opentdf#3753](opentdf#3753))
([bfbc65d](opentdf@bfbc65d))
* **policy:** Add UnsafeUpdateKey rpc.
([opentdf#3728](opentdf#3728))
([c89b193](opentdf@c89b193))
* **policy:** create subject mappings with attribute values
([opentdf#3741](opentdf#3741))
([718320b](opentdf@718320b))
* **policy:** deprecate GetAttributeValuesByFqns in favor of narrow read
APIs ([opentdf#3745](opentdf#3745))
([baba709](opentdf@baba709))

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


##
[0.21.0](opentdf/platform@service/v0.20.0...service/v0.21.0)
(2026-07-22)


### ⚠ BREAKING CHANGES

* **policy:** GetPC does not respect manager field.
([opentdf#3752](opentdf#3752))

### Features

* **core:** Update fixtures
([opentdf#3766](opentdf#3766))
([9ac1640](opentdf@9ac1640))
* **policy:** add entitleable namespace field and narrow-read-API doc
corrections ([opentdf#3727](opentdf#3727))
([0fc2f01](opentdf@0fc2f01))
* **policy:** Add name and manager lookup
([opentdf#3753](opentdf#3753))
([bfbc65d](opentdf@bfbc65d))
* **policy:** Add UnsafeUpdateKey implementation
([opentdf#3731](opentdf#3731))
([cd47518](opentdf@cd47518))
* **policy:** Add UnsafeUpdateKey rpc.
([opentdf#3728](opentdf#3728))
([c89b193](opentdf@c89b193))
* **policy:** create subject mappings with attribute values
([opentdf#3741](opentdf#3741))
([718320b](opentdf@718320b))
* **policy:** deprecate GetAttributeValuesByFqns in favor of narrow read
APIs ([opentdf#3745](opentdf#3745))
([baba709](opentdf@baba709))
* **policy:** dynamic attribute value entitlement mappings
([opentdf#3568](opentdf#3568))
([21e95e0](opentdf@21e95e0))
* **policy:** populate entitleable definition namespace
([opentdf#3737](opentdf#3737))
([3f32839](opentdf@3f32839))


### Bug Fixes

* **authz:** use standard Keycloak token exchange
([opentdf#3754](opentdf#3754))
([de9ae0d](opentdf@de9ae0d))
* **core:** Pass the platform logger to the authz role provider factory
([opentdf#3732](opentdf#3732))
([9c32554](opentdf@9c32554))
* **core:** prevent OpenTelemetry resource schema conflicts
([opentdf#3769](opentdf#3769))
([4a0c41c](opentdf@4a0c41c))
* **deps:** bump github.com/opentdf/platform/protocol/go from 0.38.0 to
0.39.0 in /service
([opentdf#3764](opentdf#3764))
([8d430f5](opentdf@8d430f5))
* **ers:** coerce attempted_strategies []string to []interface{} for
structpb ([opentdf#3645](opentdf#3645))
([71d6e90](opentdf@71d6e90))
* **policy:** GetPC does not respect manager field.
([opentdf#3752](opentdf#3752))
([0d3c0a0](opentdf@0d3c0a0))

---
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>
mkleene added a commit to opentdf/java-sdk that referenced this pull request Jul 27, 2026
This PR updates the platform.branch property in all pom.xml files to the
new tag or branch: v0.39.0.

See the release:
https://github.com/opentdf/platform/releases/tag/protocol%2Fgo%2Fv0.39.0

Release Notes:
##
[0.39.0](opentdf/platform@protocol/go/v0.38.0...protocol/go/v0.39.0)
(2026-07-21)


### Features

* **policy:** Add name and manager lookup
([#3753](opentdf/platform#3753))
([bfbc65d](opentdf/platform@bfbc65d))
* **policy:** Add UnsafeUpdateKey rpc.
([#3728](opentdf/platform#3728))
([c89b193](opentdf/platform@c89b193))
* **policy:** create subject mappings with attribute values
([#3741](opentdf/platform#3741))
([718320b](opentdf/platform@718320b))
* **policy:** deprecate GetAttributeValuesByFqns in favor of narrow read
APIs ([#3745](opentdf/platform#3745))
([baba709](opentdf/platform@baba709))

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Morgan Kleene <mkleene@virtru.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp:policy Policy Configuration ( attributes, subject mappings, resource mappings, kas registry) docs Documentation size/xs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants