Skip to content

fix(authz): use standard Keycloak token exchange#3754

Open
jp-ayyappan wants to merge 10 commits into
mainfrom
DSPX-3636-standard-token-exchange
Open

fix(authz): use standard Keycloak token exchange#3754
jp-ayyappan wants to merge 10 commits into
mainfrom
DSPX-3636-standard-token-exchange

Conversation

@jp-ayyappan

@jp-ayyappan jp-ayyappan commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Upgrade local/test standard Keycloak runtime paths to ghcr.io/opentdf/keycloak-standard:26.4.0, including docker-compose.yaml, OAuth testcontainers, and ERS Keycloak integration tests.
  • Provision standard Keycloak token exchange by enabling standard.token.exchange.enabled on requester clients and adding a target-client audience mapper for exchanged tokens.
  • Keep the custom OpenTDF Keycloak image only for the certificate-exchange/mTLS test path that still needs the custom providers.
  • Update BDD encryption setup to use direct password-grant user tokens instead of admin impersonation token exchange.
  • Split OAuth integration coverage for standard Keycloak and certificate-exchange Keycloak, including a negative DPoP-bound token test.
  • Update ERS Keycloak setup for KC26 by enabling unmanaged user attributes in the test realm.
  • Document the updated token_exchanges fixture behavior and bump the workspace toolchain to go1.25.11 for current govulncheck coverage.

Testing

  • go test ./lib/fixtures -run 'TestWith|TestDefaultProtocolMappers|TestExactClient' -count=1
  • DOCKER_HOST=unix://$HOME/.colima/default/docker.sock TESTCONTAINERS_RYUK_DISABLED=true GOWORK=off go test ./oauth -count=1 -v from test/integration
  • DOCKER_HOST=unix://$HOME/.colima/default/docker.sock TESTCONTAINERS_RYUK_DISABLED=true go test ./service/entityresolution/integration -run "TestKeycloak(UserAttributeSubjectMapping|EntityResolutionV2)$" -count=1 -v
  • Earlier validation on this branch:
    • go test ./... from tests-bdd
    • GOWORK=off go test -run '^$' ./... from test/integration/oauth
    • Compose smoke with local env port overrides, using the committed compose file image reference and no committed port changes.

Related

  • DSPX-3636
  • Supports virtru-corp/data-security-platform#3450
  • Supports virtru-corp/dsp-bundle#275

Summary by CodeRabbit

  • New Features

    • Added support for standard Keycloak token exchange and updated provisioning guidance.
    • Added separate certificate-exchange and DPoP authentication test coverage.
    • BDD encryption and decryption scenarios now obtain user access tokens directly.
  • Bug Fixes

    • Improved Keycloak client matching and audience configuration.
    • Prevented subject-token scopes from leaking during token exchange.
    • Improved reliability of container startup downloads with retries and error handling.

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@jp-ayyappan, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 38 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

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

How do review 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 refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 239c9e70-dd19-427f-adc9-4f2b502d4538

📥 Commits

Reviewing files that changed from the base of the PR and between 370e01a and 6009756.

📒 Files selected for processing (4)
  • lib/fixtures/keycloak.go
  • lib/fixtures/keycloak_test.go
  • service/entityresolution/integration/keycloak_test.go
  • test/integration/oauth/oauth_test.go
📝 Walkthrough

Walkthrough

Keycloak is upgraded to 26.4.0 with revised bootstrap variables. Fixture provisioning enables standard token exchange, OAuth tests separate standard and certificate-exchange environments, entity-resolution setup enables unmanaged attributes, and BDD encryption flows use password-grant tokens.

Changes

Keycloak token exchange

Layer / File(s) Summary
Keycloak 26.4 runtime alignment
docker-compose.yaml, test/start-up-with-containers/action.yaml
Keycloak uses the 26.4.0 image and bootstrap variables; startup downloads gain retries and the DPoP overlay is removed.
Standard token exchange provisioning
lib/fixtures/keycloak.go, lib/fixtures/keycloak_test.go, service/README.md
Requester clients receive standard token-exchange and audience-mapper configuration, fixture options control DPoP and certificate-exchange setup, and the behavior is tested and documented.
OAuth suite and container separation
test/integration/oauth/oauth_test.go
Standard OAuth and HTTPS certificate-exchange tests use separate suites and shared container startup, with coverage for missing DPoP proofs and exchanged-token scopes.
BDD password-grant acquisition
tests-bdd/cukes/resources/keycloak_base.template, tests-bdd/cukes/steps_encryption.go
BDD fixtures enable direct grants, and encryption steps obtain user tokens through the password grant instead of admin impersonation exchange.
Entity-resolution realm setup
service/entityresolution/integration/keycloak_test.go
The integration realm uses the standard Keycloak image and enables unmanaged user attributes through the realm user-profile API.

Estimated code review effort: 3 (Moderate) | ~30 minutes

Sequence Diagram(s)

sequenceDiagram
  participant OAuthSuite
  participant KeycloakContainer
  participant KeycloakTokenEndpoint
  OAuthSuite->>KeycloakContainer: start standard or certificate-exchange image
  KeycloakContainer-->>OAuthSuite: expose HTTP or HTTPS token endpoint
  OAuthSuite->>KeycloakTokenEndpoint: request access token
  KeycloakTokenEndpoint-->>OAuthSuite: return token or reject missing DPoP proof
Loading

Possibly related PRs

  • opentdf/platform#3373: Directly overlaps with the BDD token-exchange and impersonation flow replaced here.

Suggested labels: comp:authorization, comp:sdk, docs

Suggested reviewers: dmihalcik-virtru

Poem

I’m a rabbit hopping through the keys,
Standard exchanges rustle the trees.
DPoP proofs guard the token door,
Password grants help BDD explore.
Keycloak blooms a little more!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.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
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: switching to standard Keycloak token exchange.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch DSPX-3636-standard-token-exchange

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 modernizes the Keycloak token exchange implementation by moving away from complex, legacy management-permission setups in favor of the standard Keycloak token exchange mechanism. Additionally, it upgrades the development and testing Keycloak images to version 26.2, cleans up environment configuration, and updates documentation to reflect the new provisioning approach.

Highlights

  • Keycloak Token Exchange Modernization: Migrated from legacy client management-permissions to standard Keycloak token exchange by enabling the 'standard.token.exchange.enabled' attribute on requester clients.
  • Keycloak Version Upgrade: Updated local and DPoP-related Keycloak environments to version 26.2 and removed deprecated preview feature flags.
  • Configuration Updates: Updated environment variables to use the modern 'KC_BOOTSTRAP_ADMIN' naming convention for Keycloak administrative credentials.
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 legacy path we leave behind, A standard way we now shall find. With Keycloak bumped to twenty-six, We've fixed the tokens in the mix.

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 upgrades Keycloak from version 25.0 to 26.2 across docker-compose, integration tests, and CI actions. It also simplifies the token exchange configuration by enabling the standard token exchange attribute directly on the requester client instead of creating complex fine-grained admin permissions and policies. A critical feedback point was raised regarding the retrieval of the requester client: Keycloak's GetClients API can return multiple clients if the ID is a prefix of another, so relying on the first element of the returned slice could lead to non-deterministic behavior. A code suggestion is provided to iterate and find the exact match.

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 lib/fixtures/keycloak.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 193.706618ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

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

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 454.706137ms
Throughput 219.92 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 53.620642959s
Average Latency 534.337762ms
Throughput 93.25 requests/second

@jp-ayyappan jp-ayyappan changed the title DSPX-3636 use standard Keycloak token exchange fix(authz): use standard Keycloak token exchange Jul 17, 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 210.496559ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

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

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 425.887497ms
Throughput 234.80 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 49.272363121s
Average Latency 490.730245ms
Throughput 101.48 requests/second

Comment thread tests-bdd/cukes/steps_encryption.go Outdated
@github-actions

Copy link
Copy Markdown
Contributor

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

Benchmark authorization.v2.GetMultiResourceDecision Results:

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

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 440.739412ms
Throughput 226.89 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 53.928209479s
Average Latency 537.366948ms
Throughput 92.72 requests/second

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

Caution

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

⚠️ Outside diff range comments (1)
lib/fixtures/keycloak.go (1)

1133-1145: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Consider removing the obsolete targetClientID parameter.

The standard token exchange flow simplifies configuration by universally enabling exchange for the requester client via the standard.token.exchange.enabled attribute, eliminating the need for target-specific policies.

Retaining targetClientID as a parameter and logging it implies that the token exchange is restricted to that target, which is misleading. Consider removing this parameter from createTokenExchange and createTokenExchangeWithTokenManager to prevent confusion and avoid redundant idempotent calls if multiple targets are assumed.

♻️ Proposed refactor

Update the function signatures and internal logic:

-func createTokenExchange(ctx context.Context, connectParams *KeycloakConnectParams, startClientID string, targetClientID string) error {
+func createTokenExchange(ctx context.Context, connectParams *KeycloakConnectParams, startClientID string) error {
 	// Create TokenManager and delegate to TokenManager version
 	tm, err := NewTokenManager(ctx, connectParams, nil)
 	if err != nil {
 		return fmt.Errorf("failed to create token manager: %w", err)
 	}
-	return createTokenExchangeWithTokenManager(ctx, connectParams, tm, startClientID, targetClientID)
+	return createTokenExchangeWithTokenManager(ctx, connectParams, tm, startClientID)
 }

-func createTokenExchangeWithTokenManager(ctx context.Context, connectParams *KeycloakConnectParams, tm *TokenManager, startClientID string, targetClientID string) error {
+func createTokenExchangeWithTokenManager(ctx context.Context, connectParams *KeycloakConnectParams, tm *TokenManager, startClientID string) error {
...
-	if err := client.UpdateClient(ctx, token.AccessToken, connectParams.Realm, requesterClient); err != nil {
-		return fmt.Errorf("error enabling standard token exchange for requester client %q targeting %q: %w", startClientID, targetClientID, err)
-	}
+	if err := client.UpdateClient(ctx, token.AccessToken, connectParams.Realm, requesterClient); err != nil {
+		return fmt.Errorf("error enabling standard token exchange for requester client %q: %w", startClientID, err)
+	}

-	slog.Info("enabled standard token exchange for client",
-		slog.String("requester_client_id", startClientID),
-		slog.String("target_client_id", targetClientID))
+	slog.Info("enabled standard token exchange for client",
+		slog.String("requester_client_id", startClientID))
 
 	return nil
 }

And update the call site (around line 383):

-	// Create token exchange opentdf->opentdf sdk
-	if err := createTokenExchange(ctx, &kcConnectParams, opentdfClientID, opentdfSdkClientID); err != nil {
+	// Enable standard token exchange for opentdf client
+	if err := createTokenExchange(ctx, &kcConnectParams, opentdfClientID); err != nil {
 		return err
 	}
🤖 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 `@lib/fixtures/keycloak.go` around lines 1133 - 1145, Remove the obsolete
targetClientID parameter from createTokenExchange and
createTokenExchangeWithTokenManager, then update all call sites accordingly.
Remove target-specific wording and fields from the standard token exchange
update error and slog.Info messages, while preserving universal enabling via
withStandardTokenExchangeEnabled for the requester client.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@test/integration/oauth/oauth_test.go`:
- Around line 661-677: In the Keycloak container setup, simplify the
TESTCONTAINERS_PODMAN-based providerType assignment without changing its
Docker/Podman behavior, and replace the manual err check with require.NoError
using the file’s existing testing conventions.
- Line 218: Update the request construction in the OAuth test to use
http.NewRequestWithContext instead of http.NewRequest, passing the appropriate
test context while preserving the existing POST method, endpoint, and form body.

In `@tests-bdd/cukes/steps_encryption.go`:
- Around line 23-25: Add the appropriate //nolint:gosec suppression to the
hardcoded test credential constants userTokenClientSecret and bddUserPassword,
while preserving the existing userTokenClientID declaration and its suppression.

---

Outside diff comments:
In `@lib/fixtures/keycloak.go`:
- Around line 1133-1145: Remove the obsolete targetClientID parameter from
createTokenExchange and createTokenExchangeWithTokenManager, then update all
call sites accordingly. Remove target-specific wording and fields from the
standard token exchange update error and slog.Info messages, while preserving
universal enabling via withStandardTokenExchangeEnabled for the requester
client.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: b9cdeb37-6637-418f-9c3c-f42f7850bb89

📥 Commits

Reviewing files that changed from the base of the PR and between 699cc1e and 11fc8f0.

📒 Files selected for processing (7)
  • docker-compose.yaml
  • lib/fixtures/keycloak.go
  • lib/fixtures/keycloak_test.go
  • test/integration/oauth/oauth_test.go
  • test/start-up-with-containers/action.yaml
  • tests-bdd/cukes/resources/keycloak_base.template
  • tests-bdd/cukes/steps_encryption.go

Comment thread test/integration/oauth/oauth_test.go Outdated
Comment thread test/integration/oauth/oauth_test.go Outdated
Comment thread tests-bdd/cukes/steps_encryption.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 372.654915ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

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

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 507.60025ms
Throughput 197.01 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 48.929629754s
Average Latency 487.290401ms
Throughput 102.19 requests/second

accessTokenType = "urn:ietf:params:oauth:token-type:access_token" //nolint:gosec // URN identifier, not a credential
userTokenClientID = "opentdf-sdk" //nolint:gosec // Test credential.
userTokenClientSecret = "secret" //nolint:gosec // Test credential.
bddUserPassword = "testuser123"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

add //nolint:gosec // Test credential.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

sec lint seems to have passed even without this; the bdd tests were failing with this comment in place though

pflynn-virtru
pflynn-virtru previously approved these changes Jul 20, 2026

@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

Caution

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

⚠️ Outside diff range comments (1)
service/entityresolution/integration/keycloak_test.go (1)

181-182: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Update admin bootstrap environment variables for Keycloak 26.

The PR objective mentions updating to Keycloak 26 bootstrap environment variables, but this container configuration still uses the legacy variables. Keycloak 26 replaces KEYCLOAK_ADMIN and KEYCLOAK_ADMIN_PASSWORD with KC_BOOTSTRAP_ADMIN_USERNAME and KC_BOOTSTRAP_ADMIN_PASSWORD. The container may fail to create the test admin user if the legacy variables are ignored.

🐛 Proposed fix
-			"KEYCLOAK_ADMIN":          a.config.AdminUser,
-			"KEYCLOAK_ADMIN_PASSWORD": a.config.AdminPass,
+			"KC_BOOTSTRAP_ADMIN_USERNAME": a.config.AdminUser,
+			"KC_BOOTSTRAP_ADMIN_PASSWORD": a.config.AdminPass,
🤖 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 `@service/entityresolution/integration/keycloak_test.go` around lines 181 -
182, Update the container environment map in the Keycloak test setup to replace
KEYCLOAK_ADMIN and KEYCLOAK_ADMIN_PASSWORD with KC_BOOTSTRAP_ADMIN_USERNAME and
KC_BOOTSTRAP_ADMIN_PASSWORD, preserving the existing a.config.AdminUser and
a.config.AdminPass values.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@service/entityresolution/integration/keycloak_test.go`:
- Line 302: Update the json.Unmarshal call in the realm user profile response
test to pass realmUserProfileResp.Body() directly instead of converting the
response body to a string and back to []byte; leave the surrounding upConfig
parsing and error handling unchanged.

---

Outside diff comments:
In `@service/entityresolution/integration/keycloak_test.go`:
- Around line 181-182: Update the container environment map in the Keycloak test
setup to replace KEYCLOAK_ADMIN and KEYCLOAK_ADMIN_PASSWORD with
KC_BOOTSTRAP_ADMIN_USERNAME and KC_BOOTSTRAP_ADMIN_PASSWORD, preserving the
existing a.config.AdminUser and a.config.AdminPass values.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: c185b9eb-6ce7-472f-a03d-945fea7c7710

📥 Commits

Reviewing files that changed from the base of the PR and between 0c86cd4 and 370e01a.

📒 Files selected for processing (5)
  • docker-compose.yaml
  • lib/fixtures/keycloak.go
  • lib/fixtures/keycloak_test.go
  • service/entityresolution/integration/keycloak_test.go
  • test/integration/oauth/oauth_test.go

Comment thread service/entityresolution/integration/keycloak_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 217.257836ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

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

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 418.305668ms
Throughput 239.06 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 52.90515226s
Average Latency 527.459297ms
Throughput 94.51 requests/second

@github-actions

Copy link
Copy Markdown
Contributor
Benchmark results, click to expand

Benchmark authorization.GetDecisions Results:

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

Benchmark authorization.v2.GetMultiResourceDecision Results:

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

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 276.021918ms
Throughput 362.29 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 32.279122314s
Average Latency 322.087422ms
Throughput 154.90 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 218.729239ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

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

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 422.590138ms
Throughput 236.64 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 51.229033918s
Average Latency 510.269448ms
Throughput 97.60 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants