Force initialization of KeyManager
on startup
#932
Merged
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.
Description
Forces initialization of
KeyManager
on startup.Voids the need for a separate secret key initializer in Docker Compose setups (i.e. https://github.com/DependencyTrack/hyades/blob/348e2c06f901de5b644abb03c863ad546f4894a0/docker-compose.yml#L350-L357), since
KeyManager
will generate it.KeyManager
was previously only initialized inAlpineServlet
(https://github.com/stevespringett/Alpine/blob/7f58a627ed8b476dd780e8b8a1aea14d5a848d7b/alpine-server/src/main/java/alpine/server/AlpineServlet.java#L58-L59), which is not loaded wheninit.and.exit
is enabled.Also reduce log noise when
init.and.exit
is enabled.Addressed Issue
N/A
Additional Details
N/A
Checklist
This PR fixes a defect, and I have provided tests to verify that the fix is effectiveThis PR introduces changes to the database model, and I have updated the migration changelog accordinglyThis PR introduces new or alters existing behavior, and I have updated the documentation accordingly