Giter VIP home page Giter VIP logo

Comments (5)

Hakky54 avatar Hakky54 commented on June 14, 2024

Hello,

Thank you for your input regarding the unsafe hostname verifier and trustmanager. My intention was to provide information to the enduser when they use it. It is unsafe and I thought it would be good for their monitoring by logging which client/server they allow. This this especially handy when they want to analyse the logs for an audit for example within an enterprise environment.

I can understand you and your frustration and there are multiple ways to solve this issue and you mentioned already one by setting the log level to debug in the library. There is also another way by turning off the logs for a specific class regardless of their log level. Have you tried it out?

If you are using logback your configuration would look like:

<configuration>
    <logger name="nl.altindag.ssl.hostnameverifier.UnsafeHostnameVerifier" level="OFF"/>
    <logger name="nl.altindag.ssl.trustmanager.UnsafeX509ExtendedTrustManager" level="OFF"/>
</configuration>

What logging implementation are you using? I can help you with the actually configuration.

from sslcontext-kickstart.

dasteg avatar dasteg commented on June 14, 2024

i am deploying code on an application server where i don't have control over the logging infrastructure. changing/disabling the logger is not an option for me.

for the moment i bypassed the issue by simply using a custom hostname verifier and trustmanager which does the same except for logging. if there would be official support to disable the logging or alternatively offer two implementations of the unsafe classes with and without logging this would allow me to get rid of local implementations.

two implementations could be used as simple as this:

default with logging:

.withTrustingAllCertificatesWithoutValidation()

without logging:

.withTrustingAllCertificatesWithoutValidationAndLogging()

and the same for hostnameverifier

from sslcontext-kickstart.

Hakky54 avatar Hakky54 commented on June 14, 2024

I have created a pull request which removes all logging within the UnsafeTrustManager and UnsafeHostnameVerifier. After rethinking this use case it indeed a bit verbose for the end-user to get all these warning logs as the end-user already has decided upfront to use the Unsafe variant so additional logs would be not needed to inform them. Please let me know if the adjusted code would do the trick for you

from sslcontext-kickstart.

dasteg avatar dasteg commented on June 14, 2024

looks good. thanks

from sslcontext-kickstart.

Hakky54 avatar Hakky54 commented on June 14, 2024

The changes will be available at version 7.0.2 today

from sslcontext-kickstart.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.