Skip to content

feat(policy): Add sort support to ListNamespaces API#3192

Merged
dsm20 merged 15 commits into
mainfrom
feat/DSPX-2681-add-sort-support-list-namespaces
Apr 1, 2026
Merged

feat(policy): Add sort support to ListNamespaces API#3192
dsm20 merged 15 commits into
mainfrom
feat/DSPX-2681-add-sort-support-list-namespaces

Conversation

@dsm20

@dsm20 dsm20 commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds strongly-typed single-field sort capability to the ListNamespaces RPC. Defines a
SortNamespacesType enum and NamespacesSort message per the strongly-typed approach
agreed on in DSPX-2680, then wires it through to CASE WHEN SQL ordering via sqlc.

Resolves DSPX-2681
Depends on DSPX-2680 (shared SortDirection enum in selectors.proto)

Changes

Protoservice/policy/namespaces/namespaces.proto

  • Added SortNamespacesType enum (NAME, FQN, CREATED_AT, UPDATED_AT)
  • Added NamespacesSort message (embeds enum + SortDirection)
  • Added repeated NamespacesSort sort to ListNamespacesRequest with max 1 protovalidate
    constraint
  • Regenerated protos and docs

SQLservice/policy/db/queries/namespaces.sql

  • CASE WHEN ORDER BY blocks for 4 fields x 2 directions + created_at DESC fallback

Goservice/policy/db/utils.go + service/policy/db/namespaces.go

  • GetNamespacesSortParams: maps enum → SQL-compatible field/direction strings
  • ListNamespaces handler calls it via r.GetSort()

Tests

  • 9 unit tests for the enum mapper (nil, empty, unspecified, each field + direction)
  • 6 integration tests (sort by name ASC/DESC, created_at ASC, fqn ASC, updated_at DESC,
    unspecified fallback)

Deferred

  • otdfctl --sort flag for policy namespaces list — will hit all CLI changes after finishing changes to API.

Design Decisions

  1. Strongly-typed sort enums — Per team discussion on DSPX-2680, each entity defines
    its own sort enum rather than using a generic string field. Valid sort fields are
    discoverable via IDE autocomplete and enforced at compile time.

  2. CASE WHEN ORDER BY in sqlc — Each sortable field gets two CASE blocks (ASC + DESC),
    grouped by column type. The enum mapper in Go converts the proto enum to strings that
    match the SQL CASE conditions.

  3. Silent fall-through for UNSPECIFIEDSORT_NAMESPACES_TYPE_UNSPECIFIED returns
    empty strings, causing all CASE branches to evaluate to NULL. The created_at DESC
    tiebreaker takes over.

  4. Integration tests over unit tests — Ticket AC says "unit tests" but sort behavior
    requires a real DB. Written as integration tests following existing codebase precedent.
    Unit tests cover the enum mapper separately.

Test Plan

  • golangci-lint passes (0 issues)
  • Unit tests pass (go test ./service/policy/db/...)
  • Integration tests compile (go build ./service/integration/...)
  • Integration tests pass in CI

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

Summary by CodeRabbit

  • New Features

    • Namespace listings now support client-requested sorting by name, FQN, creation time, or last-updated time, in ascending or descending order. List requests accept an optional sort specification (one item).
  • Documentation

    • Added docs describing available sort fields and directions and how to include a sort in list requests.
  • Tests

    • Added integration and unit tests covering sorting behavior, defaulting when unspecified, and parameter handling.

@dsm20
dsm20 requested review from a team as code owners March 20, 2026 21:13
@dsm20
dsm20 marked this pull request as draft March 20, 2026 21:13
@github-actions github-actions Bot added comp:db DB component comp:policy Policy Configuration ( attributes, subject mappings, resource mappings, kas registry) size/m labels Mar 20, 2026
@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 enhances the ListNamespaces RPC by introducing robust single-field sorting capabilities. It modifies the database query to dynamically order results based on specified fields and directions, leveraging CASE WHEN clauses for flexible SQL generation. The changes include updates to the API's PageRequest to accept sort parameters, a new utility function to process these parameters, and extensive integration tests to ensure the feature's reliability and correctness. This lays the groundwork for future sort-enabled list RPCs across the platform.

Highlights

  • Single-Field Sorting for ListNamespaces RPC: Implemented single-field sorting for the ListNamespaces RPC, allowing dynamic ordering of results based on specified criteria.
  • Dynamic SQL Ordering with CASE WHEN: Updated the underlying SQL query to use CASE WHEN expressions for flexible sorting by name, fqn, created_at, and updated_at in both ascending and descending orders.
  • Sort Parameter Extraction and Integration: Introduced a new GetSortParams utility function to parse sort requests from PageRequest and integrated it into the ListNamespaces database layer.
  • API Contract Extension for Sorting: Expanded the policy/selectors.proto definition to include SortDirection enum and SortField message, enabling sort parameter specification in API requests.
  • Comprehensive Integration Tests: Added extensive integration tests to verify correct sorting behavior for various fields and directions, including a fallback to default ordering for unspecified or invalid sort fields.

🧠 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.

Ignored Files
  • Ignored by pattern: protocol/**/* (1)
    • protocol/go/policy/selectors.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 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 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.


Data flows, a stream, Sort it, ASC or DESC, Order brings new gleam.

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.

@coderabbitai

coderabbitai Bot commented Mar 20, 2026

Copy link
Copy Markdown

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds request-level sorting for ListNamespaces: new proto enums/messages (SortDirection, SortNamespacesType, NamespacesSort), ListNamespacesRequest gains an optional repeated sort, helper maps proto sort to SQL, listNamespaces SQL ORDER BY made dynamic, and unit + integration tests added.

Changes

Cohort / File(s) Summary
Protocol Definitions
service/policy/selectors.proto, service/policy/namespaces/namespaces.proto
Added SortDirection enum; added SortNamespacesType enum and NamespacesSort message; added repeated NamespacesSort sort to ListNamespacesRequest (max_items = 1).
API Documentation / OpenAPI
docs/grpc/index.html, docs/openapi/policy/selectors.openapi.yaml, docs/openapi/policy/namespaces/namespaces.openapi.yaml
Added documentation/OpenAPI schemas for policy.SortDirection, policy.namespaces.SortNamespacesType, and policy.namespaces.NamespacesSort; updated ListNamespacesRequest schema to include optional sort array.
Database Query SQL
service/policy/db/queries/namespaces.sql
Replaced fixed ORDER BY ns.created_at DESC with parameter-driven CASE-based ORDER BY supporting name, fqn, created_at, updated_at and ASC/DESC; preserved ns.created_at DESC as final tie-breaker; pagination unchanged.
DB Go Layer
service/policy/db/namespaces.sql.go, service/policy/db/namespaces.go
Added SortField/SortDirection to listNamespacesParams, adjusted parameter ordering and query invocation; PolicyDBClient.ListNamespaces derives sort params and forwards them to the query.
Utilities & Tests
service/policy/db/utils.go, service/policy/db/utils_test.go
Added exported GetNamespacesSortParams(sort []*namespaces.NamespacesSort) (string, string) mapping proto enums to SQL column and direction; added unit tests covering mapping, edge cases, and defaults.
Integration Tests
service/integration/namespaces_test.go
Added integration tests for ListNamespaces sorting: name ASC/DESC, FQN ASC, created_at ASC (with delays), updated_at DESC (after update), and fallback behavior when sort unspecified.
Docs HTML
docs/grpc/index.html
Inserted new enum/message entries into the Table of Contents and documentation for the new sorting enums/messages.

Sequence Diagram

sequenceDiagram
    participant Client
    participant Service
    participant DB
    Client->>Service: ListNamespacesRequest (optional sort)
    Service->>Service: GetNamespacesSortParams(sort)
    Service->>Service: Build listNamespaces params (active, offset, limit, sortField, sortDirection)
    Service->>DB: listNamespaces(params)
    DB->>DB: Apply ORDER BY CASE using sortField & sortDirection
    DB-->>Service: Sorted namespace rows
    Service-->>Client: ListNamespacesResponse
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

🐰 I hop through enums, nibble a sort,
Fields align tidy in every report,
Name, FQN, dates — ASC or DESC,
I twirl them in order, neat as a nest,
Hooray — namespaces spring into best!

🚥 Pre-merge checks | ✅ 2 | ❌ 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 (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely describes the main change: adding sort support to the ListNamespaces API. It directly correlates with the primary objective of the PR.

✏️ 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 feat/DSPX-2681-add-sort-support-list-namespaces

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

@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 effectively introduces sorting capabilities to the ListNamespaces RPC. The implementation using CASE statements in the SQL query is a practical solution for dynamic sorting with sqlc, and the addition of comprehensive integration tests is a great step towards ensuring correctness. I have identified a critical issue that could lead to a panic, along with some opportunities to improve test correctness and reliability.

Comment thread service/policy/db/utils.go Outdated
Comment thread service/integration/namespaces_test.go
Comment thread service/policy/db/utils_test.go Outdated
@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 159.242552ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

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

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 393.03501ms
Throughput 254.43 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 39.518745974s
Average Latency 393.056393ms
Throughput 126.52 requests/second

@github-actions

Copy link
Copy Markdown
Contributor

@dsm20 dsm20 changed the title feat(policy): add sort support list namespaces feat(policy): Add sort support to ListNamespaces API Mar 23, 2026
@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 150.248845ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

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

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 404.423708ms
Throughput 247.27 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 37.662611921s
Average Latency 375.081077ms
Throughput 132.76 requests/second

@github-actions

Copy link
Copy Markdown
Contributor

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

Benchmark authorization.v2.GetMultiResourceDecision Results:

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

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 396.068463ms
Throughput 252.48 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 41.608087645s
Average Latency 414.95314ms
Throughput 120.17 requests/second

@github-actions

Copy link
Copy Markdown
Contributor

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

Benchmark authorization.v2.GetMultiResourceDecision Results:

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

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 397.864951ms
Throughput 251.34 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 42.337539156s
Average Latency 420.417175ms
Throughput 118.10 requests/second

@github-actions

Copy link
Copy Markdown
Contributor

@dsm20
dsm20 force-pushed the feat/DSPX-2681-add-sort-support-list-namespaces branch from f6574f1 to c8bb6d0 Compare March 24, 2026 00:11
@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 163.88479ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

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

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 396.722474ms
Throughput 252.07 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 41.021207145s
Average Latency 407.766898ms
Throughput 121.89 requests/second

@github-actions

Copy link
Copy Markdown
Contributor

@dsm20
dsm20 marked this pull request as ready for review March 24, 2026 18:49

@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: 7

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
docs/grpc/index.html (2)

12352-12484: ⚠️ Potential issue | 🟡 Minor

Document the actual ListNamespacesRequest.sort contract.

Because this field is repeated, the current Optional description makes multi-key sorting look valid, and NamespacesSort itself does not explain the single-field/default behavior. Add those semantics in the source comments before regenerating the page.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/grpc/index.html` around lines 12352 - 12484, Update the source protobuf
comments to clearly document the ListNamespacesRequest.sort contract: in the
comment for the ListNamespacesRequest.sort field and on the NamespacesSort
message, state that although the field is declared repeated it is optional and
only the first element is applied (i.e., single-field sorting / default
behavior), or define the explicit multi-key merge semantics if multi-key sorting
is supported; mention the default sort if none provided and reference
SortNamespacesType and SortDirection. After changing the comments on
ListNamespacesRequest.sort and NamespacesSort, regenerate the HTML docs so the
updated contract appears in the generated page.

7401-7482: ⚠️ Potential issue | 🔴 Critical

The HTML documentation at lines 7401-7482 incorrectly documents non-existent PageRequest.sort and SortField types.

The proto sources show PageRequest (selectors.proto) contains only limit and offset fields. There is no SortField message, and sorting is not a shared PageRequest feature. ListNamespacesRequest defines its own repeated NamespacesSort sort field, which uses the shared SortDirection enum but is request-specific, not a PageRequest capability.

Remove the incorrect PageRequest.sort, SortField documentation, and namespace-scoped references to them. The duplicated SortDirection documentation and TOC entries should also be deduplicated.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/grpc/index.html` around lines 7401 - 7482, The generated HTML
incorrectly documents a non-existent PageRequest.sort and a global SortField
message; remove the PageRequest.sort entry and the SortField section/toc
entries, and instead ensure any sorting docs reference the request-scoped sort
types (e.g., ListNamespacesRequest -> NamespacesSort) and the shared enum
SortDirection only where actually used; update/remove duplicated SortDirection
TOC/section so SortDirection appears once and is linked from request-specific
sort fields rather than from PageRequest or a global SortField.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/grpc/index.html`:
- Around line 7518-7545: The docs contain a duplicated enum section for
SortDirection (h3 id="policy.SortDirection") causing a repeated TOC entry;
locate the generator/template or source that emits the policy.SortDirection enum
(search for "SortDirection" or the template that renders enums) and remove the
duplicate emission (remove the redundant template block or stop processing the
same proto/enum twice), then regenerate the docs so the SortDirection enum
appears only once.

In `@docs/openapi/policy/attributes/attributes.openapi.yaml`:
- Around line 1299-1307: The OpenAPI spec incorrectly exposes a generic
policy.PageRequest.sort and policy.SortField (used by ListAttributes clients)
but the shipped proto only defines limit/offset and sorting is
namespace-specific via NamespacesSort; remove the generic sort and SortField
entries from the non-namespace OpenAPI artifacts and regenerate the namespace
OpenAPI from the final proto so only ListNamespaces (and
namespaces.ListNamespacesRequest.Sort / NamespacesSort) exposes sorting; verify
and remove the same stale shared-schema expansion wherever policy.PageRequest or
policy.SortField were added (see service/policy/db/namespaces.go usage and
ListAttributes references) and re-run spec generation from the final proto
contract.

In `@docs/openapi/policy/kasregistry/key_access_server_registry.openapi.yaml`:
- Around line 972-980: The shared schema documents a hardcoded fallback "Falls
back to created_at DESC" for the `sort` property which is too specific; remove
that resource-specific default from the common `sort` field (the
`policy.SortField`/`sort` schema) and instead document any concrete fallback
per-endpoint where applicable (move the "created_at DESC" text into the endpoint
operation descriptions that actually use that default). Ensure the `sort` schema
description stays generic (e.g., "Optional: sort results. Array for future
extensibility; max 1 via protovalidate for now.") and update endpoint docs to
state their specific fallback behavior.
- Around line 1088-1102: The SortField schema currently allows a free-form
string for the field property (policy.SortField.field); change this to use a
resource-specific enum reference instead of type: string — either (a) define
per-resource enum schemas (e.g., policy.UserSortFieldFields,
policy.ProjectSortFieldFields) and replace field's type with $ref to the
appropriate enum, or (b) replace policy.SortField with a oneOf/anyOf that
references resource-specific SortField schemas so each resource's sortable field
names are strictly typed; update any request/response schemas that reference
policy.SortField to use the correct resource-specific SortField schema.

In `@docs/openapi/policy/namespaces/namespaces.openapi.yaml`:
- Around line 695-703: Clarify in the ListNamespacesRequest OpenAPI description
which sort mechanism wins: update the documentation for the resource-specific
"sort" field (items $ref '#/components/schemas/policy.SortNamespacesType' or
mention SortNamespacesType enum) to state that it takes precedence over the
generic pagination.sort (policy.SortField) and recommend clients use the
strongly-typed "sort" for namespace results; additionally add a note suggesting
deprecating pagination.sort for this endpoint (or explicitly document both if
deprecation is deferred) so consumers are not confused about precedence between
ListNamespacesRequest.pagination.sort and the endpoint-level sort field.

In `@service/policy/db/namespaces.sql.go`:
- Around line 202-213: The ORDER BY ends with a non-unique tie-breaker
(ns.created_at DESC) causing unstable pagination; update the SQL in the ORDER BY
clause to append a unique deterministic tie-breaker such as ns.id (e.g., add ",
ns.id ASC" after ns.created_at DESC or otherwise ensure ns.id is the final
ordering key) so rows with identical sort keys are ordered consistently; apply
this change in the query that generates namespaces (modify the ORDER BY in the
namespaces SQL query) and then regenerate sqlc so the updated statement lands in
service/policy/db/namespaces.sql.go.

In `@service/policy/db/queries/namespaces.sql`:
- Around line 16-25: The ORDER BY clause must include a deterministic
tie-breaker to prevent duplicate/skip across pages when created_at/updated_at
collide; update the ORDER BY in the namespaces query to append ns.id as the
final sort key (after the existing conditional cases and fallback ns.created_at
DESC) so that every ordering is stable, ensuring you reference ns.id alongside
the existing `@sort_field/`@sort_direction logic in the ORDER BY expression.

---

Outside diff comments:
In `@docs/grpc/index.html`:
- Around line 12352-12484: Update the source protobuf comments to clearly
document the ListNamespacesRequest.sort contract: in the comment for the
ListNamespacesRequest.sort field and on the NamespacesSort message, state that
although the field is declared repeated it is optional and only the first
element is applied (i.e., single-field sorting / default behavior), or define
the explicit multi-key merge semantics if multi-key sorting is supported;
mention the default sort if none provided and reference SortNamespacesType and
SortDirection. After changing the comments on ListNamespacesRequest.sort and
NamespacesSort, regenerate the HTML docs so the updated contract appears in the
generated page.
- Around line 7401-7482: The generated HTML incorrectly documents a non-existent
PageRequest.sort and a global SortField message; remove the PageRequest.sort
entry and the SortField section/toc entries, and instead ensure any sorting docs
reference the request-scoped sort types (e.g., ListNamespacesRequest ->
NamespacesSort) and the shared enum SortDirection only where actually used;
update/remove duplicated SortDirection TOC/section so SortDirection appears once
and is linked from request-specific sort fields rather than from PageRequest or
a global SortField.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: af958750-fcd6-4d3a-b700-94e241bded6a

📥 Commits

Reviewing files that changed from the base of the PR and between a9d66ae and c8bb6d0.

⛔ Files ignored due to path filters (2)
  • protocol/go/policy/namespaces/namespaces.pb.go is excluded by !**/*.pb.go
  • protocol/go/policy/selectors.pb.go is excluded by !**/*.pb.go
📒 Files selected for processing (19)
  • docs/grpc/index.html
  • docs/openapi/policy/actions/actions.openapi.yaml
  • docs/openapi/policy/attributes/attributes.openapi.yaml
  • docs/openapi/policy/kasregistry/key_access_server_registry.openapi.yaml
  • docs/openapi/policy/keymanagement/key_management.openapi.yaml
  • docs/openapi/policy/namespaces/namespaces.openapi.yaml
  • docs/openapi/policy/obligations/obligations.openapi.yaml
  • docs/openapi/policy/registeredresources/registered_resources.openapi.yaml
  • docs/openapi/policy/resourcemapping/resource_mapping.openapi.yaml
  • docs/openapi/policy/selectors.openapi.yaml
  • docs/openapi/policy/subjectmapping/subject_mapping.openapi.yaml
  • service/integration/namespaces_test.go
  • service/policy/db/namespaces.go
  • service/policy/db/namespaces.sql.go
  • service/policy/db/queries/namespaces.sql
  • service/policy/db/utils.go
  • service/policy/db/utils_test.go
  • service/policy/namespaces/namespaces.proto
  • service/policy/selectors.proto

Comment thread docs/grpc/index.html
Comment thread docs/openapi/policy/attributes/attributes.openapi.yaml Outdated
Comment thread docs/openapi/policy/kasregistry/key_access_server_registry.openapi.yaml Outdated
Comment thread docs/openapi/policy/kasregistry/key_access_server_registry.openapi.yaml Outdated
Comment thread docs/openapi/policy/namespaces/namespaces.openapi.yaml Outdated
Comment thread service/policy/db/namespaces.sql.go
Comment thread service/policy/db/queries/namespaces.sql
@dsm20
dsm20 marked this pull request as draft March 24, 2026 19:14
@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 183.783619ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

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

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 415.564687ms
Throughput 240.64 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 42.398585152s
Average Latency 421.770284ms
Throughput 117.93 requests/second

@github-actions

Copy link
Copy Markdown
Contributor

@dsm20
dsm20 marked this pull request as ready for review March 24, 2026 21:19

@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 the current code and only fix it if needed.

Inline comments:
In `@docs/grpc/index.html`:
- Around line 12275-12280: Update the documentation/source proto comments for
the Namespaces RPC so the repeated field "sort" (type
policy.namespaces.NamespacesSort) clearly documents that only a single sort
entry is honored and that if none is provided the server falls back to ordering
by created_at DESC; change the comment block for the "sort" field in the
relevant .proto or template to state "Only the first sort entry is used; if
omitted the server orders by created_at DESC" and then regenerate the HTML docs
so the change appears throughout the generated pages (including the other
referenced ranges).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 60e06a80-d6ad-4e67-8a23-b6d075bc7647

📥 Commits

Reviewing files that changed from the base of the PR and between c8bb6d0 and 74ff26e.

📒 Files selected for processing (3)
  • docs/grpc/index.html
  • docs/openapi/policy/namespaces/namespaces.openapi.yaml
  • docs/openapi/policy/selectors.openapi.yaml

Comment thread docs/grpc/index.html
Comment thread service/integration/namespaces_test.go
Added default case (same functionality as current unspecified sort)
@dsm20
dsm20 force-pushed the feat/DSPX-2681-add-sort-support-list-namespaces branch from 86a0e49 to 8700eb8 Compare March 31, 2026 15:50
@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 203.991844ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

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

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 407.738441ms
Throughput 245.26 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 44.368611861s
Average Latency 442.468712ms
Throughput 112.69 requests/second

@github-actions

Copy link
Copy Markdown
Contributor

@dsm20
dsm20 added this pull request to the merge queue Apr 1, 2026
Merged via the queue into main with commit aac86cd Apr 1, 2026
37 checks passed
@dsm20
dsm20 deleted the feat/DSPX-2681-add-sort-support-list-namespaces branch April 1, 2026 14:08
github-merge-queue Bot pushed a commit that referenced this pull request Apr 1, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.22.0](protocol/go/v0.21.0...protocol/go/v0.22.0)
(2026-04-01)


### Features

* **policy:** Add sort support to ListNamespaces API
([#3192](#3192))
([aac86cd](aac86cd))
* **policy:** add SortField proto and update PageRequest for sort
support ([#3187](#3187))
([6cf1862](6cf1862))

---
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>
github-merge-queue Bot pushed a commit that referenced this pull request Apr 6, 2026
Resolves [DSPX-2682](https://virtru.atlassian.net/browse/DSPX-2682),
depends on #3187

## Proposed Changes
- Adds strongly-typed sort support to `ListAttributes` RPC, following
the
pattern established in #3192 (ListNamespaces)
- Sortable fields: `name`, `created_at`, `updated_at` (ASC/DESC), with
backward-compatible fallback to `created_at DESC`
  - Includes CASE WHEN ordering in both `listAttributesDetail` and
`listAttributesSummary` SQL queries
## Changes
- **Proto**: `SortAttributesType` enum, `AttributesSort` message, `sort`
  field on `ListAttributesRequest` (max 1, buf.validate)
- **SQL**: CASE WHEN sort blocks in `attributes.sql` for both detail and
summary queries
  - **Go**: `GetAttributesSortParams()` helper in `utils.go`, wired into
`ListAttributes()` in `attributes.go`
- **Tests**: 9 unit tests for the helper, 5 integration tests covering
each sort field + direction + fallback

### Checklist

- [x] I have added or updated unit tests
- [x] I have added or updated integration tests (if appropriate)
- [x] I have added or updated documentation



[DSPX-2682]:
https://virtru.atlassian.net/browse/DSPX-2682?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Release Notes

* **New Features**
* Added sorting capability for attributes with options to sort by name,
creation date, or last updated date in ascending or descending order.

* **Documentation**
* Updated API documentation with new sorting parameters and clarified
timestamp parameter constraints.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Diego <74568547+dsm20@users.noreply.github.com>
github-merge-queue Bot pushed a commit that referenced this pull request Apr 8, 2026
Resolves [DSPX-2685](https://virtru.atlassian.net/browse/DSPX-2685)

## Proposed Changes

- Adds strongly-typed sort support to `ListSubjectMappings` RPC,
following the
pattern established in #3223 (ListAttributes) and #3192 (ListNamespaces)
  - Sortable fields: `created_at`, `updated_at` (ASC/DESC), with
  backward-compatible fallback to `created_at DESC`

## Changes

  **Proto** — `service/policy/subjectmapping/subject_mapping.proto`
- `SortSubjectMappingsType` enum (`UNSPECIFIED`, `CREATED_AT`,
`UPDATED_AT`)
  - `SubjectMappingsSort` message (field + direction)
- `repeated SubjectMappingsSort sort = 11` on
`ListSubjectMappingsRequest` with `max_items = 1` constraint
  - Regenerated protos and docs

  **SQL** — `service/policy/db/queries/subject_mappings.sql`
- CASE WHEN ORDER BY blocks for `created_at` and `updated_at` (ASC/DESC
each)
  - Fallback `sm.created_at DESC` + tiebreaker `sm.id ASC`

**Go** — `service/policy/db/utils.go` +
`service/policy/db/subject_mappings.go`
- `GetSubjectMappingsSortParams()`: maps enum to SQL-compatible
field/direction strings
- `ListSubjectMappings` handler wired to call mapper and pass params to
sqlc query
- Extracted `sortFieldCreatedAt`/`sortFieldUpdatedAt` constants in
`utils.go` to resolve `goconst` lint across all sort helpers
**_(slightly out of scope but necessary to avoid goconst errors)_**

  **Tests**
- 9 unit tests for the enum mapper helper (nil, empty, unspecified, each
field + direction)
- 5 integration tests (created_at ASC/DESC, updated_at ASC/DESC,
unspecified fallback) using `createSortTestSubjectMappings` suite helper
- Protovalidate sort constraint test
(`Test_ListSubjectMappingsRequest_Sort`)

## Notes

- `name` sort is listed in the ticket but the `subject_mappings` table
has no `name` column
- `otdfctl --sort` flag deferred to a follow-up, consistent with #3192
and #3223

### Checklist

  - [x] I have added or updated unit tests
  - [x] I have added or updated integration tests (if appropriate)
  - [x] I have added or updated documentation

[DSPX-2685]:
https://virtru.atlassian.net/browse/DSPX-2685?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added sorting to the subject mappings list: sort by created_at or
updated_at, ASC/DESC, max one sort field per request.

* **Documentation**
* gRPC and OpenAPI docs updated to describe new sort enum, sort object,
and request sort field.

* **Tests**
* Added unit and integration tests covering sort parameter validation
and ordering behavior.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
github-merge-queue Bot pushed a commit that referenced this pull request Apr 10, 2026
Resolves [DSPX-2686](https://virtru.atlassian.net/browse/DSPX-2686)

## Proposed Changes

- Adds strongly-typed sort support to `ListSubjectConditionSets` RPC,
following the
pattern established in #3223 (ListAttributes) and #3255
(ListSubjectMappings)
- Sortable fields: `created_at`, `updated_at` (ASC/DESC), with
backward-compatible fallback to `created_at DESC`

## Changes

**Proto** — `service/policy/subjectmapping/subject_mapping.proto`
- `SortSubjectConditionSetsType` enum (`UNSPECIFIED`, `CREATED_AT`,
`UPDATED_AT`)
- `SubjectConditionSetsSort` message (field + direction)
- `repeated SubjectConditionSetsSort sort = 11` on
`ListSubjectConditionSetsRequest` with
`max_items = 1` constraint
- Regenerated protos and docs

**SQL** — `service/policy/db/queries/subject_mappings.sql`
- CASE WHEN sort blocks in `listSubjectConditionSets` query
- Fallback `scs.created_at DESC` + tiebreaker `scs.id ASC`

**Go** — `service/policy/db/utils.go` +
`service/policy/db/subject_mappings.go`
- `GetSubjectConditionSetsSortParams()`: maps enum to SQL-compatible
field/direction
strings
- `ListSubjectConditionSets` handler wired to call mapper and pass
params to sqlc query

**Tests**
- 8 unit tests for the enum mapper helper (nil, empty, unspecified, each
field +
direction)
- 5 integration tests (created_at ASC/DESC, updated_at ASC/DESC,
unspecified fallback)
using `createSortTestSubjectConditionSets` suite helper
- Protovalidate sort constraint test
(`Test_ListSubjectConditionSetsRequest_Sort`)

## Notes
- `otdfctl --sort` flag deferred to a follow-up, consistent with #3192,
#3223, and #3255

### Checklist

- [x] I have added or updated unit tests
- [x] I have added or updated integration tests (if appropriate)
- [x] I have added or updated documentation
### Testing Instructions



[DSPX-2686]:
https://virtru.atlassian.net/browse/DSPX-2686?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added sorting for Subject Condition Set listings by created_at or
updated_at (ASC/DESC). Requests accept at most one sort entry; default
ordering is created_at DESC with deterministic tie-breaker when omitted
or unspecified.

* **Documentation**
* Clarified shared sort-direction semantics: unspecified direction → ASC
when a sort field is provided; omitted/UNSPECIFIED sort fields defer to
each List endpoint’s documented default ordering.

* **Tests**
* Added unit and integration tests covering sort parameter handling,
ordering, and validation.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
github-merge-queue Bot pushed a commit that referenced this pull request Apr 14, 2026
Resolves DSPX-2689
Proposed Changes
- Adds strongly-typed sort support to ListKeyAccessServers RPC,
following the
pattern established in #3223 (ListAttributes), #3255
(ListSubjectMappings), and #3272 (ListSubjectConditionSets)
- Sortable fields: name, uri, created_at, updated_at (ASC/DESC), with
backward-compatible fallback to created_at DESC
Changes
Proto — service/policy/kasregistry/key_access_server_registry.proto
- SortKeyAccessServersType enum (UNSPECIFIED, NAME, URI, CREATED_AT,
UPDATED_AT)
- KeyAccessServersSort message (field + direction)
- repeated KeyAccessServersSort sort = 11 on ListKeyAccessServersRequest
with
max_items = 1 constraint
- Regenerated protos and docs

SQL — service/policy/db/queries/key_access_server_registry.sql
- CASE WHEN sort blocks in listKeyAccessServers query for 4 fields (8
blocks total)
- Fallback kas.created_at DESC + tiebreaker kas.id ASC

Go — service/policy/db/utils.go +
service/policy/db/key_access_server_registry.go
- GetKeyAccessServersSortParams(): maps enum to SQL-compatible
field/direction strings
- ListKeyAccessServers handler wired to call mapper and pass params to
sqlc query
- Extracted sortFieldName constant in utils.go to resolve goconst lint
across sort helpers (slightly out of scope but necessary to
avoid goconst errors, same pattern as
sortFieldCreatedAt/sortFieldUpdatedAt from #3255)
Tests
- 12 unit tests for the enum mapper helper (nil, empty, unspecified,
each field + direction)
- 9 integration tests (created_at ASC/DESC, updated_at ASC/DESC, name
ASC/DESC, uri ASC/DESC, unspecified fallback) using
createSortTestKeyAccessServers and createNamedSortTestKeyAccessServers
suite helpers
- Protovalidate sort constraint test
(Test_ListKeyAccessServersRequest_Sort)
Notes
- otdfctl --sort flag deferred to a follow-up, consistent with #3192,
#3223, #3255, and #3272
### Checklist

- [x] I have added or updated unit tests
- [x] I have added or updated integration tests (if appropriate)
- [x] I have added or updated documentation

### Testing Instructions



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added sorting for Key Access Servers list (name, URI, created_at,
updated_at) with ASC/DESC; single sort directive accepted; default
ordering is created_at DESC then id ASC.

* **Documentation**
* Protocol and API docs updated to describe new sort parameters,
enums/schemas, and default ordering behavior.

* **Tests**
* Added unit and integration tests to validate sort mapping, behavior,
and single-sort request validation.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
github-merge-queue Bot pushed a commit that referenced this pull request Apr 15, 2026
### Proposed Changes

Resolves DSPX-2690

- Adds strongly-typed sort support to ListObligations RPC, following the
pattern established in #3223 (ListAttributes), #3255
(ListSubjectMappings), #3272 (ListSubjectConditionSets), and the
ListKeyAccessServers PR
- Sortable fields: name, fqn, created_at, updated_at (ASC/DESC), with
backward-compatible fallback to created_at DESC

### Changes

**Proto** — `service/policy/obligations/obligations.proto`
- `SortObligationsType` enum (UNSPECIFIED, NAME, FQN, CREATED_AT,
UPDATED_AT)
- `ObligationsSort` message (field + direction)
- `repeated ObligationsSort sort = 11` on `ListObligationsRequest` with
`max_items = 1` constraint
- Regenerated protos and docs

**SQL** — `service/policy/db/queries/obligations.sql`
- CASE WHEN sort blocks in `listObligations` query for 4 fields (8
blocks total)
- FQN sort uses constructed expression `fqns.fqn || '/obl/' ||
LOWER(od.name)` since obligation FQNs aren't stored in `attribute_fqns`
- Fallback `od.created_at DESC`

**Go** — `service/policy/db/utils.go` +
`service/policy/db/obligations.go`
- `GetObligationsSortParams()`: maps enum to SQL-compatible
field/direction strings
- `ListObligations` handler wired to call mapper and pass params to sqlc
query
- Added `sortFieldName` and `sortFieldFQN` constants in `utils.go` (same
pattern as `sortFieldCreatedAt`/`sortFieldUpdatedAt` from #3255)

**Tests**
- 12 unit tests for the enum mapper helper (nil, empty, unspecified,
each field + direction)
- 9 integration tests (name ASC/DESC, fqn ASC/DESC, created_at ASC/DESC,
updated_at ASC/DESC, unspecified fallback) using
`createSortTestObligations` and `createNamedSortTestObligations` suite
helpers
- Protovalidate sort constraint test
(`Test_ListObligationsRequest_Sort`)

### Notes

- otdfctl `--sort` flag deferred to a follow-up, consistent with #3192,
#3223, #3255, and #3272
- Tie-breaker (`od.id ASC`) deferred to a follow-up refactoring ticket

### Checklist

- [x] I have added or updated unit tests
- [x] I have added or updated integration tests (if appropriate)
- [x] I have added or updated documentation

### Testing Instructions



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added sorting to the obligations list API (name, FQN, created_at,
updated_at) with ASC/DESC, single-sort-item constraint, and default
ordering created_at DESC (ties by id ASC).

* **Tests**
* Added unit and integration tests covering all sort fields, directions,
multi-namespace FQN ordering, unspecified fallback, and request
validation for max-items.

* **Documentation**
* Updated API docs and table of contents to document sorting and removed
an obsolete request description.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Diego <74568547+dsm20@users.noreply.github.com>
github-merge-queue Bot pushed a commit that referenced this pull request Apr 20, 2026
### Proposed Changes

Resolves DSPX-2691

- Adds strongly-typed sort support to ListRegisteredResources RPC,
following the pattern established in #3223 (ListAttributes), #3255
(ListSubjectMappings), #3272 (ListSubjectConditionSets), #3300
(ListObligations), and the ListKeyAccessServers PR
- Sortable fields: name, created_at, updated_at (ASC/DESC), with
backward-compatible fallback to created_at DESC

### Changes

**Proto** —
`service/policy/registeredresources/registered_resources.proto`
- `SortRegisteredResourcesType` enum (UNSPECIFIED, NAME, CREATED_AT,
UPDATED_AT)
- `RegisteredResourcesSort` message (field + direction)
- `repeated RegisteredResourcesSort sort = 11` on
`ListRegisteredResourcesRequest` with `max_items = 1` constraint
- Regenerated protos and docs

**SQL** — `service/policy/db/queries/registered_resources.sql`
- CASE WHEN sort blocks in `listRegisteredResources` query for 3 fields
(6 blocks total)
- Fallback `r.created_at DESC`

**Go** — `service/policy/db/utils.go` +
`service/policy/db/registered_resources.go`
- `GetRegisteredResourcesSortParams()`: maps enum to SQL-compatible
field/direction strings
- `ListRegisteredResources` handler wired to call mapper and pass params
to sqlc query
- No new constants needed — `sortFieldName`, `sortFieldCreatedAt`,
`sortFieldUpdatedAt` already exist

**Tests**
- 11 unit tests for the enum mapper helper (nil, empty, unspecified,
each field + direction, unspecified direction default)
- 7 integration tests (name ASC/DESC, created_at ASC/DESC, updated_at
ASC/DESC, unspecified fallback) using
`createSortTestRegisteredResources` and
`createNamedSortTestRegisteredResources` suite helpers
- Protovalidate sort constraint test
(`TestListRegisteredResourcesRequest_Sort`)

### Notes

- otdfctl `--sort` flag deferred to a follow-up, consistent with #3192,
#3223, #3255, #3272, and #3300
- Tie-breaker (`r.id ASC`) deferred to a follow-up refactoring ticket

### Checklist

- [x] I have added or updated unit tests
- [x] I have added or updated integration tests (if appropriate)
- [x] I have added or updated documentation

### Testing Instructions



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

## Release Notes

* **New Features**
* Added sorting functionality to registered resources lists. Sort by
name, creation date, or update date in ascending or descending order.
Defaults to creation date (descending) when not specified.

* **Documentation**
* Updated API documentation with new sorting options and default
ordering behavior.

* **Tests**
* Added integration and unit tests covering all sorting configurations.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
JBCongdon pushed a commit to JBCongdon/platform that referenced this pull request May 24, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.14.0](opentdf/platform@service/v0.13.0...service/v0.14.0)
(2026-04-21)


### ⚠ BREAKING CHANGES

* **sdk:** reclassify KAS 400 errors — distinguish tamper from
misconfiguration
([opentdf#3166](opentdf#3166))
* **policy:** optional namespace for RRs
([opentdf#3165](opentdf#3165))
* **policy:** Namespace subject mappings and subject condition sets.
([opentdf#3143](opentdf#3143))
* **policy:** Optional namespace on actions protos, NamespacedPolicy
feature flag ([opentdf#3155](opentdf#3155))
* **policy:** add namespaced actions schema and namespace-aware action
queries ([opentdf#3154](opentdf#3154))
* **policy:** only require namespace on GetAction if no id provided
([opentdf#3144](opentdf#3144))
* **policy:** add namespace field to Actions proto
([opentdf#3130](opentdf#3130))
* **policy:** namespace Registered Resources
([opentdf#3111](opentdf#3111))
* **policy:** add namespace field to RegisteredResource proto
([opentdf#3110](opentdf#3110))

### Features

* **authz:** Namespaced policy in decisioning
([opentdf#3226](opentdf#3226))
([0355934](opentdf@0355934))
* **cli:** migrate otdfctl into platform monorepo
([opentdf#3205](opentdf#3205))
([5177bec](opentdf@5177bec))
* fix tracing ([opentdf#3242](opentdf#3242))
([57e5680](opentdf@57e5680))
* **policy:** add GetObligationTrigger RPC
([opentdf#3318](opentdf#3318))
([d68e39d](opentdf@d68e39d))
* **policy:** add namespace field to Actions proto
([opentdf#3130](opentdf#3130))
([bedc9b3](opentdf@bedc9b3))
* **policy:** add namespace field to RegisteredResource proto
([opentdf#3110](opentdf#3110))
([04fd85d](opentdf@04fd85d))
* **policy:** add namespaced actions schema and namespace-aware action
queries ([opentdf#3154](opentdf#3154))
([c0443f1](opentdf@c0443f1))
* **policy:** add sort ListSubjectMappings API
([opentdf#3255](opentdf#3255))
([9d5d757](opentdf@9d5d757))
* **policy:** Add sort support listregisteredresources api
([opentdf#3312](opentdf#3312))
([91a3ff3](opentdf@91a3ff3))
* **policy:** add sort support to ListAttributes API
([opentdf#3223](opentdf#3223))
([ec3312f](opentdf@ec3312f))
* **policy:** add sort support to ListKeyAccessServer
([opentdf#3287](opentdf#3287))
([7fae2d7](opentdf@7fae2d7))
* **policy:** Add sort support to ListNamespaces API
([opentdf#3192](opentdf#3192))
([aac86cd](opentdf@aac86cd))
* **policy:** add sort support to listobligations api
([opentdf#3300](opentdf#3300))
([9221cac](opentdf@9221cac))
* **policy:** add sort support to ListSubjectConditionSets API
([opentdf#3272](opentdf#3272))
([9010f12](opentdf@9010f12))
* **policy:** add SortField proto and update PageRequest for sort
support ([opentdf#3187](opentdf#3187))
([6cf1862](opentdf@6cf1862))
* **policy:** Enforce same namespace when actions referenced downstream
([opentdf#3206](opentdf#3206))
([4b5463a](opentdf@4b5463a))
* **policy:** namespace Registered Resources
([opentdf#3111](opentdf#3111))
([6db1883](opentdf@6db1883))
* **policy:** Namespace subject mappings and condition sets
([opentdf#3172](opentdf#3172))
([6deed50](opentdf@6deed50))
* **policy:** Namespace subject mappings and subject condition sets.
([opentdf#3143](opentdf#3143))
([3006780](opentdf@3006780))
* **policy:** optional namespace for RRs
([opentdf#3165](opentdf#3165))
([8948018](opentdf@8948018))
* **policy:** rollback migration strategy for namespaced actions
([opentdf#3235](opentdf#3235))
([f7e5e01](opentdf@f7e5e01))
* **policy:** Seed existing namespaces with standard actions
([opentdf#3228](opentdf#3228))
([12136b0](opentdf@12136b0))
* **policy:** Seed namespaces with standard actions on creation +
namespaced actions for obligation triggers
([opentdf#3161](opentdf#3161))
([984d76b](opentdf@984d76b))


### Bug Fixes

* **ci:** Upgrade toolchain version to 1.25.8
([opentdf#3116](opentdf#3116))
([e1b7882](opentdf@e1b7882))
* **core:** do not concat slashes directly in url/file paths
([opentdf#3290](opentdf#3290))
([114c2a7](opentdf@114c2a7))
* **deps:** bump github.com/jackc/pgx/v5 from 5.7.5 to 5.9.0 in /service
([opentdf#3316](opentdf#3316))
([017362e](opentdf@017362e))
* **deps:** bump github.com/opentdf/platform/lib/identifier from 0.2.0
to 0.3.0 in /service
([opentdf#3162](opentdf#3162))
([8bc5dcd](opentdf@8bc5dcd))
* **deps:** bump github.com/opentdf/platform/protocol/go from 0.16.0 to
0.17.0 in /service
([opentdf#3125](opentdf#3125))
([29fec61](opentdf@29fec61))
* **deps:** bump github.com/opentdf/platform/protocol/go from 0.17.0 to
0.21.0 in /service
([opentdf#3220](opentdf#3220))
([e63add2](opentdf@e63add2))
* **deps:** bump github.com/opentdf/platform/protocol/go from 0.21.0 to
0.22.0 in /service
([opentdf#3248](opentdf#3248))
([1ebce73](opentdf@1ebce73))
* **deps:** bump github.com/opentdf/platform/protocol/go from 0.22.0 to
0.23.0 in /service
([opentdf#3271](opentdf#3271))
([3338b8e](opentdf@3338b8e))
* **deps:** bump github.com/opentdf/platform/protocol/go from 0.23.0 to
0.24.0 in /service
([opentdf#3321](opentdf#3321))
([78e6022](opentdf@78e6022))
* **deps:** bump github.com/opentdf/platform/protocol/go from 0.24.0 to
0.25.0 in /service
([opentdf#3333](opentdf#3333))
([3940bf8](opentdf@3940bf8))
* **deps:** bump github.com/opentdf/platform/sdk from 0.13.0 to 0.16.0
in /service ([opentdf#3356](opentdf#3356))
([5617077](opentdf@5617077))
* **deps:** bump
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp from
1.42.0 to 1.43.0 in /service
([opentdf#3282](opentdf#3282))
([046374a](opentdf@046374a))
* **deps:** bump go.opentelemetry.io/otel/sdk from 1.42.0 to 1.43.0 in
/service ([opentdf#3281](opentdf#3281))
([56b33f2](opentdf@56b33f2))
* **deps:** bump google.golang.org/grpc from 1.77.0 to 1.79.3 in
/service ([opentdf#3176](opentdf#3176))
([3289502](opentdf@3289502))
* **deps:** remove direct github.com/docker/docker dependency
([opentdf#3229](opentdf#3229))
([2becb27](opentdf@2becb27))
* **deps:** upgrade testcontainers-go to resolve vulns
([opentdf#3299](opentdf#3299))
([72c6f9b](opentdf@72c6f9b))
* **ers:** include standard JWT claims in claims mode entity resolution
([opentdf#3196](opentdf#3196))
([6d50da1](opentdf@6d50da1))
* **ers:** ldap multi-strategy ers
([opentdf#3117](opentdf#3117))
([d3aaf1a](opentdf@d3aaf1a))
* **policy:** deprecate ListAttributeValues in favor of existing
GetAttribute ([opentdf#3108](opentdf#3108))
([7e17c2d](opentdf@7e17c2d))
* **policy:** make obligation trigger uniqueness client-aware
([opentdf#3114](opentdf#3114))
([9265bc3](opentdf@9265bc3))
* **policy:** omit empty attribute values from create responses
([opentdf#3193](opentdf#3193))
([d298378](opentdf@d298378))
* **policy:** only require namespace on GetAction if no id provided
([opentdf#3144](opentdf#3144))
([10d0c0f](opentdf@10d0c0f))
* **policy:** Optional namespace on actions protos, NamespacedPolicy
feature flag ([opentdf#3155](opentdf#3155))
([c20f039](opentdf@c20f039))
* **policy:** order List* results by created_at
([opentdf#3088](opentdf#3088))
([ea90ac2](opentdf@ea90ac2))
* **sdk:** normalize issuer URL before OIDC discovery
([opentdf#3261](opentdf#3261))
([61f98c9](opentdf@61f98c9))
* **sdk:** reclassify KAS 400 errors — distinguish tamper from
misconfiguration
([opentdf#3166](opentdf#3166))
([f04a385](opentdf@f04a385))
* **sdk:** remove testcontainers from consumer dependency graph
([opentdf#3129](opentdf#3129))
([f17dcdd](opentdf@f17dcdd))

---
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>
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) size/m

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants