Skip to content

feat(policy): DSPX-2998 optionally namespace resource mappings#3567

Merged
alkalescent merged 4 commits into
mainfrom
DSPX-2998-rm-namespace-service
Jun 17, 2026
Merged

feat(policy): DSPX-2998 optionally namespace resource mappings#3567
alkalescent merged 4 commits into
mainfrom
DSPX-2998-rm-namespace-service

Conversation

@alkalescent

@alkalescent alkalescent commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Proposed Changes

Second PR in the stacked series for DSPX-2998. Implements the service side (AC1 + AC2). Stacked on #3565 (proto) — review/merge that first.

  • Migration adds a nullable namespace_id (FK to attribute_namespaces, ON DELETE CASCADE) + index to resource_mappings.
  • Resolve a mapping's owning namespace from namespace_id / namespace_fqn or its group; a grouped mapping must share its group's namespace (else ErrNamespaceMismatch).
  • Remove the old constraint that forced the mapped attribute value into the group's namespace, so mappings/groups may cross namespaces to the attribute values they map (per the Jira design comment).
  • Hydrate the namespace on get/list responses; add namespace_id / namespace_fqn filters to ListResourceMappings and namespace_fqn to ListResourceMappingGroups.
  • Enforce a namespace on create when namespaced_policy is enabled (namespace_id, namespace_fqn, or group_id satisfies it), matching the RR/Actions/SM pattern.
  • Adds/updates integration tests, including the now-allowed cross-namespace cases.

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

cd service && go test ./integration/ -run TestResourceMappingsSuite (requires Docker for testcontainers).

Related

Summary by CodeRabbit

  • New Features

    • Resource mappings now support namespace ownership and association.
    • Added ability to create, update, and filter resource mappings by namespace identifier or fully-qualified namespace name.
    • Resource mappings can now exist across different namespaces from their associated groups.
  • Chores

    • Added namespace backfill for existing grouped resource mappings.
    • Enforced namespace specification requirement when namespaced policy mode is enabled.

@coderabbitai

coderabbitai Bot commented Jun 4, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: c990d7c0-57d5-43af-87d1-71bdbae994d9

📥 Commits

Reviewing files that changed from the base of the PR and between 7080723 and 60b26a4.

📒 Files selected for processing (9)
  • service/integration/migration_test.go
  • service/integration/resource_mappings_test.go
  • service/policy/db/migrations/20260604000000_add_namespace_to_resource_mappings.sql
  • service/policy/db/migrations/20260605000000_backfill_resource_mapping_namespace.sql
  • service/policy/db/models.go
  • service/policy/db/queries/resource_mapping.sql
  • service/policy/db/resource_mapping.go
  • service/policy/db/resource_mapping.sql.go
  • service/policy/resourcemapping/resource_mapping.go
💤 Files with no reviewable changes (9)
  • service/policy/db/models.go
  • service/integration/migration_test.go
  • service/policy/db/migrations/20260604000000_add_namespace_to_resource_mappings.sql
  • service/policy/db/migrations/20260605000000_backfill_resource_mapping_namespace.sql
  • service/policy/resourcemapping/resource_mapping.go
  • service/integration/resource_mappings_test.go
  • service/policy/db/resource_mapping.go
  • service/policy/db/resource_mapping.sql.go
  • service/policy/db/queries/resource_mapping.sql

📝 Walkthrough

Walkthrough

Two new Goose SQL migrations add a nullable namespace_id FK column to resource_mappings and backfill it from parent groups. All resource mapping SQL queries are updated to project and filter by namespace. The DB layer gains namespace-resolution helpers and group-namespace consistency enforcement. The service handler adds NamespacedPolicy validation. Integration and migration tests cover the new behavior.

Changes

ResourceMapping Namespace Ownership

Layer / File(s) Summary
DB schema: namespace_id column and backfill
service/policy/db/migrations/20260604000000_add_namespace_to_resource_mappings.sql, service/policy/db/migrations/20260605000000_backfill_resource_mapping_namespace.sql, service/policy/db/models.go
Migration 20260604 adds a nullable namespace_id UUID FK column (ON DELETE CASCADE) with an index to resource_mappings. Migration 20260605 backfills namespace_id from the parent group for existing grouped rows (Down is a no-op). ResourceMapping model struct gains the NamespaceID field.
SQL queries: namespace projection and filtering
service/policy/db/queries/resource_mapping.sql
All resource mapping queries updated: listResourceMappingGroups gains a namespace_fqn filter; listResourceMappings, listResourceMappingsByFullyQualifiedGroup, and getResourceMapping gain a namespace JSON projection via LEFT JOINs; createResourceMapping adds $5 namespace_id; updateResourceMapping adds COALESCE conditional update for namespace_id.
sqlc-generated Go: params, row structs, scan lists
service/policy/db/resource_mapping.sql.go
Reflects all query changes: NamespaceID/NamespaceFqn added to params structs, Namespace added to all row structs, updated SQL constants, scan assignments, and query call argument lists for all six affected queries.
DB layer: namespace resolution and mapping construction
service/policy/db/resource_mapping.go
Adds namespaces import and namespace-resolution helpers; introduces ErrNamespaceMismatch group-namespace consistency enforcement; updates Create/Update/List/Get operations to resolve and pass namespace_id; populates policy.Namespace on all returned ResourceMapping objects.
Service handler: NamespacedPolicy enforcement
service/policy/resourcemapping/resource_mapping.go
CreateResourceMapping returns CodeInvalidArgument when NamespacedPolicy is enabled and the request omits all of namespace_id, namespace_fqn, and group_id.
Integration and migration tests
service/integration/resource_mappings_test.go, service/integration/migration_test.go
Replaces cross-namespace mismatch failure tests with success assertions; adds tests for create/update/list via NamespaceId/NamespaceFqn, grouped namespace match/mismatch, listing filters, backfill SQL verification, and isolated namespace test helpers.

Sequence Diagram(s)

sequenceDiagram
  participant Client
  participant Handler as resourcemapping.go
  participant DBLayer as resource_mapping.go
  participant NsResolver as resolveOwningNamespace helper
  participant NamespacesSvc as namespaces package
  participant DB as PostgreSQL

  Client->>Handler: CreateResourceMapping(namespace_fqn, group_id, ...)
  Handler->>Handler: NamespacedPolicy check (reject if no ns/group)
  Handler->>DBLayer: CreateResourceMapping(req)
  DBLayer->>NsResolver: resolveOwningNamespaceForMapping(namespaceFqn, groupId)
  NsResolver->>NamespacesSvc: GetNamespaceByFqn(fqn)
  NamespacesSvc->>DB: SELECT id FROM attribute_namespaces WHERE fqn=?
  DB-->>NsResolver: namespace UUID
  NsResolver->>DB: SELECT namespace_id FROM resource_mapping_groups WHERE id=groupId
  DB-->>NsResolver: group namespace UUID
  NsResolver-->>DBLayer: resolved namespaceID (or ErrNamespaceMismatch)
  DBLayer->>DB: INSERT resource_mappings(..., namespace_id=$5)
  DB-->>DBLayer: row with namespace JSON
  DBLayer-->>Handler: ResourceMapping{Namespace: {...}}
  Handler-->>Client: CreateResourceMappingResponse
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • opentdf/platform#3447: Implements resource mapping group FQNs in the same DB query/response shapes and integration test paths that this PR extends with namespace_id/namespace_fqn ownership.

Suggested reviewers

  • jakedoublev
  • elizabethhealy

Poem

🐇 A namespace for each mapping row,
No more mismatch errors to bestow!
The backfill runs, the groups align,
FQN or UUID — both work fine.
Hops of joy through every test that's green! 🌿

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.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 optional namespace support to resource mappings, directly aligned with the PR's primary objective and DSPX-2998 work.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch DSPX-2998-rm-namespace-service

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

❤️ Share

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

@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 implements optional namespacing for resource mappings, enabling better multi-tenant isolation and management. It allows resource mappings to be explicitly associated with a namespace or inherited from a parent group, while decoupling the mapping's owning namespace from the namespace of the attribute values it maps. These changes include database schema migrations, updated query logic, and enhanced API support for filtering and retrieving namespace information.

Highlights

  • Database Schema Update: Added a nullable namespace_id column to the resource_mappings table with a cascading delete constraint and a corresponding index to support namespace-scoped queries.
  • Namespace Resolution Logic: Implemented logic to resolve and enforce namespace ownership for resource mappings, allowing mappings to cross namespaces to the attribute values they map while ensuring group-based mappings remain consistent with their parent group's namespace.
  • API and Query Enhancements: Updated ListResourceMappings and ListResourceMappingGroups to support filtering by namespace_id and namespace_fqn, and updated response hydration to include namespace details.
  • Namespace Enforcement: Added validation to CreateResourceMapping to enforce namespace requirements when namespaced_policy is enabled.
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.

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 mapping now finds its own home, Across namespaces it's free to roam. With group or with ID, It's clear as can be, No longer in shadows to gloam.

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) size/m labels Jun 4, 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 a nullable namespace_id column to the resource_mappings table, allowing resource mappings to be optionally namespaced independently of the mapped attribute value's namespace. It updates the database schema, models, and SQL queries to support this field, including new filtering capabilities by namespace ID or FQN when listing resource mappings and groups. Additionally, it implements namespace resolution and validation logic during resource mapping creation and updates, and enforces namespace requirements when the NamespacedPolicy configuration is enabled. Feedback on the changes highlights a potential issue in resolveResourceMappingNamespaceID where providing both namespaceID and namespaceFqn in a request results in the FQN being silently ignored without consistency validation.

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/resource_mapping.go
@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor
Benchmark results, click to expand

Benchmark authorization.GetDecisions Results:

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

Benchmark authorization.v2.GetMultiResourceDecision Results:

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

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 421.207475ms
Throughput 237.41 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 43.712507415s
Average Latency 434.966577ms
Throughput 114.38 requests/second

@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor
Benchmark results, click to expand

Benchmark authorization.GetDecisions Results:

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

Benchmark authorization.v2.GetMultiResourceDecision Results:

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

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 401.363132ms
Throughput 249.15 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 45.143871484s
Average Latency 450.043535ms
Throughput 110.76 requests/second

@alkalescent
alkalescent force-pushed the DSPX-2998-rm-namespace-service branch from 6f5d979 to 7080723 Compare June 8, 2026 15:15
alkalescent added a commit that referenced this pull request Jun 8, 2026
- Add --namespace-id and --namespace-fqn to resource-mappings create and
  update, and as filters on resource-mappings list.
- Add --namespace-id and --namespace-fqn filters to resource-mapping-groups
  list.
- Surface the owning namespace in command output.

Stacked on the service PR (#3567).

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

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor
Benchmark results, click to expand

Benchmark authorization.GetDecisions Results:

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

Benchmark authorization.v2.GetMultiResourceDecision Results:

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

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 457.026051ms
Throughput 218.81 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 43.405868438s
Average Latency 431.232158ms
Throughput 115.19 requests/second

@alkalescent
alkalescent force-pushed the DSPX-2998-optional-namespace-resource-mappings branch 2 times, most recently from a8fa30f to b8879a8 Compare June 10, 2026 16:09
Base automatically changed from DSPX-2998-optional-namespace-resource-mappings to main June 10, 2026 20:01
@alkalescent
alkalescent marked this pull request as ready for review June 15, 2026 16:26
@alkalescent
alkalescent requested review from a team as code owners June 15, 2026 16:26

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

Caution

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

⚠️ Outside diff range comments (1)
docs/openapi/policy/resourcemapping/resource_mapping.openapi.yaml (1)

1394-1432: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Document the optional namespace mutual-exclusion contract in OpenAPI.

At Line 1394 (and similarly at Line 1518, Line 1587, Line 1643, and Line 1686), the schemas allow both namespaceId and namespaceFqn simultaneously, but the proto message-level oneof in service/policy/resourcemapping/resource_mapping.proto enforces at-most-one. This creates client/server contract drift (OpenAPI-valid payloads can fail server validation).

Suggested schema pattern for each affected request
 policy.resourcemapping.CreateResourceMappingRequest:
   type: object
+  not:
+    required: [namespaceId, namespaceFqn]
   properties:
     namespaceId:
       type: string
       format: uuid
     namespaceFqn:
       type: string
       minLength: 1
       format: uri

Also applies to: 1518-1532, 1587-1610, 1643-1662, 1686-1728

🤖 Prompt for 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.

In `@docs/openapi/policy/resourcemapping/resource_mapping.openapi.yaml` around
lines 1394 - 1432, The OpenAPI schemas for CreateResourceMappingRequest and
related request types do not enforce the mutual-exclusion constraint between
namespaceId and namespaceFqn that exists in the proto message definition (via
oneof). Update the schema definitions at
docs/openapi/policy/resourcemapping/resource_mapping.openapi.yaml lines
1394-1432 (CreateResourceMappingRequest), 1518-1532, 1587-1610, 1643-1662, and
1686-1728 to use OpenAPI's oneOf pattern to enforce that only one of namespaceId
or namespaceFqn can be provided at a time, ensuring the OpenAPI contract matches
the protobuf oneof constraint and prevents clients from sending invalid payloads
that would fail server validation.
🤖 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.

Outside diff comments:
In `@docs/openapi/policy/resourcemapping/resource_mapping.openapi.yaml`:
- Around line 1394-1432: The OpenAPI schemas for CreateResourceMappingRequest
and related request types do not enforce the mutual-exclusion constraint between
namespaceId and namespaceFqn that exists in the proto message definition (via
oneof). Update the schema definitions at
docs/openapi/policy/resourcemapping/resource_mapping.openapi.yaml lines
1394-1432 (CreateResourceMappingRequest), 1518-1532, 1587-1610, 1643-1662, and
1686-1728 to use OpenAPI's oneOf pattern to enforce that only one of namespaceId
or namespaceFqn can be provided at a time, ensuring the OpenAPI contract matches
the protobuf oneof constraint and prevents clients from sending invalid payloads
that would fail server validation.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 65d44bc1-bb3d-428c-97ec-aa58b9fd822e

📥 Commits

Reviewing files that changed from the base of the PR and between e4a04ed and 7080723.

⛔ Files ignored due to path filters (2)
  • protocol/go/policy/objects.pb.go is excluded by !**/*.pb.go
  • protocol/go/policy/resourcemapping/resource_mapping.pb.go is excluded by !**/*.pb.go
📒 Files selected for processing (21)
  • docs/grpc/index.html
  • docs/openapi/authorization/authorization.openapi.yaml
  • docs/openapi/policy/actions/actions.openapi.yaml
  • docs/openapi/policy/attributes/attributes.openapi.yaml
  • docs/openapi/policy/objects.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/subjectmapping/subject_mapping.openapi.yaml
  • docs/openapi/policy/unsafe/unsafe.openapi.yaml
  • service/integration/resource_mappings_test.go
  • service/policy/db/migrations/20260604000000_add_namespace_to_resource_mappings.sql
  • service/policy/db/migrations/20260605000000_backfill_resource_mapping_namespace.sql
  • service/policy/db/models.go
  • service/policy/db/queries/resource_mapping.sql
  • service/policy/db/resource_mapping.go
  • service/policy/db/resource_mapping.sql.go
  • service/policy/objects.proto
  • service/policy/resourcemapping/resource_mapping.go
  • service/policy/resourcemapping/resource_mapping.proto
  • service/policy/resourcemapping/resource_mapping_test.go

Implement the service side of optional namespacing for resource mappings:

- Add a migration adding a nullable namespace_id (FK to attribute_namespaces,
  ON DELETE CASCADE) plus an index to resource_mappings.
- Resolve a mapping's owning namespace from namespace_id/namespace_fqn or its
  group; a grouped mapping must share the group's namespace.
- Remove the constraint forcing the mapped attribute value into the group's
  namespace, allowing mappings to cross namespaces to the values they map.
- Hydrate the namespace on get/list responses and add namespace_id/namespace_fqn
  filters to ListResourceMappings, plus namespace_fqn to ListResourceMappingGroups.
- Enforce a namespace on create when namespaced_policy is enabled (namespace_id,
  namespace_fqn, or group_id satisfies it).
- Update/extend integration tests for the new behavior.

Stacked on the proto PR (#3565).

Signed-off-by: Krish Suchak <suchak.krish@gmail.com>
Add a migration that backfills resource_mappings.namespace_id from the owning
group for existing grouped mappings created before the column existed, so
namespace filtering works on legacy data. Ungrouped mappings remain global.
Idempotent (only fills NULL rows). Adds an integration test for the backfill.

Signed-off-by: Krish Suchak <suchak.krish@gmail.com>
Wire the new namespace_fqn option for resource mapping groups: extract a
resolveNamespaceID helper (id or fqn -> namespace UUID) and use it in
CreateResourceMappingGroup and UpdateResourceMappingGroup. Add integration
tests for creating and updating a group by namespace FQN.

Signed-off-by: Krish Suchak <suchak.krish@gmail.com>
@alkalescent
alkalescent force-pushed the DSPX-2998-rm-namespace-service branch from 7080723 to 011c840 Compare June 15, 2026 17:02
@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.494958ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

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

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.109405ms
Throughput 242.65 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 44.617862517s
Average Latency 444.303705ms
Throughput 112.06 requests/second

Comment thread service/integration/resource_mappings_test.go Outdated
Comment thread service/integration/resource_mappings_test.go Outdated
…igration suite

- ListResourceMappings namespace filter tests now create mappings in two
  namespaces and assert only the filtered namespace's mapping is returned.
- Move the backfill test into migration_test.go's goose harness as
  TestMigrationData_ResourceMappingNamespaceBackfill, exercising the real
  20260605000000 migration (grouped mapping backfilled from its group,
  ungrouped mapping stays global).

Addresses review feedback from c-r33d.

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

Benchmark authorization.v2.GetMultiResourceDecision Results:

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

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 431.489182ms
Throughput 231.76 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 43.300272233s
Average Latency 431.260267ms
Throughput 115.47 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 enabled auto-merge June 17, 2026 14:45
@alkalescent
alkalescent added this pull request to the merge queue Jun 17, 2026
Merged via the queue into main with commit 2b6d54c Jun 17, 2026
40 checks passed
@alkalescent
alkalescent deleted the DSPX-2998-rm-namespace-service branch June 17, 2026 15:01
alkalescent added a commit that referenced this pull request Jun 17, 2026
- Add --namespace-id and --namespace-fqn to resource-mappings create and
  update, and as filters on resource-mappings list.
- Add --namespace-id and --namespace-fqn filters to resource-mapping-groups
  list.
- Surface the owning namespace in command output.

Stacked on the service PR (#3567).

Signed-off-by: Krish Suchak <suchak.krish@gmail.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