Fix/keycloak logout - #520
Conversation
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>
📝 WalkthroughWalkthroughThe 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. ChangesKeycloak Post-Logout Configuration
Frontend Asset Bundle Regeneration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
keycloak/eddi-realm.json (1)
94-96: 💤 Low valueConsider explicit URIs for production deployments.
The
"+"wildcard inherits all allowed URIs fromredirectUrisandwebOrigins, 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
📒 Files selected for processing (19)
keycloak/eddi-realm.jsonsrc/main/resources/META-INF/resources/assets/cssMode-CRRdssKx.jssrc/main/resources/META-INF/resources/assets/freemarker2-DqDWCtuK.jssrc/main/resources/META-INF/resources/assets/handlebars-B6GL_0Gw.jssrc/main/resources/META-INF/resources/assets/html-z1CojlRt.jssrc/main/resources/META-INF/resources/assets/htmlMode-FnQ1MKvn.jssrc/main/resources/META-INF/resources/assets/index-Cfhvosw6.jssrc/main/resources/META-INF/resources/assets/javascript-CmDShlNU.jssrc/main/resources/META-INF/resources/assets/jsonMode-BrbWbOAE.jssrc/main/resources/META-INF/resources/assets/liquid-C_tKVlev.jssrc/main/resources/META-INF/resources/assets/lspLanguageFeatures-CWMiI3_8.jssrc/main/resources/META-INF/resources/assets/mdx-Cjguuzo_.jssrc/main/resources/META-INF/resources/assets/python-nn_VEFur.jssrc/main/resources/META-INF/resources/assets/razor-BRw03YNd.jssrc/main/resources/META-INF/resources/assets/tsMode-B9PvQzQZ.jssrc/main/resources/META-INF/resources/assets/typescript-D1IyJ0Mn.jssrc/main/resources/META-INF/resources/assets/xml-Dzl_rdxd.jssrc/main/resources/META-INF/resources/assets/yaml-C5eaV0RI.jssrc/main/resources/META-INF/resources/manage.html
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
Related Issue
Closes #
Changes Made
How to Test
Checklist
./mvnw clean verify -DskipITs)Summary by CodeRabbit