Aias00 opened a new issue, #976:
URL: https://github.com/apache/dubbo-go-pixiu/issues/976

   ### ✅ Verification Checklist
   
   - [x] 🔍 I have searched the [existing 
issues](https://github.com/apache/dubbo-go-pixiu/issues) and confirmed this is 
not a duplicate
   
   ### 🚀 Go Version
   
   go1.26.3
   
   ### 📦 Dubbo-go-pixiu Version
   
   develop branch
   
   ### 🖥️ Server Configuration
   
   _No response_
   
   ### 💻 Client Configuration
   
   _No response_
   
   ### 🌐 Protocol Configuration
   
   _No response_
   
   ### 📋 Registry Configuration
   
   _No response_
   
   ### 💾 Operating System
   
   🍎 macOS
   
   ### 📝 Bug Description
   
     The pixiu-admin JWT implementation uses a hardcoded default signing key 
and does not explicitly reject unexpected JWT signing methods during parsing.
   
     Affected code:
     - `admin/controller/auth/auth.go`
   
     Deployments that do not override the signing key share a predictable 
secret. Missing signing-method validation also weakens JWT verification 
hardening.
   
   ### 🔄 Steps to Reproduce
   
     1. Review `admin/controller/auth/auth.go`.
     2. Observe that the default signing key is hardcoded.
     3. Observe that JWT parsing returns the signing key without first checking 
the token signing method.
   
   ### ✅ Expected Behavior
   
     The JWT signing key should be configurable, for example through an 
environment variable.
   
     JWT parsing should reject tokens that use unexpected signing methods.
   
   ### ❌ Actual Behavior
   
     The default JWT signing key is hardcoded.
   
     JWT parsing does not explicitly validate the signing method before 
returning the verification key.
   
   ### 💡 Possible Solution
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to