MichaelMorrisEst commented on issue #3074:
URL: 
https://github.com/apache/logging-log4j2/issues/3074#issuecomment-2404863957

   Hi @vy, thanks for the feedback 
   > @MichaelMorrisEst, this is something crossed my mind while working on 
#2767, but I am not sure about the implications of trying to reload key/trust 
store on every new socket creation attempt. [Thinking out loud here...] If the 
server has indeed gained a new identity, reloading key/trust stores will solve 
the problem swiftly. But what if the failure is due to something else? If we 
decide to implement this, shall this be the default, or opt-in via a new 
attribute?
   
   If reloading at every re-connection is a concern then a slightly different 
approach could be to do the re-connection as today (i.e. don't reload the 
stores) but catch SSLHandshakeException and, when encountered then do the 
reload and try again. This would limit the reloading to only the relevant 
scenario of a handshake problem. 
   I have no strong opinion on whether it should be default behaviour or opt 
in, and am happy to go with whichever the community prefers (if there is 
agreement on proceeding)
   
   > Another concern I have regarding this approach is we will be introducing 
an exception to the reconfiguration logic. That is, when a Log4j configuration 
is loaded, it is treated more or less immutable – obviously, except 
`LoggerConfig`s. Now we will introduce a _"please reload only this little 
configuration element"_ exception. I am not saying this is something bad per 
se. But exceptions generally bite us in the long run.
   > 
   The key/truststore are already not handled the same as other configuration 
elements though (as changes to them do not trigger a reconfig). As they are 
excluded from the normal reconfiguration logic, then the only way to support 
changes to them is through something other than the normal reconfiguration 
logic.
   
   


-- 
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: notifications-unsubscr...@logging.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to