Repository navigation
jwt secret management improvements - #489
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #489 +/- ##
==========================================
- Coverage 70.64% 70.64% -0.01%
==========================================
Files 359 359
Lines 73698 73771 +73
==========================================
+ Hits 52064 52112 +48
- Misses 16096 16112 +16
- Partials 5538 5547 +9 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…nd error handling
Contributor
Author
|
fix #488 |
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.
This pull request introduces significant improvements to the handling of JWT secrets in the server, making secret management more secure and robust. The main changes include generating a secure random JWT secret by default, persisting it to disk with strict permissions, and ensuring the secret is never empty. Additional test coverage has been added for these new behaviors. There are also minor improvements to context handling in the JavaScript engine and its tests.
JWT Secret Management Improvements:
0600). If the secret file exists, it is loaded and validated; otherwise, it is created. This ensures the JWT secret is always strong and not empty. (mods/server/security.go,mods/server/server.go,mods/server/config.hcl) [1] [2] [3]mods/server/security.go)mods/server/security.go)Test Coverage:
mods/server/security_test.go)JavaScript Engine Context Handling:
jsh/engine/engine.go,jsh/engine/engine_test.go) [1] [2] [3] [4] [5] [6]Dependency and Import Updates:
encoding/hex,os,filepath,runtime). (mods/server/security.go,mods/server/security_test.go) [1] [2] [3]