Skip to content

Fix/keycloak logout - #520

Merged
rolandpickl merged 4 commits into
mainfrom
fix/keycloak-logout
Jun 4, 2026
Merged

Fix/keycloak logout#520
rolandpickl merged 4 commits into
mainfrom
fix/keycloak-logout

Conversation

@rolandpickl

@rolandpickl rolandpickl commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

Logout with keycloak led to an 401 error page. This is fixed, now logout leads back to the keycloak login page

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📝 Documentation update
  • ♻️ Refactoring (no functional changes)
  • 🔧 Chore (dependency updates, CI changes, etc.)

Related Issue

Closes #

Changes Made

  • fix in auth-provider.tsx in manger

How to Test

  1. start eddi with keycloak
  2. login
  3. logout

Checklist

  • My code follows the project's code style
  • I have added tests that prove my fix/feature works
  • Existing tests pass locally (./mvnw clean verify -DskipITs)
  • I have updated documentation if needed
  • My commit messages follow conventional commits
  • I have not committed any secrets, API keys, or tokens
  • This PR has a clear, focused scope (one concern per PR)

Summary by CodeRabbit

  • Chores
    • Updated Keycloak realm authentication configuration to enable proper post-logout redirect URI handling for improved security workflows and user experience
    • Regenerated frontend editor asset bundles and language syntax support modules with optimized internal dependencies, including enhanced support for JavaScript, TypeScript, HTML, JSON, Python, YAML, XML, Liquid, Handlebars, Razor, and MDX language features

rolandpickl and others added 4 commits June 4, 2026 17:01
Keycloak 18+ separates 'Valid Post Logout Redirect URIs' from 'Valid Redirect
URIs'. Without an explicit 'post.logout.redirect.uris' attribute, Keycloak 26
may reject or silently ignore the post_logout_redirect_uri in the logout
request. Setting it to '+' (inherit from redirectUris) ensures
http://localhost:7070 is accepted as a valid post-logout redirect target and
the browser is properly redirected after session termination.

Co-authored-by: Cursor <cursoragent@cursor.com>
@rolandpickl
rolandpickl requested a review from ginccc as a code owner June 4, 2026 15:40
@coderabbitai

coderabbitai Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The PR updates Keycloak configuration to enable post-logout redirect URIs for the eddi-frontend client, and regenerates frontend language syntax-highlighting bundles with updated module import paths pointing to newly hashed asset chunks.

Changes

Keycloak Post-Logout Configuration

Layer / File(s) Summary
Post-logout redirect URIs setup
keycloak/eddi-realm.json
The eddi-frontend client receives a new attributes block with post.logout.redirect.uris set to "+" to enable post-logout redirect behavior.

Frontend Asset Bundle Regeneration

Layer / File(s) Summary
Language bundles and dependency regeneration
src/main/resources/META-INF/resources/manage.html, src/main/resources/META-INF/resources/assets/cssMode-CRRdssKx.js, src/main/resources/META-INF/resources/assets/htmlMode-FnQ1MKvn.js, src/main/resources/META-INF/resources/assets/jsonMode-BrbWbOAE.js, src/main/resources/META-INF/resources/assets/tsMode-B9PvQzQZ.js, src/main/resources/META-INF/resources/assets/lspLanguageFeatures-CWMiI3_8.js, src/main/resources/META-INF/resources/assets/freemarker2-DqDWCtuK.js, src/main/resources/META-INF/resources/assets/handlebars-B6GL_0Gw.js, src/main/resources/META-INF/resources/assets/html-z1CojlRt.js, src/main/resources/META-INF/resources/assets/mdx-Cjguuzo_.js, src/main/resources/META-INF/resources/assets/liquid-C_tKVlev.js, src/main/resources/META-INF/resources/assets/python-nn_VEFur.js, src/main/resources/META-INF/resources/assets/razor-BRw03YNd.js, src/main/resources/META-INF/resources/assets/typescript-D1IyJ0Mn.js, src/main/resources/META-INF/resources/assets/xml-Dzl_rdxd.js, src/main/resources/META-INF/resources/assets/yaml-C5eaV0RI.js, src/main/resources/META-INF/resources/assets/javascript-CmDShlNU.js
All language syntax-highlighting and mode bundles update their first-line imports to reference newly hashed module chunks (index-Cfhvosw6.js and related regenerated assets). Exported language configurations, tokenizer rules, and bracket/auto-closing behaviors remain unchanged. The manage.html script tag updates its src to load the regenerated main bundle.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • labsai/EDDI#508: Both PRs modify keycloak/eddi-realm.json to adjust eddi-frontend Keycloak redirect/logout URI behavior.
  • labsai/EDDI#507: Both PRs update generated front-end bundles' module import specifiers to point at different hashed asset chunks and modify manage.html to reference the new hashed assets.

Suggested reviewers

  • ginccc

Poem

🐰 A bundle rebuilt, hashes all anew,
Post-logout whispers now find their way through,
Syntax colors dance in minified grace,
Each import rebound to its rightful place! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.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 'Fix/keycloak logout' directly addresses the main objective of the PR, which is fixing a Keycloak logout bug that was producing 401 errors.
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 fix/keycloak-logout

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.

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown

⚠️ Deprecation Warning: The deny-licenses option is deprecated for possible removal in the next major release. For more information, see issue 997.

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

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

🧹 Nitpick comments (1)
keycloak/eddi-realm.json (1)

94-96: 💤 Low value

Consider explicit URIs for production deployments.

The "+" wildcard inherits all allowed URIs from redirectUris and webOrigins, which is appropriate for this development realm configuration. For production deployments, however, explicitly list post-logout redirect URIs to minimize the attack surface and follow the principle of least privilege.

For example:

"attributes": {
  "post.logout.redirect.uris": "https://your-production-domain.com/*"
}

This matches the existing permissive pattern already used in webOrigins (line 85), so it's consistent with the current development-focused configuration.

🤖 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 `@keycloak/eddi-realm.json` around lines 94 - 96, Replace the wildcard "+"
value in the attributes object for the "post.logout.redirect.uris" key with
explicit post-logout redirect URIs for production; locate the
"post.logout.redirect.uris" attribute in the attributes block and change it from
"+" to a comma-separated list of allowed HTTPS domains/paths (e.g., your
production origin(s) or specific redirect endpoints) to minimize the attack
surface and follow least-privilege practices.
🤖 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.

Nitpick comments:
In `@keycloak/eddi-realm.json`:
- Around line 94-96: Replace the wildcard "+" value in the attributes object for
the "post.logout.redirect.uris" key with explicit post-logout redirect URIs for
production; locate the "post.logout.redirect.uris" attribute in the attributes
block and change it from "+" to a comma-separated list of allowed HTTPS
domains/paths (e.g., your production origin(s) or specific redirect endpoints)
to minimize the attack surface and follow least-privilege practices.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 35b8aa62-51de-482d-bdf4-ff5edce1c6dc

📥 Commits

Reviewing files that changed from the base of the PR and between 1913d9c and 71dd43c.

📒 Files selected for processing (19)
  • keycloak/eddi-realm.json
  • src/main/resources/META-INF/resources/assets/cssMode-CRRdssKx.js
  • src/main/resources/META-INF/resources/assets/freemarker2-DqDWCtuK.js
  • src/main/resources/META-INF/resources/assets/handlebars-B6GL_0Gw.js
  • src/main/resources/META-INF/resources/assets/html-z1CojlRt.js
  • src/main/resources/META-INF/resources/assets/htmlMode-FnQ1MKvn.js
  • src/main/resources/META-INF/resources/assets/index-Cfhvosw6.js
  • src/main/resources/META-INF/resources/assets/javascript-CmDShlNU.js
  • src/main/resources/META-INF/resources/assets/jsonMode-BrbWbOAE.js
  • src/main/resources/META-INF/resources/assets/liquid-C_tKVlev.js
  • src/main/resources/META-INF/resources/assets/lspLanguageFeatures-CWMiI3_8.js
  • src/main/resources/META-INF/resources/assets/mdx-Cjguuzo_.js
  • src/main/resources/META-INF/resources/assets/python-nn_VEFur.js
  • src/main/resources/META-INF/resources/assets/razor-BRw03YNd.js
  • src/main/resources/META-INF/resources/assets/tsMode-B9PvQzQZ.js
  • src/main/resources/META-INF/resources/assets/typescript-D1IyJ0Mn.js
  • src/main/resources/META-INF/resources/assets/xml-Dzl_rdxd.js
  • src/main/resources/META-INF/resources/assets/yaml-C5eaV0RI.js
  • src/main/resources/META-INF/resources/manage.html

@rolandpickl
rolandpickl merged commit 49d2936 into main Jun 4, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants