-
Notifications
You must be signed in to change notification settings - Fork 41.2k
SecureRandom speed up #14528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Yes. We already configure the |
that's the problem with your solution that the first user has to wait for unreasonable time while initialisation in parallel gives chance to avoid this. I don't demand to change yiur default settings but yiu hardcoded your lazy generator so digging thorough your code this is the only solution I found to enforce triggering securerandom initialisation. This part should be customasable, not hardcoded as you've done |
In my opinion I should be able to register my own sessionid generator as a spring bean and it should be applied automatically if found. if not then use your lazy one |
Configuring Tomcat to defer initialisation of Thanks for the suggestion of using a bean, but that doesn't really fit with the existing model of embedded container customisation. Using a more general purpose customiser, such as the context customiser you have used above, is our preferred approach. The alternative would be to offer a property to control whether or not the initialisation was done lazily. We generally only offer properties for settings that we think will be fairly widely used and I don't think this meets that criteria. If you'd like the initialisation to be done up front, you existing customiser-based approach is what I would recommend. |
ok. I'll do my way. I'm trying to initialise it not in advance but in parallel with general initialisation which I find the best as it does not affect the the whole system initialisation time and doesn't annoy the first user as on some servers this initialisation might take up to a minute as not much entropy comparing to desktop pc. Also I can't agree that no one complains. If you Google with words securerandom spring boot there'll be lots of discussions about it |
This comment has been minimized.
This comment has been minimized.
@dimazig If you configure the JVM to use |
Hi team,
Have you considered somehow to speed up SecureRandom initialization
For now I created a hack like that:
The text was updated successfully, but these errors were encountered: