Skip to content

feat(policy): DSPX-2541 add narrow attribute read APIs#3634

Open
alkalescent wants to merge 4 commits into
mainfrom
DSPX-2541-attribute-read-apis
Open

feat(policy): DSPX-2541 add narrow attribute read APIs#3634
alkalescent wants to merge 4 commits into
mainfrom
DSPX-2541-attribute-read-apis

Conversation

@alkalescent

@alkalescent alkalescent commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Proposed Changes

Add two purpose-built read RPCs to the attributes service, replacing the "get everything" GetAttributeValuesByFqns for two distinct callers:

  • GetKeyMappingsByFqns (client-side key splits) — per value FQN returns the attribute rule and the effective KAS keys, resolved server-side with value > definition > namespace precedence over the SimpleKasKey model (mirrors sdk/granter.go). Limitation: legacy-grant-only values (no kas_keys) return an empty key set.
  • GetEntitleableAttributesByFqns (server-side decisioning) — per value FQN returns the rule, value id, the definition's ordered value FQNs (for hierarchy rule logic), and value-level subject mappings, fetched via a new lean getSubjectMappingsByValueFqns query (single roundtrip, not the full-policy load).

Both responses are flat FQN-keyed maps. Includes proto, regenerated protocol/go + docs, the sdk connect wrapper, handlers, DB methods/SQL, tests, and updates to the hand-written AttributesServiceClient mocks for the new interface methods.

Checklist

  • I have added or updated unit tests
  • I have added or updated integration tests (if appropriate)
  • I have added or updated documentation

Testing Instructions

  • go test ./service/policy/db/ -run TestResolveEffectiveKasKeys
  • go test ./service/integration/ -run 'TestAttributesSuite/Test_GetKeyMappingsByFqns|TestAttributesSuite/Test_GetEntitleableAttributesByFqns'
  • go test ./service/authorization/...
  • golangci-lint run ./policy/... ./authorization/... — 0 issues.

Related

Summary by CodeRabbit

  • New Features
    • Added two new read-only API endpoints: GetKeyMappingsByFqns (returns effective key-mapping data for key-split construction) and GetEntitleableAttributesByFqns (returns entitlement-relevant attribute data for access decisioning). Both accept attribute-value identifiers and return mapping/definition/value data without side effects.
  • Documentation
    • Updated gRPC and OpenAPI documentation, including request/response details and service listing entries.
  • Tests
    • Added integration coverage for key mappings, entitlement lookups, and hierarchy behavior.

@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 two purpose-built read RPCs to the attributes service, replacing the broader GetAttributeValuesByFqns for specific caller needs. These changes improve performance and reduce data payload size by providing only the necessary fields for client-side key splitting and server-side entitlement resolution. The implementation includes the required protobuf definitions, database queries, service handlers, and test coverage.

Highlights

  • New Attribute Read APIs: Added two new RPCs, GetKeyMappingsByFqns and GetEntitleableAttributesByFqns, to the attributes service to support optimized, narrow-scope data retrieval for client-side key splitting and server-side entitlement decisioning.
  • Database Optimization: Implemented a new lean SQL query getSubjectMappingsByValueFqns to fetch subject mappings in a single roundtrip, avoiding the overhead of full-policy loading.
  • SDK and Testing: Updated the SDK Connect wrapper, regenerated protocol definitions, and added comprehensive integration tests to verify the new API functionality and key resolution logic.
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.


Two new paths for data to flow, Narrow reads to make it go. Keys and rules in tidy sets, Optimized for what it gets.

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:db DB component comp:policy Policy Configuration ( attributes, subject mappings, resource mappings, kas registry) comp:sdk A software development kit, including library, for client applications and inter-service communicati comp:authorization docs Documentation labels Jun 17, 2026

@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 two new narrow read APIs to the AttributesService: GetKeyMappingsByFqns (for client-side key split construction) and GetEntitleableAttributesByFqns (for server-side entitlement resolution). These APIs allow fetching targeted policy data without loading the entire policy. The changes include new Protobuf definitions, database query implementations, and comprehensive tests. The review feedback suggests optimizing the SQL query getSubjectMappingsByValueFqns by casting standard_actions and custom_actions to ::jsonb. This enables sqlc to generate these fields as []byte instead of interface{}, allowing the Go code to pass the raw bytes directly to unmarshalAllActionsProto and completely avoid the overhead of json.Marshal.

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/db/queries/subject_mappings.sql Outdated
Comment thread service/policy/db/attribute_fqn.go Outdated
@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@alkalescent, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 37 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses rolling per-developer review limits. Reviews become available again as older review attempts age out of the rolling limit window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: e4f2fc52-6427-4e6b-9765-b14a33486e99

📥 Commits

Reviewing files that changed from the base of the PR and between f16cd0d and 6adaa3e.

⛔ 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 (12)
  • docs/grpc/index.html
  • docs/openapi/policy/attributes/attributes.openapi.yaml
  • protocol/go/policy/attributes/attributesconnect/attributes.connect.go
  • sdk/sdkconnect/attributes.go
  • service/authorization/authorization_test_structures.go
  • service/integration/attributes_test.go
  • service/policy/attributes/attributes.go
  • service/policy/attributes/attributes.proto
  • service/policy/db/attribute_fqn.go
  • service/policy/db/attribute_fqn_test.go
  • service/policy/db/queries/subject_mappings.sql
  • service/policy/db/subject_mappings.sql.go
📝 Walkthrough

Walkthrough

Two new narrow read-path RPCs — GetKeyMappingsByFqns and GetEntitleableAttributesByFqns — are added to policy.attributes.AttributesService. The change spans proto message definitions, a new SQL query with sqlc-generated Go, DB client implementation with key-precedence and subject-mapping hydration helpers, service handler wiring, Connect-Go/SDK surface updates, integration and unit tests, and gRPC/OpenAPI documentation.

Changes

FQN-based Narrow Read RPCs

Layer / File(s) Summary
Proto message and RPC definitions
service/policy/attributes/attributes.proto
Adds GetKeyMappingsByFqns* and GetEntitleableAttributesByFqns* request/response messages (with nested AttributeKeyMapping and EntitleableAttribute types) and registers both as NO_SIDE_EFFECTS RPCs on AttributesService.
SQL query and generated Go for subject mappings by value FQNs
service/policy/db/queries/subject_mappings.sql, service/policy/db/subject_mappings.sql.go
Introduces getSubjectMappingsByValueFqns SQL with a per-mapping action-aggregation CTE, inner joins to attribute_values/attribute_fqns to filter to value-level rows, and the corresponding sqlc-generated getSubjectMappingsByValueFqnsRow struct and Queries method.
DB client implementation and helpers
service/policy/db/attribute_fqn.go, service/policy/db/attribute_fqn_test.go
Implements GetKeyMappingsByFqns (value→definition→namespace KAS key precedence via resolveEffectiveKasKeys) and GetEntitleableAttributesByFqns (FQN resolution, subject-mapping hydration via hydrateSubjectMappingForEntitlement, and per-FQN entitleable response construction). Adds unit tests for resolveEffectiveKasKeys precedence cases.
Service handler, Connect generated code, and SDK wrapper
service/policy/attributes/attributes.go, protocol/go/policy/attributes/attributesconnect/attributes.connect.go, sdk/sdkconnect/attributes.go
Adds GetKeyMappingsByFqns and GetEntitleableAttributesByFqns handler methods on AttributesService (tracing + db.StatusifyError), extends the Connect-Go generated client/handler interfaces and routing, and adds wrapper methods in the SDK AttributesServiceClientConnectWrapper.
Integration tests, mock stubs, and documentation
service/integration/attributes_test.go, service/authorization/authorization_test_structures.go, docs/grpc/index.html, docs/openapi/policy/attributes/attributes.openapi.yaml
Adds integration tests for key-inheritance, entitleable-attribute response shape, and hierarchy value ordering; adds authorization mock stubs to satisfy the updated interface; extends gRPC and OpenAPI docs with schemas, path operations, and service table entries for both new endpoints.

Sequence Diagram(s)

sequenceDiagram
  participant Client
  participant AttributesService
  participant PolicyDBClient
  participant GetAttributesByValueFqns
  participant getSubjectMappingsByValueFqns
  participant resolveEffectiveKasKeys

  rect rgba(70, 130, 180, 0.5)
    Note over Client, resolveEffectiveKasKeys: GetKeyMappingsByFqns
    Client->>AttributesService: GetKeyMappingsByFqns(fqns)
    AttributesService->>PolicyDBClient: GetKeyMappingsByFqns(req)
    PolicyDBClient->>GetAttributesByValueFqns: resolve attributes/values by FQN
    GetAttributesByValueFqns-->>PolicyDBClient: map[fqn]→Attribute+Value
    loop per FQN
      PolicyDBClient->>resolveEffectiveKasKeys: value > definition > namespace keys
      resolveEffectiveKasKeys-->>PolicyDBClient: []SimpleKasKey
    end
    PolicyDBClient-->>AttributesService: map[fqn]→AttributeKeyMapping
    AttributesService-->>Client: GetKeyMappingsByFqnsResponse
  end

  rect rgba(60, 179, 113, 0.5)
    Note over Client, getSubjectMappingsByValueFqns: GetEntitleableAttributesByFqns
    Client->>AttributesService: GetEntitleableAttributesByFqns(fqns)
    AttributesService->>PolicyDBClient: GetEntitleableAttributesByFqns(req)
    PolicyDBClient->>GetAttributesByValueFqns: resolve attributes/values by FQN
    PolicyDBClient->>getSubjectMappingsByValueFqns: fetch value-level subject mappings
    getSubjectMappingsByValueFqns-->>PolicyDBClient: []row with value_fqn + mappings
    PolicyDBClient-->>AttributesService: map[fqn]→EntitleableAttribute
    AttributesService-->>Client: GetEntitleableAttributesByFqnsResponse
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • opentdf/platform#3172: Modifies the same service/policy/db/queries/subject_mappings.sql and subject_mappings.sql.go files that this PR extends with the new getSubjectMappingsByValueFqns query.

Suggested labels

size/m

Suggested reviewers

  • c-r33d
  • elizabethhealy

Poem

🐇 Hop, hop through FQNs so bright,
Two new RPCs read by night—
Key mappings flow, entitlements align,
Subject maps hydrated, oh so fine!
The proto speaks, the DB sings,
A rabbit celebrates these narrow-read things! 🗝️

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 40.00% 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 clearly and specifically describes the main change: adding two narrow-scoped read APIs to the attributes service for specific use cases (key mappings and entitleable attributes for decisioning).
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-2541-attribute-read-apis

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.

@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 189.816269ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

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

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 695.143802ms
Throughput 143.86 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 43.554474551s
Average Latency 433.711678ms
Throughput 114.80 requests/second

@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 180.434577ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

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

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 412.994783ms
Throughput 242.13 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 42.843568377s
Average Latency 426.656636ms
Throughput 116.70 requests/second

@alkalescent alkalescent marked this pull request as ready for review June 17, 2026 20:03
@alkalescent alkalescent requested review from a team as code owners June 17, 2026 20:03
@alkalescent alkalescent enabled auto-merge June 18, 2026 14:48
@jakedoublev

Copy link
Copy Markdown
Contributor

@dmihalcik-virtru Would you mind taking a look as the author of the autoconfigure logic in the SDK today to build key splits? Any thoughts on this new API dedicated to that purpose?

AttributeRuleTypeEnum rule = 2;
// effective KAS keys resolved for this value (value > definition > namespace
// precedence, key mappings preferred over legacy grants); may be empty
repeated policy.SimpleKasKey keys = 3;

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.

cc @dmihalcik-virtru

I think we may need to clarify in the response whether there are keys assigned at the attribute value level, definition level, and namespace level for each of the requested attribute value FQNs. If I have a key on only some of the attribute values under a single definition, it seems like it wouldn't be possible to easily tell from this API response if the specific keys I got in this list were for the value, definition, or namespace, unless it's more of a tuple with 3 indexes than a list?

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.

Dave will definitely be able to tell you, but the granter does need to be able to tell what split to make; which is derived from where the key lives. (value, def, namespace)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

In the key assignment algorithm, the most specific key is picked - for example, if there is a key on a value, that is preferred to keys on the attribute or namespace. IIRC if assigned two values from one attribute, and one has a key and the other does not, I think then both keys from the attr (or namespace) and value are used. For example if we have assignments:

a -> k1
a/x -> k2
a/y -> none

If a is an and, you'll get a split over k1 and k2, and if a is an or you'll get a share over k1 and k2.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks, Dave. I'll keep the flat repeated SimpleKasKey keys since resolveEffectiveKasKeys returns the most specific keys per value (value > definition > namespace), and each entry carries the attribute rule.

}];
}
message GetEntitleableAttributesByFqnsResponse {
message EntitleableAttribute {

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.

Some ideas about this response:

  1. Would it be an over-optimization if we only provide the entire list of values back for hierarchy attributes? If we have an any_of or all_of attribute, when decisioning in the PDP, we only need to know the rule and compare against the actual attributes in the decision request (on the TDF), such as /attr/project/value/abc and attr/project/value/xyz. If an entity is entitled to attr/project/value/jkl, it doesn't matter to the decision for any_of and all_of attributes, but that logic doesn't hold up for hierarchy attributes where entitlement to one of the values that is not present on the resource in the decision request could result in entitlement to the resource.
  2. Should we restructure the response so that we only return all of the values for each definition once? This way, if we have an attribute definition with 10k values and have to make a decision on a request with anywhere from 1-10k attribute values under that single definition, we only get the definition with all of its values 1 time instead of n times in the response back?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

These are some good ideas to fine-tune the entitlements response; I've incorporated both into the changes.

@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 158.921111ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

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

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 414.387485ms
Throughput 241.32 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 42.54443733s
Average Latency 423.919809ms
Throughput 117.52 requests/second

@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 `@service/integration/attributes_test.go`:
- Around line 1672-1688: The test currently validates that lowFqn exists in
resp.GetFqnEntitleableAttributes() with correct properties, but does not assert
that the map contains only the requested value and no other FQNs. Add an
assertion to verify the length of resp.GetFqnEntitleableAttributes() equals 1 or
add explicit checks that highFqn and midFqn are not present in the map, ensuring
the response does not inadvertently over-return entitleable attributes beyond
what was requested.
🪄 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: e9a97052-0f55-4a9a-9338-b3656bc84e4c

📥 Commits

Reviewing files that changed from the base of the PR and between 8295bab and f16cd0d.

⛔ Files ignored due to path filters (1)
  • protocol/go/policy/attributes/attributes.pb.go is excluded by !**/*.pb.go
📒 Files selected for processing (6)
  • docs/grpc/index.html
  • docs/openapi/policy/attributes/attributes.openapi.yaml
  • service/integration/attributes_test.go
  • service/policy/attributes/attributes.go
  • service/policy/attributes/attributes.proto
  • service/policy/db/attribute_fqn.go

Comment thread service/integration/attributes_test.go
Add two purpose-built read RPCs to the attributes service, replacing the 'get everything' GetAttributeValuesByFqns for two distinct callers:

- GetKeyMappingsByFqns (client-side key splits): per value FQN returns the attribute rule and effective KAS keys, resolved value > definition > namespace over the SimpleKasKey model (mirrors sdk/granter.go).
- GetEntitleableAttributesByFqns (server-side decisioning): per value FQN returns the rule, value id, ordered definition value FQNs (for hierarchy), and value-level subject mappings via a new lean getSubjectMappingsByValueFqns query.

Includes proto, regenerated protocol/go + docs, the sdk connect wrapper, handlers, DB methods/SQL, and tests. Updates the hand-written AttributesServiceClient mocks (myAttributesClient, paginatedMockAttributesClient) for the new interface methods.

Signed-off-by: Krish Suchak <suchak.krish@gmail.com>
…tion

Cast standard_actions/custom_actions to ::jsonb in getSubjectMappingsByValueFqns so sqlc generates []byte; pass the raw bytes directly to unmarshalAllActionsProto, removing the json.Marshal round-trip (addresses review feedback; aligns with the CPU-reduction goal).

Signed-off-by: Krish Suchak <suchak.krish@gmail.com>
@alkalescent alkalescent force-pushed the DSPX-2541-attribute-read-apis branch from f16cd0d to 6adaa3e Compare June 23, 2026 19:34
@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 191.336638ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

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

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.785226ms
Throughput 226.35 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 45.574077404s
Average Latency 453.455568ms
Throughput 109.71 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp:authorization comp:db DB component comp:policy Policy Configuration ( attributes, subject mappings, resource mappings, kas registry) comp:sdk A software development kit, including library, for client applications and inter-service communicati docs Documentation size/l

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants