vlaci / openconnect-sso

Wrapper script for OpenConnect supporting Azure AD (SAMLv2) authentication to Cisco SSL-VPNs
GNU General Public License v3.0
294 stars 126 forks source link

logger is not configured in `webengine_process.py` #19

Open zhengyu-yang opened 4 years ago

zhengyu-yang commented 4 years ago

After I start the program with INFO log level, the program outputs something like this:

[info     ] Authenticating to VPN endpoint [openconnect_sso.app] address=vpn.XXX.com name=UNNAMED
[info     ] Response received              [openconnect_sso.authenticator] id=main message=Please complete the authentication process in the AnyConnect Login window. title=XXX VPN
This plugin does not support createPlatformOpenGLContext!
2020-06-01 15:04.48 Browser started                startup_info=StartupInfo(url='https://vpn.XXX.com/+CSCOE+/saml/sp/login?tgname=TG-VPN&acsamlcap=v2', credentials=Credentials(username='YYY'))
2020-06-01 15:04.48 Loading page                   url=https://vpn.XXX.com/+CSCOE+/saml/sp/login?tgname=TG-VPN&acsamlcap=v2
2020-06-01 15:04.48 Initiating autologin           cred=Credentials(username='YYY')
......

Lines including "Browser started", "Loading page", and "Initiating autologin" come from webengine_process.py. It seems that the logger inside webengine_process.py is not properly configured, and it doesn't respect the log level and the format. I have also read logs of other people, it seems the logger is working properly in their cases.

MacOS, python 3.8.3

vlaci commented 4 years ago

Interesting.Older (pre 0.4.0) versions had this issues. Are you sure that you are on the latest version? (openconnect-sso --version). Other than that I have no idea what could be causing this behavior for you.

zhengyu-yang commented 4 years ago

I am using version 0.4.0.

❯ openconnect-sso --version
openconnect-sso 0.4.0
presidento commented 4 years ago

This happens also when start_method of multiprocessing is spawn. This is the default only available on Windows, but also can be configured on other systems, too.

I have a PoC patch for it (works for me, I use with this): https://github.com/presidento/openconnect-sso/commit/f889a7127b72d32934e65072c561c74c77cfe6a1

itollefsen commented 4 years ago

I'm also getting this with openconnect-sso 0.5.0 on macOS (10.15.6, Catalina) using Python 3.8.2. I have log level set to WARNING, but the webengine process spews out debug messages.

The above mentioned patch (presidento@f889a71) makes it shut up.