Hi there,
Two questions, one I am sure its been answered somewhere but I have yet to find out where, the other is a question on if it is possible to do The first I think is a no but not 100% on it I have to secure communication to an external log4J server from a project which uses Log4J (1.2.15). I am aware that this version has been superseded quite a while ago but this is a legacy project that needs to secure comms . I can see examples of Log4j 2 syslog appender using SSL tag,etc but is this possible for the log4j version I am using? Second question is if Log4j can do it ( either version 1 or 2 ) Setting SSL settings on Log4j using Java The application currently programmatically builds the syslog appender in Java rather than have it set in the Log4J properties file, like so log4j.appender.syslogAudit=3Dorg.apache.log4j.varia.NullAppender Then what I see has standard config log4jProps.setProperty("log4j.appender.syslogAudit", SYSLOG_APPENDER); log4jProps.setProperty("log4j.appender.syslogAudit.syslogHost", syslogURL); log4jProps.setProperty("log4j.appender.syslogAudit.threshold", "INFO"); log4jProps.setProperty("log4j.appender.syslogAudit.layout", "com.xxx.coreservice.logging.FileLayout"); But to implement the SSL portion of the appender what are the sysLogAudit tags to use ? Log4j TLS appender as seen in Log4J configuration file. <TLSSyslog name=3D"bsd" host=3D"localhost" port=3D"6514"> <SSL> <KeyStore location=3D"log4j2-keystore.jks" passwordEnvironmentVariable=3D"KEYSTORE_PASSWORD"/> <TrustStore location=3D"truststore.jks" passwordFile=3D"${sys:user.home}/truststore.pwd"/> </SSL> </TLSSyslog> Regards Eoin --0000000000001cf796059864b3c4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div class=3D"gmail_quote"><br><div dir=3D"ltr"><p class= =3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font-family:= Calibri,sans-serif">Hi there,</p> <p class=3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font= -family:Calibri,sans-serif">=C2=A0</p> <p class=3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font= -family:Calibri,sans-serif">Two questions, one I am sure its been answered = somewhere but I have yet to find out where, the other is a question on if it is possible = to do =E2=80=A6</p> <p class=3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font= -family:Calibri,sans-serif">=C2=A0</p> <p class=3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font= -family:Calibri,sans-serif">=C2=A0</p> <p class=3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font= -family:Calibri,sans-serif">The first I think is a no but not 100% on it</p= > <p class=3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font= -family:Calibri,sans-serif">=C2=A0</p> <p class=3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font= -family:Calibri,sans-serif">I have to secure communication to an external l= og4J server from a project which uses Log4J (1.2.15).</p> <p class=3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font= -family:Calibri,sans-serif">I am aware that this version has been supersede= d quite a while ago but this is a legacy project that</p> <p class=3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font= -family:Calibri,sans-serif">needs to secure comms . I can see examples of L= og4j 2 syslog appender using SSL tag,etc but is this possible</p> <p class=3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font= -family:Calibri,sans-serif">for the log4j version I am using?</p> <p class=3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font= -family:Calibri,sans-serif">=C2=A0</p> <p class=3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font= -family:Calibri,sans-serif">Second question is if Log4j can do it ( either = version 1 or 2 ) Setting SSL settings on Log4j using Java</p> <p class=3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font= -family:Calibri,sans-serif">=C2=A0</p> <p class=3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font= -family:Calibri,sans-serif">The application currently programmatically buil= ds the syslog appender in Java rather than have it</p> <p class=3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font= -family:Calibri,sans-serif">set in the Log4J properties file, like so</p> <p class=3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font= -family:Calibri,sans-serif">=C2=A0</p> <p class=3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font= -family:Calibri,sans-serif">log4j.appender.syslogAudit=3Dorg.apache.log4j.v= aria.NullAppender </p> <p class=3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font= -family:Calibri,sans-serif">=C2=A0</p> <p class=3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font= -family:Calibri,sans-serif">Then what I see has standard config</p> <p class=3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font= -family:Calibri,sans-serif">=C2=A0</p> <p class=3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font= -family:Calibri,sans-serif">log4jProps.setProperty("log4j.appender.sys= logAudit", SYSLOG_APPENDER);</p> <p class=3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font= -family:Calibri,sans-serif">log4jProps.setProperty("log4j.appender.sys= logAudit.syslogHost", syslogURL);</p> <p class=3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font= -family:Calibri,sans-serif">log4jProps.setProperty("log4j.appender.sys= logAudit.threshold", "INFO");</p> <p class=3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font= -family:Calibri,sans-serif">log4jProps.setProperty("log4j.appender.sys= logAudit.layout", "com.xxx.coreservice.logging.FileLayout");</p> <p class=3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font= -family:Calibri,sans-serif">=C2=A0</p> <p class=3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font= -family:Calibri,sans-serif">But to implement the SSL portion of the appende= r what are the sysLogAudit =E2=80=9Ctags=E2=80=9D to use ?</p> <p class=3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font= -family:Calibri,sans-serif">=C2=A0</p> <p class=3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font= -family:Calibri,sans-serif">Log4j TLS appender as seen in Log4J configurati= on file.</p> <p class=3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font= -family:Calibri,sans-serif">=C2=A0</p> <p class=3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font= -family:Calibri,sans-serif"><TLSSyslog name=3D"bsd" host=3D"localhost" port=3D"6514"></p> <p class=3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font= -family:Calibri,sans-serif">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 <SSL></p> <p class=3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font= -family:Calibri,sans-serif">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 <KeyStore=C2=A0=C2=A0 location=3D"log4j2-keystore.jks" passwordEnvironmentVariable=3D"KEYSTORE_PASSWORD"/></p> <p class=3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font= -family:Calibri,sans-serif">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 <= TrustStore location=3D"truststore.jks"=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 passwordFile=3D"${sys:user.home}/truststore.pwd"/></p> <p class=3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font= -family:Calibri,sans-serif">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 </SSL></p> <p class=3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font= -family:Calibri,sans-serif">=C2=A0=C2=A0=C2=A0 </TLSSyslog> </p><p cl= ass=3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font-fami= ly:Calibri,sans-serif"><br></p><p class=3D"MsoNormal" style=3D"margin:0in 0= in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><br></p><p class= =3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font-family:= Calibri,sans-serif">Regards</p><p class=3D"MsoNormal" style=3D"margin:0in 0= in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><br></p><p class= =3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font-family:= Calibri,sans-serif">Eoin</p></div> </div></div> --0000000000001cf796059864b3c4--