This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository x2gobroker. from c940807 sbin/x2gobroker-keygen: Fix call to x2gobroker.utils.get_fingerprint_with_colons(). Thanks to Linnea Skogtvedt for spotting and reporting this. new 4224eae x2gobroker/brokers/base_broker.py: Log IP address of authentication attempts. (See Debian bug #922458). new 183f870 Make builds reproducible. Thanks to Chris Lamb for providing a patch. (See Debian bug #922137). new 8bc58d7 Correctly initialize the loggers when using x2gobroker via WSGI in Apache2. new c68d17f x2gobroker-wsgi: Place WSGI script symlink (pointing to <BINDIR>/x2gobroker) into a dedicated folder and configure Apache2 to use WSGIScriptAlias from that folder. (See Debian bug #922040). new a6191e5 sbin/x2gobroker-testagent: Fix retrieval of available tasks. new d6a2764 Permit `asyncio` to create event loops on any thread (required on multithreaded WSGI servers using Python 3). The 6 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: Makefile | 3 +++ bin/x2gobroker | 26 +++++++++++++++++++++----- debian/x2gobroker-wsgi.install | 1 + etc/x2gobroker-wsgi.apache.conf | 4 ++-- etc/x2gobroker-wsgi.apache.vhost | 4 ++-- sbin/x2gobroker-testagent | 2 +- x2gobroker/brokers/base_broker.py | 8 ++++++-- x2gobroker/defaults.py | 3 +-- 8 files changed, 37 insertions(+), 14 deletions(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2gobroker.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2gobroker. commit 4224eae7c93a6c3193586d3bc543bd051f5208af Author: Linnea Skogtvedt <linnea@linuxavdelingen.no> Date: Mon Mar 18 10:37:44 2019 +0100 x2gobroker/brokers/base_broker.py: Log IP address of authentication attempts. (See Debian bug #922458). --- x2gobroker/brokers/base_broker.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/x2gobroker/brokers/base_broker.py b/x2gobroker/brokers/base_broker.py index bccc91e..6f959eb 100644 --- a/x2gobroker/brokers/base_broker.py +++ b/x2gobroker/brokers/base_broker.py @@ -981,9 +981,8 @@ class X2GoBroker(object): ### ### - logger_broker.debug('base_broker.X2GoBroker.check_access(): checking for valid authentication: {access}'.format(access=access)) - if access: + logger_broker.warning('base_broker.X2GoBroker.check_access(): authentication succeeded for user {username} at ip {ip}'.format(username=username, ip=ip)) #create new cookie for this user #each user gets one or more tuples of IP, time stored as username_UUID files so they can connect from multiple sessions next_cookie = str(uuid.uuid4()) @@ -994,6 +993,8 @@ class X2GoBroker(object): if cookie_directory and username and cookie: os.remove(cookie_directory+"/"+username+"_"+cookie) logger_broker.debug('base_broker.X2GoBroker.check_access(): Giving new cookie: {cookie} to user {username} at ip {ip}'.format(cookie=next_cookie,username=username,ip=ip)) + else: + logger_broker.warning('base_broker.X2GoBroker.check_access(): authentication failed for user {username} at ip {ip}'.format(username=username, ip=ip)) else: # there is a cookie but its not ours so its either wrong or subsequent password auth -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2gobroker.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2gobroker. commit 183f8707822e7c64378526f81fa1c2892bfe02a4 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Mon Mar 18 10:43:06 2019 +0100 Make builds reproducible. Thanks to Chris Lamb for providing a patch. (See Debian bug #922137). --- x2gobroker/brokers/base_broker.py | 3 +++ x2gobroker/defaults.py | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/x2gobroker/brokers/base_broker.py b/x2gobroker/brokers/base_broker.py index 6f959eb..5b4303e 100644 --- a/x2gobroker/brokers/base_broker.py +++ b/x2gobroker/brokers/base_broker.py @@ -82,6 +82,7 @@ class X2GoBroker(object): self._dynamic_cookie_map = {} self._client_address = None + self._cookie = None def __del__(self): """\ @@ -199,6 +200,8 @@ class X2GoBroker(object): my_cookie = unconfigured_my_cookie deprecated_my_cookie = self.config.get_value('global', 'my-cookie') + if deprecated_my_cookie is None: + deprecated_my_cookie = uuid.uuid4() my_cookie_file = self.config.get_value('global', 'my-cookie-file') if os.path.isfile(my_cookie_file): diff --git a/x2gobroker/defaults.py b/x2gobroker/defaults.py index 55d8538..e10ccb0 100644 --- a/x2gobroker/defaults.py +++ b/x2gobroker/defaults.py @@ -32,7 +32,6 @@ X2Go Session Brokers uses many hard-coded defaults, that can be overridden in va # modules import os -import uuid import socket import pwd, grp @@ -230,7 +229,7 @@ X2GOBROKER_CONFIG_DEFAULTS = { 'pre_auth_scripts': [], 'post_auth_scripts': [], 'select_session_scripts': [], - 'my-cookie': uuid.uuid4(), + 'my-cookie': None, 'my-cookie-file': '/etc/x2go/broker/x2gobroker.authid', 'enable-plain-output': True, 'enable-json-output': True, -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2gobroker.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2gobroker. commit 8bc58d7ed8201b2fad5cfc0da83b2dd052cf1ed3 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Mon Mar 18 11:01:37 2019 +0100 Correctly initialize the loggers when using x2gobroker via WSGI in Apache2. --- bin/x2gobroker | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/bin/x2gobroker b/bin/x2gobroker index d5e8bdb..092f937 100755 --- a/bin/x2gobroker +++ b/bin/x2gobroker @@ -299,16 +299,18 @@ if __name__ == "__main__": urls = () settings = {} -# raise log level to DEBUG if requested... -if x2gobroker.defaults.X2GOBROKER_DEBUG and not x2gobroker.defaults.X2GOBROKER_TESTSUITE: - logger_broker.setLevel(logging.DEBUG) - logger_access.setLevel(logging.DEBUG) - logger_error.setLevel(logging.DEBUG) + # run the Python Tornado standalone daemon or handle interactive command line execution (via SSH) if __name__ == "__main__": + # raise log level to DEBUG if requested... + if x2gobroker.defaults.X2GOBROKER_DEBUG and not x2gobroker.defaults.X2GOBROKER_TESTSUITE: + logger_broker.setLevel(logging.DEBUG) + logger_access.setLevel(logging.DEBUG) + logger_error.setLevel(logging.DEBUG) + logfile_prelude(mode=cmdline_args.mode.upper()) if cmdline_args.mode.upper() == 'HTTP' or PROG_NAME == 'x2gobroker-daemon': @@ -371,6 +373,16 @@ else: ### launch as WSGI application ### + logger_broker = x2gobroker.loggers.logger_broker + logger_access = x2gobroker.loggers.logger_broker + logger_error = x2gobroker.loggers.logger_error + + # raise log level to DEBUG if requested... + if x2gobroker.defaults.X2GOBROKER_DEBUG and not x2gobroker.defaults.X2GOBROKER_TESTSUITE: + logger_broker.setLevel(logging.DEBUG) + logger_access.setLevel(logging.DEBUG) + logger_error.setLevel(logging.DEBUG) + prep_http_mode() import tornado.wsgi -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2gobroker.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2gobroker. commit c68d17fa30dce03dddea0df2aa5769f658ce77ed Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Mon Mar 18 12:22:46 2019 +0100 x2gobroker-wsgi: Place WSGI script symlink (pointing to <BINDIR>/x2gobroker) into a dedicated folder and configure Apache2 to use WSGIScriptAlias from that folder. (See Debian bug #922040). --- Makefile | 3 +++ debian/x2gobroker-wsgi.install | 1 + etc/x2gobroker-wsgi.apache.conf | 4 ++-- etc/x2gobroker-wsgi.apache.vhost | 4 ++-- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index ca1c85f..ad2bec9 100755 --- a/Makefile +++ b/Makefile @@ -182,6 +182,9 @@ install: ${INSTALL_FILE} etc/x2gobroker-wsgi.apache.{conf,vhost} \ "${DESTDIR}${ETCDIR}/" ${INSTALL_FILE} logrotate/x2gobroker-wsgi "${DESTDIR}/etc/logrotate.d/" + mkdir -p "${DESTDIR}${LIBDIR}/x2gobroker/wsgi" + ${INSTALL_SYMLINK} "${BINDIR}/x2gobroker" \ + "${DESTDIR}${LIBDIR}/x2gobroker/wsgi/x2gobroker-wsgi" # x2gobroker mkdir -p "${DESTDIR}${BINDIR}" "${DESTDIR}${SBINDIR}" \ diff --git a/debian/x2gobroker-wsgi.install b/debian/x2gobroker-wsgi.install index 743a1cc..42b6b92 100644 --- a/debian/x2gobroker-wsgi.install +++ b/debian/x2gobroker-wsgi.install @@ -1,3 +1,4 @@ etc/x2go/x2gobroker-wsgi.apache.conf etc/x2go/x2gobroker-wsgi.apache.vhost etc/logrotate.d/x2gobroker-wsgi +usr/lib/x2gobroker/wsgi/ diff --git a/etc/x2gobroker-wsgi.apache.conf b/etc/x2gobroker-wsgi.apache.conf index 3ee97ee..42da235 100644 --- a/etc/x2gobroker-wsgi.apache.conf +++ b/etc/x2gobroker-wsgi.apache.conf @@ -28,10 +28,10 @@ SetEnv X2GOBROKER_DEFAULT_BACKEND inifile # if you have to-be-statically-served files somewhere below the broker URL #Alias /x2gobroker/static /some/static/path/ -WSGIScriptAlias /x2gobroker /usr/bin/x2gobroker +WSGIScriptAlias /x2gobroker /usr/lib/x2gobroker/wsgi/x2gobroker-wsgi WSGIProcessGroup x2gobroker -<Directory /usr/bin/x2gobroker> +<Directory /usr/lib/x2gobroker/wsgi> Require local diff --git a/etc/x2gobroker-wsgi.apache.vhost b/etc/x2gobroker-wsgi.apache.vhost index 9b9e1cd..44df536 100644 --- a/etc/x2gobroker-wsgi.apache.vhost +++ b/etc/x2gobroker-wsgi.apache.vhost @@ -42,10 +42,10 @@ # if you have to-be-statically-served files somewhere below the broker URL #Alias /x2gobroker/static /some/static/path/ - WSGIScriptAlias / /usr/bin/x2gobroker + WSGIScriptAlias / /usr/lib/x2gobroker/wsgi/x2goroker-wsgi WSGIProcessGroup x2gobroker - <Directory /usr/bin/x2gobroker> + <Directory /usr/lib/x2gobroker/wsgi> Require local -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2gobroker.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2gobroker. commit a6191e535ee9ff6fa72cbe42c39d867f4c838385 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Mon Mar 18 12:32:09 2019 +0100 sbin/x2gobroker-testagent: Fix retrieval of available tasks. --- sbin/x2gobroker-testagent | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/x2gobroker-testagent b/sbin/x2gobroker-testagent index 333cc5c..9289f2b 100755 --- a/sbin/x2gobroker-testagent +++ b/sbin/x2gobroker-testagent @@ -156,7 +156,7 @@ if __name__ == "__main__": agent_client_tasks = x2gobroker.agent.tasks if 'availabletasks' in agent_client_tasks: try: - remote_agent_tasks = x2gobroker.agent.tasks_available(username=username, query_mode=query_mode, remote_agent=remote_agent) + (success, remote_agent_tasks) = x2gobroker.agent.tasks_available(username=username, query_mode=query_mode, remote_agent=remote_agent) except x2gobroker.x2gobroker_exceptions.X2GoBrokerAgentException as e: print("{errmsg}.".format(errmsg=e)) print() -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2gobroker.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2gobroker. commit d6a276493bee8451c13d0e458b67f3bff5575228 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Sat Apr 20 16:49:36 2019 +0200 Permit `asyncio` to create event loops on any thread (required on multithreaded WSGI servers using Python 3). See https://github.com/bdarnell/tornado/commit/16a3567b68f23ae4386eaf881f6a85849... See Debian bug #925102. --- bin/x2gobroker | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/x2gobroker b/bin/x2gobroker index 092f937..8ac37a6 100755 --- a/bin/x2gobroker +++ b/bin/x2gobroker @@ -373,6 +373,10 @@ else: ### launch as WSGI application ### + import asyncio + from tornado.platform.asyncio import AnyThreadEventLoopPolicy + asyncio.set_event_loop_policy(AnyThreadEventLoopPolicy()) + logger_broker = x2gobroker.loggers.logger_broker logger_access = x2gobroker.loggers.logger_broker logger_error = x2gobroker.loggers.logger_error -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2gobroker.git