The branch, build-main has been updated
via 87e42dc92a6aa376c672c903ccaa59284718d0e9 (commit)
from 9472cbc3b80ab0349feb5a020756c8bce9489be1 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
x2gobroker/…
[View More]authservice.py | 1 +
1 file changed, 1 insertion(+)
The diff of changes is:
diff --git a/x2gobroker/authservice.py b/x2gobroker/authservice.py
index ae1518a..26c841e 100644
--- a/x2gobroker/authservice.py
+++ b/x2gobroker/authservice.py
@@ -62,6 +62,7 @@ def authenticate(username, password, service="x2gobroker"):
s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
logger_broker.debug('connecting to authentication service socket {socket}'.format(socket=x2gobroker.defaults.X2GOBROKER_AUTHSERVICE_SOCKET))
s.connect(x2gobroker.defaults.X2GOBROKER_AUTHSERVICE_SOCKET)
+ # FIXME: somehow logging output disappears after we have connected to the socket file...
logger_broker.debug('sending username={username}, password=<hidden>, service={service} to authentication service'.format(username=username, service=service))
s.send('{username} {password} {service}\n'.format(username=username, password=password, service=service))
result = s.recv(1024)
hooks/post-receive
--
x2gobroker.git (HTTP(S) Session broker for X2Go)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "x2gobroker.git" (HTTP(S) Session broker for X2Go).
[View Less]
The branch, build-main has been updated
via 81642aaf1a9a448bb00906fc6d57d2a324ae5a59 (commit)
from 31a93ead8a1fada72e134a8f9e48e6f8c30beb05 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
x2gobroker/…
[View More]web/plain.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
The diff of changes is:
diff --git a/x2gobroker/web/plain.py b/x2gobroker/web/plain.py
index 8487e43..ca041df 100644
--- a/x2gobroker/web/plain.py
+++ b/x2gobroker/web/plain.py
@@ -44,13 +44,14 @@ class X2GoBrokerWeb(tornado.web.RequestHandler):
def get(self, backend):
if x2gobroker.defaults.X2GOBROKER_DEBUG:
- self._gen_http_header()
logger_broker.warn('GET http request detected, if unwanted: disable X2GOBROKER_DEBUG')
return self.post(backend)
- raise tornado.web.HTTPError(404)
+ raise tornado.web.HTTPError(405)
def post(self, backend):
+ self._gen_http_header()
+
if not backend:
backend = x2gobroker.defaults.X2GOBROKER_DEFAULT_BACKEND
else:
hooks/post-receive
--
x2gobroker.git (HTTP(S) Session broker for X2Go)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "x2gobroker.git" (HTTP(S) Session broker for X2Go).
[View Less]
The branch, build-main has been updated
via f0ad3869aa976cfef4472c0a1137d01ea956fce0 (commit)
from 85ffd94dae231162d20c38c9c7a2c7dab99b6e0c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
debian/…
[View More]changelog | 1 +
x2gobroker/brokers/base_broker.py | 17 ++++++++++++++++-
2 files changed, 17 insertions(+), 1 deletion(-)
The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 17b3755..e38e86b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -20,6 +20,7 @@ x2gobroker (0.0.1.1-0~x2go1) UNRELEASED; urgency=low
daemon script.
- Add forgotten file: x2gobroker-authservice-logger.conf. (Fixes: #180).
- Add script: x2gobroker-testauth.
+ - Add enable()/disable() methods to broker backends.
* /debian/control:
+ Fix --root parameter in DEB_PYTHON_INSTALL_ARGS.
+ Let bin:package x2gobroker-authservice depend on python-x2gobroker (of the
diff --git a/x2gobroker/brokers/base_broker.py b/x2gobroker/brokers/base_broker.py
index 43e4d79..3cac792 100644
--- a/x2gobroker/brokers/base_broker.py
+++ b/x2gobroker/brokers/base_broker.py
@@ -65,6 +65,7 @@ class X2GoBroker(object):
if self.config_file is None: self.config_file = x2gobroker.defaults.X2GOBROKER_CONFIG
if config_defaults is None: config_defaults = x2gobroker.defaults.X2GOBROKER_CONFIG_DEFAULTS
self.config = x2gobroker.config.X2GoBrokerConfigFile(config_files=self.config_file, defaults=config_defaults)
+ self.enabled = self.config.get_value(self.backend_name, 'enable')
self._dynamic_cookie_map = {}
self._client_address = None
@@ -81,7 +82,21 @@ class X2GoBroker(object):
Check if this backend has been enabled in the configuration file.
"""
- return self.config.get_value(self.backend_name, 'enable')
+ return self.enabled
+
+ def enable(self):
+ """\
+ Enable this broker backend.
+
+ """
+ self.enabled = True
+
+ def disable(self):
+ """\
+ Disable this broker backend.
+
+ """
+ self.enabled = False
def set_client_address(self, address):
"""\
hooks/post-receive
--
x2gobroker.git (HTTP(S) Session broker for X2Go)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "x2gobroker.git" (HTTP(S) Session broker for X2Go).
[View Less]
The branch, build-main has been updated
via ad71a6de92eb31ef0f3a3aae4aec16067573c35b (commit)
from 81642aaf1a9a448bb00906fc6d57d2a324ae5a59 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
x2gobroker/…
[View More]brokers/base_broker.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
The diff of changes is:
diff --git a/x2gobroker/brokers/base_broker.py b/x2gobroker/brokers/base_broker.py
index 365ce0b..43e4d79 100644
--- a/x2gobroker/brokers/base_broker.py
+++ b/x2gobroker/brokers/base_broker.py
@@ -417,6 +417,7 @@ class X2GoBroker(object):
def _do_authenticate(self, username='', password=''):
if self._import_authmech_module(mech=self.get_authentication_mechanism()):
+ logger_broker.debug('base_broker.X2GoBroker._do_authenticate(): authenticating user={username} with password=<hidden> against backend={backend}.'.format(username=username, backend=self.backend_name))
return self.authmech_module.X2GoBrokerAuthMech().authenticate(username, password)
else:
return False
@@ -850,7 +851,7 @@ class X2GoBroker(object):
try:
busy_servers = x2gobroker.agent.find_busy_servers(username=username, query_mode=agent_query_mode, remote_agent=remote_agent)
- except x2gobroker.X2GoBrokerAgentException:
+ except x2gobroker.x2gobroker_exceptions.X2GoBrokerAgentException:
logger_broker.warning('base_broker.X2GoBroker.select_session(): failed to query broker agent (quey-mode: {query_mode}, remote_agent: {remote_agent})'.format(query_mode=agent_query_mode, remote_agent=remote_agent))
if agent_query_mode.upper() == u'SSH':
hooks/post-receive
--
x2gobroker.git (HTTP(S) Session broker for X2Go)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "x2gobroker.git" (HTTP(S) Session broker for X2Go).
[View Less]
The branch, build-main has been updated
via 85ffd94dae231162d20c38c9c7a2c7dab99b6e0c (commit)
from ad71a6de92eb31ef0f3a3aae4aec16067573c35b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
bin/…
[View More]x2gobroker-testauth | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
The diff of changes is:
diff --git a/bin/x2gobroker-testauth b/bin/x2gobroker-testauth
index fd8a5a7..d8ef295 100755
--- a/bin/x2gobroker-testauth
+++ b/bin/x2gobroker-testauth
@@ -24,6 +24,7 @@ import os
import sys
import setproctitle
import argparse
+import logging
# perform an authentication against the authentication mechanism configured for WSGI
try:
@@ -31,6 +32,7 @@ try:
except ImportError:
sys.path.insert(0, os.path.join(os.getcwd(), '..'))
import x2gobroker.defaults
+import x2gobroker.loggers
PROG_NAME = os.path.basename(sys.argv[0])
PROG_OPTIONS = sys.argv[1:]
@@ -78,12 +80,16 @@ if __name__ == "__main__":
if cmdline_args.config_file is not None:
x2gobroker.defaults.X2GOBROKER_CONFIG = cmdline_args.config_file
- x2gobroker.defaults.X2GOBROKER_DEBUG = cmdline_args.debug
+ if cmdline_args.debug:
+ x2gobroker.defaults.X2GOBROKER_DEBUG = cmdline_args.debug
+ # raise log level to DEBUG if requested...
+ if x2gobroker.defaults.X2GOBROKER_DEBUG and not x2gobroker.defaults.X2GOBROKER_TESTSUITE:
+ x2gobroker.loggers.logger_broker.setLevel(logging.DEBUG)
+ x2gobroker.loggers.logger_error.setLevel(logging.DEBUG)
+
username = cmdline_args.username
password = cmdline_args.password
-import x2gobroker.config
-
config_file = x2gobroker.defaults.X2GOBROKER_CONFIG
config_defaults = x2gobroker.defaults.X2GOBROKER_CONFIG_DEFAULTS
hooks/post-receive
--
x2gobroker.git (HTTP(S) Session broker for X2Go)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "x2gobroker.git" (HTTP(S) Session broker for X2Go).
[View Less]
The branch, build-main has been updated
via 9472cbc3b80ab0349feb5a020756c8bce9489be1 (commit)
from 2a8a92b9a806b0bddee8893db10871941d0d3827 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
sbin/…
[View More]x2gobroker-authservice | 3 +++
1 file changed, 3 insertions(+)
The diff of changes is:
diff --git a/sbin/x2gobroker-authservice b/sbin/x2gobroker-authservice
index 534a532..28084fd 100755
--- a/sbin/x2gobroker-authservice
+++ b/sbin/x2gobroker-authservice
@@ -31,6 +31,9 @@ import socket
import getpass
import logging.config
+from pwd import getpwnam
+from grp import getgrnam
+
PROG_NAME = os.path.basename(sys.argv[0])
PROG_OPTIONS = sys.argv[1:]
setproctitle.setproctitle("%s %s" % (PROG_NAME, " ".join(PROG_OPTIONS)))
hooks/post-receive
--
x2gobroker.git (HTTP(S) Session broker for X2Go)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "x2gobroker.git" (HTTP(S) Session broker for X2Go).
[View Less]
The branch, build-main has been updated
via 31a93ead8a1fada72e134a8f9e48e6f8c30beb05 (commit)
from 87e42dc92a6aa376c672c903ccaa59284718d0e9 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
x2gobroker/…
[View More]web/html.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
The diff of changes is:
diff --git a/x2gobroker/web/html.py b/x2gobroker/web/html.py
index 0e1988f..0cfb97e 100644
--- a/x2gobroker/web/html.py
+++ b/x2gobroker/web/html.py
@@ -65,11 +65,12 @@ $output
self.set_header(http_header_item, self.http_header_items[http_header_item])
def get(self, backend):
- self._gen_http_header()
return self.post(backend)
def post(self, backend):
+ self._gen_http_header()
+
if not backend:
backend = _X2GOBROKER_DEFAULT_BACKEND
else:
@@ -83,7 +84,7 @@ $output
exec("broker_backend = x2gobroker.brokers.{backend}_broker.X2GoBroker()".format(backend=backend))
except ImportError:
# throw a 404 if the backend does not exist
- raise tornado.web.HTTPError(404)
+ raise tornado.web.HTTPError(405)
global_config = broker_backend.get_global_config()
backend_config = broker_backend.get_backend_config(backend)
hooks/post-receive
--
x2gobroker.git (HTTP(S) Session broker for X2Go)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "x2gobroker.git" (HTTP(S) Session broker for X2Go).
[View Less]
The branch, build-main has been updated
via e34d0691e5830ab901da3ba0998a73e5f7fb0c31 (commit)
from 2b634eef55315243b77ad07cd81d2c8e722e2542 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
debian/…
[View More]changelog | 1 +
.../broker/x2gobroker-authservice-logger.conf | 37 ++++++++++++++++----
2 files changed, 31 insertions(+), 7 deletions(-)
copy x2gobroker/web/json.py => etc/broker/x2gobroker-authservice-logger.conf (62%)
The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index d3ab329..8195e1e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -18,6 +18,7 @@ x2gobroker (0.0.1.1-0~x2go1) UNRELEASED; urgency=low
- Fix name of get() method for /pubkeys/ URL path. (Fixes: #176).
- Move AuthService server code fully into x2gobroker-authservice
daemon script.
+ - Add forgotten file: x2gobroker-authservice-logger.conf. (Fixes: #180).
* /debian/control:
+ Fix --root parameter in DEB_PYTHON_INSTALL_ARGS.
+ Let bin:package x2gobroker-authservice depend on python-x2gobroker (of the
diff --git a/x2gobroker/web/json.py b/etc/broker/x2gobroker-authservice-logger.conf
similarity index 62%
copy from x2gobroker/web/json.py
copy to etc/broker/x2gobroker-authservice-logger.conf
index 2e97f89..9c3e0c9 100644
--- a/x2gobroker/web/json.py
+++ b/etc/broker/x2gobroker-authservice-logger.conf
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
# This file is part of the X2Go Project - http://www.x2go.org
# Copyright (C) 2011-2012 by Oleksandr Shneyder <oleksandr.shneyder(a)obviously-nice.de>
# Copyright (C) 2011-2012 by Heinz-Markus Graesing <heinz-m.graesing(a)obviously-nice.de>
@@ -20,11 +18,36 @@
# Free Software Foundation, Inc.,
# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
-# modules
-import tornado.web
+# WARNING: only modify this file if you _exactly_ know what you are doing!!!
+
+[loggers]
+keys=root,authservice
+
+[logger_root]
+level=NOTSET
+handlers=stderrHandler
+
+[handlers]
+keys=stderrHandler,authserviceFileHandler
+
+[formatters]
+keys=authserviceFormatter
+
+[handler_stderrHandler]
+class=StreamHandler
+args=(sys.stderr,)
+[logger_authservice]
+level=DEBUG
+handlers=authserviceFileHandler
+qualname=authservice
+propagate=0
-class X2GoBrokerWeb(tornado.web.RequestHandler):
+[handler_authserviceFileHandler]
+class=FileHandler
+formatter=authserviceFormatter
+args=('/var/log/x2gobroker/authservice.log',)
- # MUSIC OF THE FUTURE
- pass
\ No newline at end of file
+[formatter_authserviceFormatter]
+format=%(asctime)s - %(name)s - %(levelname)s - %(message)s
+datefmt=
hooks/post-receive
--
x2gobroker.git (HTTP(S) Session broker for X2Go)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "x2gobroker.git" (HTTP(S) Session broker for X2Go).
[View Less]
The branch, build-main has been updated
via 4595a5dc63ae5a80d2c210ba4469390acb11fd2f (commit)
from 23c88c33da8d3294bb74e854bc6f883ea63b7c9a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
man/man8/…
[View More]x2gobroker.8 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
The diff of changes is:
diff --git a/man/man8/x2gobroker.8 b/man/man8/x2gobroker.8
index 8811c2b..ec5ac10 100644
--- a/man/man8/x2gobroker.8
+++ b/man/man8/x2gobroker.8
@@ -22,7 +22,7 @@ x2gobroker \- Session Broker for X2Go
.ad b
'hy
.SH DESCRIPTION
-\fBx2gobroker\fR is a Web.py based implementation of the X2Go Session Broker API.
+\fBx2gobroker\fR is a Python Tornado based implementation of the X2Go Session Broker API.
.PP
This command is normally executed either through an init script or via the WSGI module in your httpd server.
.PP
hooks/post-receive
--
x2gobroker.git (HTTP(S) Session broker for X2Go)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "x2gobroker.git" (HTTP(S) Session broker for X2Go).
[View Less]