Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #912.
This change addresses the identity-binding issue reported in #912 and removes the shared production JWT signing key.
Previously, the authentication filter only checked whether the Redis session identified by the JWT's
subanduidexisted. A re-signed token could retain those values while changinguserId, which downstream code used for authorization decisions.Changes
${JWT_BASE64_SECRET:}.The session check reuses the existing encrypted-token field. No Redis schema changes, controller changes, or authentication architecture redesign are required.
Configuration and Upgrade
Before starting with the
prodprofile, generate and securely retain a deployment-specific key:Pass this variable explicitly into containers and reuse the same key across restarts and replicas. Replacing the previous signing key invalidates existing tokens, so users must log in again.
Development startup remains unchanged. The development default must not be used for production deployments.
Local Validation
userIdand an otherwise valid session reference; the patched filter rejects it.git diff --check.Session checks exercised the actual filter and
TokenProvider, with Redis and online-session services mocked. Configuration checks loaded the actual profile YAML files. No repository test files were added, and no database or full application environment was started.The full offline Maven build was blocked by uncached Freemarker dependencies; it is not claimed as passing.
This contribution is part of my ongoing authentication-security research. I'm glad to help improve ELADMIN's security and welcome your feedback.