Skip to content

fix(authz): scope uncached dynamic mappings to resource definitions - #4194

Merged
strantalis merged 2 commits into
codex/authz-uncached/policy-readfrom
codex/authz-uncached/dynamic-decisions
Oct 8, 2026
Merged

strantalis merged 2 commits into
codex/authz-uncached/policy-readfrom
codex/authz-uncached/dynamic-decisions

Conversation

@strantalis

@strantalis strantalis commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

Proposed Changes

With caching disabled, use dynamic mappings from the targeted policy read for the definitions referenced by a decision. Remove the full dynamic-mapping, attribute, and subject-mapping scans from this decision path. The PDP configuration controls evaluation, including when mappings are present but the feature is disabled.

Cached decisions and entitlement enumeration retain full-policy reads. Registered resources and obligations remain outside this optimization.

Testing Instructions

Authorization race tests and changed-code lint pass, including disabled-feature cases, optional gates, inactive values, action/namespace mismatch, and mapping deduplication across batches. The previous rebased stack's CI scale run completed all 800 dynamic requests with zero failures: at concurrency 50, median 165 ms and p95 202 ms. The baseline timed out all 200 requests at that concurrency. These are individual CI runs; the RPC simplification still needs a fresh scale measurement.

@strantalis
strantalis added this pull request to stack #4195 October 7, 2026 15:44
@coderabbitai

coderabbitai Bot commented Oct 7, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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 github-actions Bot added the size/s label Oct 7, 2026
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor
Benchmark results, click to expand

Bulk Benchmark Results

Metric Value
Total Decrypts 100
Successful Decrypts 100
Failed Decrypts 0
Total Time 224.057495ms
Throughput 446.31 requests/second

TDF3 Benchmark Results

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 24.208648468s
Average Latency 241.696716ms
Throughput 206.54 requests/second

@strantalis strantalis changed the title perf(authz): scope uncached dynamic mappings to resource definitions fix(authz): scope uncached dynamic mappings to resource definitions Oct 7, 2026
@strantalis
strantalis force-pushed the codex/authz-uncached/dynamic-decisions branch from 7ac340d to 561f404 Compare October 7, 2026 18:22
@strantalis
strantalis force-pushed the codex/authz-uncached/direct-decisions branch from 6c575d0 to 51bb875 Compare October 7, 2026 18:22
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

X-Test Failure Report

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor
Benchmark results, click to expand

Bulk Benchmark Results

Metric Value
Total Decrypts 100
Successful Decrypts 100
Failed Decrypts 0
Total Time 403.106585ms
Throughput 248.07 requests/second

TDF3 Benchmark Results

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 44.561883s
Average Latency 444.728674ms
Throughput 112.20 requests/second

Signed-off-by: strantalis <strantalis@virtru.com>
Signed-off-by: strantalis <strantalis@virtru.com>
@strantalis
strantalis force-pushed the codex/authz-uncached/direct-decisions branch from 51bb875 to 675bbfc Compare October 7, 2026 19:21
@strantalis
strantalis force-pushed the codex/authz-uncached/dynamic-decisions branch from 561f404 to 5a35419 Compare October 7, 2026 19:21
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

X-Test Failure Report

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor
Benchmark results, click to expand

Bulk Benchmark Results

Metric Value
Total Decrypts 100
Successful Decrypts 100
Failed Decrypts 0
Total Time 235.301502ms
Throughput 424.99 requests/second

TDF3 Benchmark Results

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 26.463278531s
Average Latency 264.056541ms
Throughput 188.94 requests/second

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor
Benchmark results, click to expand

Bulk Benchmark Results

Metric Value
Total Decrypts 100
Successful Decrypts 100
Failed Decrypts 0
Total Time 315.462482ms
Throughput 316.99 requests/second

TDF3 Benchmark Results

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 37.466855156s
Average Latency 373.919765ms
Throughput 133.45 requests/second

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

⚠️ Govulncheck found vulnerabilities ⚠️

The following modules have known vulnerabilities:

  • otdfctl
  • service
  • tests-bdd

See the workflow run for details.

@strantalis
strantalis removed this pull request from stack #4195 October 8, 2026 14:08
Base automatically changed from codex/authz-uncached/direct-decisions to codex/authz-uncached/policy-read October 8, 2026 14:08
@strantalis
strantalis merged commit 5a35419 into codex/authz-uncached/policy-read Oct 8, 2026
69 of 80 checks passed
@strantalis
strantalis deleted the codex/authz-uncached/dynamic-decisions branch October 8, 2026 14:08
@strantalis

Copy link
Copy Markdown
Member Author

This change is now included in #4192. GitHub automatically marked this PR merged into its parent branch during consolidation. #4192 remains the combined PR targeting main and includes the policy read, direct-entitlement and dynamic-mapping optimizations, and their tests.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant