Skip to content

feat(ci): add DPoP nonce-challenge and enforcement inputs to test actions (DSPX-3397)#3667

Open
dmihalcik-virtru wants to merge 3 commits into
mainfrom
DSPX-3397-platform-ci-part-2
Open

feat(ci): add DPoP nonce-challenge and enforcement inputs to test actions (DSPX-3397)#3667
dmihalcik-virtru wants to merge 3 commits into
mainfrom
DSPX-3397-platform-ci-part-2

Conversation

@dmihalcik-virtru

Copy link
Copy Markdown
Member

Summary

Part of DSPX-3397. Adds two independent inputs to the composite test actions so xtest can exercise DPoP end-to-end:

  • dpop-challenge-enabled (default false) → sets server.auth.dpop.require_nonce: true.
  • dpop-enforce-required (default false) → sets server.auth.dpop.enforce: true.

The two are decoupled: enforcement (reject non-DPoP tokens) is separate from the nonce-challenge feature.

Changes

  • test/start-additional-kas/action.yaml and test/start-up-with-containers/action.yaml: new inputs + true/false validation + env wiring.
  • The enforce knob only ever turns enforcement on — it never writes enforce: false (so any base value is preserved): start-additional-kas uses with(select(...)), start-up-with-containers sets it in a step gated on the flag.

Note on dependency

The enforce setting relies on server.auth.dpop.enforce (introduced in #3666). Setting it before that lands is harmless (an older platform ignores the unknown config key), and these actions build the platform from the checked-out ref, so the field is honored within a PR run.

Testing

  • Both action YAMLs validated with yq.
  • Verified: flag off → enforce untouched (no false written); flag on → enforce: true; require_nonce tracks only dpop-challenge-enabled.

The DPoP nonce challenge only applies to DPoP-bound requests; without enforcement
a plain Bearer token bypasses DPoP validation and never sees a challenge. When
dpop-challenge-enabled is set, also set server.auth.dpop.enforce alongside
require_nonce in both start actions.

The flag only ever turns enforcement on: start-additional-kas uses
with(select(...)) so it never writes enforce: false (preserving any base value),
and start-up-with-containers sets it inside the step already gated on the flag.

Signed-off-by: Dave Mihalcik <dmihalcik@virtru.com>
DPoP enforcement and the nonce-challenge flow are separate concerns. Replace the
coupling (where dpop-challenge-enabled also set server.auth.dpop.enforce) with a
dedicated dpop-enforce-required input (default false) that drives enforcement on
its own. dpop-challenge-enabled again sets only require_nonce.

The enforce knob only ever turns enforcement on: start-additional-kas uses
with(select(...)) keyed on DPOP_ENFORCE_REQUIRED, and start-up-with-containers
sets it in a new step gated on the flag, so enforce: false is never written.

Signed-off-by: Dave Mihalcik <dmihalcik@virtru.com>
@dmihalcik-virtru dmihalcik-virtru requested a review from a team as a code owner June 25, 2026 14:10
@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown

Warning

Review limit reached

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

More reviews will be available in 59 minutes and 27 seconds. Learn how PR review limits work.

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

⌛ How to resolve this issue?

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

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

🚦 How do rate limits work?

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

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 2060f3ea-8243-4b5e-8b58-e8d5b6e6dc1e

📥 Commits

Reviewing files that changed from the base of the PR and between 2a7095a and d9fdadd.

📒 Files selected for processing (2)
  • test/start-additional-kas/action.yaml
  • test/start-up-with-containers/action.yaml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch DSPX-3397-platform-ci-part-2

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

❤️ Share

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

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces configuration flexibility to the CI test actions, enabling developers to exercise DPoP (Demonstrating Proof-of-Possession) flows in end-to-end tests. By adding decoupled inputs for nonce-challenge and enforcement, the changes allow for granular control over security settings without modifying the underlying platform code, facilitating more robust testing of authentication features.

Highlights

  • New CI Inputs: Added 'dpop-challenge-enabled' and 'dpop-enforce-required' inputs to composite test actions to support end-to-end DPoP testing.
  • Configuration Wiring: Updated test action scripts to dynamically inject DPoP configuration settings into the platform environment using yq.
  • Input Validation: Implemented strict boolean validation for the new inputs to ensure configuration integrity during test execution.
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 tokens dance with DPoP grace, Security tightened in every place. With flags now set to true or false, The tests perform their steady waltz.

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.

@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 configuration options to enable and enforce DPoP (Demonstrating Proof-of-Possession) in the test actions start-additional-kas and start-up-with-containers. It adds the dpop-challenge-enabled and dpop-enforce-required inputs, validates their values, and updates the configuration files using yq. The feedback suggests modifying the yq command in start-additional-kas/action.yaml to conditionally set require_nonce only when enabled, ensuring consistency and avoiding writing explicit false values to the configuration.

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 on lines +199 to +200
| (.server.auth.dpop.require_nonce = (env(DPOP_CHALLENGE_ENABLED) == "true"))
| with(select(env(DPOP_ENFORCE_REQUIRED) == "true"); .server.auth.dpop.enforce = true)

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.

medium

To maintain consistency with start-up-with-containers/action.yaml and avoid writing explicit false values to the configuration file when the feature is disabled, use with(select(...)) for require_nonce as well. This ensures that the key is only written when enabled, preserving any default or pre-existing values.

            | with(select(env(DPOP_CHALLENGE_ENABLED) == "true"); .server.auth.dpop.require_nonce = true)
            | with(select(env(DPOP_ENFORCE_REQUIRED) == "true"); .server.auth.dpop.enforce = true)

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

Benchmark authorization.v2.GetMultiResourceDecision Results:

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

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 579.871557ms
Throughput 172.45 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 44.709529536s
Average Latency 445.668104ms
Throughput 111.83 requests/second

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Govulncheck found vulnerabilities ⚠️

The following modules have known vulnerabilities:

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

See the workflow run for details.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant