[X2Go-Commits] x2gobroker.git - build-main (branch) updated: 0.0.2.0-8-g5fb663b

X2Go dev team git-admin at x2go.org
Sun May 19 12:56:55 CEST 2013


The branch, build-main has been updated
       via  5fb663ba8d36cdcdc1c7f89ef9b3bf75ae22e97f (commit)
      from  a543b6df7faa4ec5d008304e4f16512109817cac (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/changelog                  |    1 +
 etc/x2gobroker.conf               |   17 +----
 sbin/x2gobroker                   |    2 -
 x2gobroker/brokers/ldap_broker.py |   33 ----------
 x2gobroker/web/html.py            |  123 -------------------------------------
 x2gobroker/web/json.py            |   30 ---------
 6 files changed, 2 insertions(+), 204 deletions(-)
 delete mode 100644 x2gobroker/brokers/ldap_broker.py
 delete mode 100644 x2gobroker/web/html.py
 delete mode 100644 x2gobroker/web/json.py

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 5e2f943..3ccf158 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,7 @@ x2gobroker (0.0.2.1-0~x2go1) UNRELEASED; urgency=low
     - Remove trainling slashes from ManagementServer URLs.
     - In Apache2 vhost configuration example, move WSGI environment
       variable settings into VirtualHost setup.
+    - Remove unused, not-yet-developed broker backends and frontends.
 
  -- Mike Gabriel <mike.gabriel at das-netzwerkteam.de>  Wed, 01 May 2013 21:07:41 +0200
 
diff --git a/etc/x2gobroker.conf b/etc/x2gobroker.conf
index a64361b..c698f87 100644
--- a/etc/x2gobroker.conf
+++ b/etc/x2gobroker.conf
@@ -45,11 +45,6 @@
 # check_credentials to false, below) and offer one of several pre-configured
 # X2Go servers running the same setup.
 
-# 4. backend = ldap
-# A production backend that stores all session profile, server and session
-# profile mapping in LDAP
-
-
 # Allow unauthenticated connections? Then set check-credentials to false.
 #check-credentials = true
 
@@ -76,12 +71,6 @@
 # use this URL base to create URL field in UCCS-style JSON output
 #my-uccs-url-base = http://localhost:8080/
 
-# enable {base_url}/json/ (THIS IS FUTURE, mg-20121129)
-#enable-json-output = false
-
-# enable {base_url}/html/ (THIS IS FUTURE, mg-20121129)
-#enable-html-output = false
-
 # default authentication mechanism for all broker backends
 #default-auth-mech = pam
 
@@ -207,10 +196,6 @@
 #
 # For small-scale deployments the IniFile backend is the recommended backend.
 
-# 4. backend = ldap (deactivated by default)
-# A production backend that stores all session profiles, servers and session
-# profile mapping in LDAP (MUSIC OF THE FUTURE!!!)
-
 [zeroconf]
 #enable = true
 #auth-mech = pam
@@ -222,7 +207,7 @@
 #enable = false
 #session-profiles = /etc/x2go/broker/x2gobroker-sessionprofiles.conf
 
-[ldap]
+#[ldap] -> MUSIC OF THE FUTURE
 #enable = false
 #auth-mech = ldap
 #user-db = ldap
diff --git a/sbin/x2gobroker b/sbin/x2gobroker
index c2ee335..63823b4 100755
--- a/sbin/x2gobroker
+++ b/sbin/x2gobroker
@@ -116,8 +116,6 @@ import x2gobroker.web.extras
 urls = ( ('/plain/(.*)', x2gobroker.web.plain.X2GoBrokerWeb,),
          ('/uccs/[a-zA-Z]*(/*)$', x2gobroker.web.uccs.X2GoBrokerWeb,),
          ('/uccs/(.*)/api/([0-9])(/*)$', x2gobroker.web.uccs.X2GoBrokerWebAPI,),
-#        ('/json/(.*)', x2gobroker.web.json.X2GoBrokerWeb,),
-#        ('/html/(.*)', x2gobroker.web.html.X2GoBrokerWeb,),
          ('/pubkeys(/*)$', x2gobroker.web.extras.X2GoBrokerPubKeyService,),
        )
 
diff --git a/x2gobroker/brokers/ldap_broker.py b/x2gobroker/brokers/ldap_broker.py
deleted file mode 100644
index 8f631ab..0000000
--- a/x2gobroker/brokers/ldap_broker.py
+++ /dev/null
@@ -1,33 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright (C) 2012 by Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
-# Copyright (C) 2012 by Oleksandr Shneyder <oleksandr.shneyder at obviously-nice.de>
-#
-# X2Go Session Broker is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# X2Go Session Broker is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program; if not, write to the
-# Free Software Foundation, Inc.,
-# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
-
-"""\
-L{ldap.X2GoBroker} class - a production X2GoBroker implementations that uses LDAP as configuration backend
-
-"""
-__NAME__ = 'x2gobroker-pylib'
-
-# modules
-import x2gobroker.base
-
-class X2GoBroker(x2gobroker.base.X2GoBroker):
-    """\
-
-    """
diff --git a/x2gobroker/web/html.py b/x2gobroker/web/html.py
deleted file mode 100644
index 0cfb97e..0000000
--- a/x2gobroker/web/html.py
+++ /dev/null
@@ -1,123 +0,0 @@
-#!/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 at obviously-nice.de>
-# Copyright (C) 2011-2012 by Heinz-Markus Graesing <heinz-m.graesing at obviously-nice.de>
-# Copyright (C) 2012 by Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
-#
-# X2Go Session Broker is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# X2Go Session Broker is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program; if not, write to the
-# Free Software Foundation, Inc.,
-# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
-
-# modules
-import tornado.web
-
-# Python X2Go Broker modules
-from x2gobroker.defaults import X2GOBROKER_DEFAULT_BACKEND as _X2GOBROKER_DEFAULT_BACKEND
-
-
-class X2GoBrokerWeb(tornado.web.RequestHandler):
-
-    http_header_items = {
-        'Content-Type': 'text/html; charset=utf-8',
-        'Expires': '+1h',
-    }
-
-    page = web.template.Template("""$def with (html_header_items, output)
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-<head>
-$for meta_tag in html_header_items["meta"]:
-    <meta $meta_tag="$html_header_items["meta"][meta_tag]">
-<title>$html_header_items['title']</title>
-</head>
-
-<body>
-$output
-</body>
-</html>
-"""
-    )
-    html_header_items = {
-        'title':  'X2Go Session Broker',
-        'meta': {
-            'author': 'X2Go Developers <x2go-dev at lists.berlios.de>',
-            'charset': 'utf-8',
-            'keywords': 'X2Go',
-            'description': 'X2Go Session Broker',
-        },
-    }
-
-    def _gen_http_header(self):
-
-        for http_header_item in self.http_header_items.keys():
-            self.set_header(http_header_item, self.http_header_items[http_header_item])
-
-    def get(self, backend):
-        return self.post(backend)
-
-    def post(self, backend):
-
-        self._gen_http_header()
-
-        if not backend:
-            backend = _X2GOBROKER_DEFAULT_BACKEND
-        else:
-            backend = backend.rstrip('/')
-
-        # silence pyflakes...
-        broker_backend = None
-        try:
-            # dynamically detect broker backend from given URL
-            exec("import x2gobroker.brokers.{backend}_broker".format(backend=backend))
-            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(405)
-
-        global_config = broker_backend.get_global_config()
-        backend_config = broker_backend.get_backend_config(backend)
-
-        if not backend_config['enable']:
-            raise tornado.web.HTTPError(404)
-
-        username = self.get_argument('user', default='')
-        password = self.get_argument('password', default='')
-        cookie = self.get_argument('cookie', default='')
-        task = self.get_argument('task')
-        profile_id = self.get_argument('sid', default='')
-        new_password = self.get_argument('newpass', default='')
-
-        output = ''
-
-        if broker_backend.check_access(username=username, password=password, authid=authid):
-
-            ###
-            ### CONFIRM SUCCESSFUL AUTHENTICATION FIRST
-            ###
-
-            output += "<strong>Access granted</strong><br>"
-
-            if task:
-
-                ###
-                ### WORK TODO HERE!!!
-                ###
-                pass
-
-            self.write(output)
-            return
-
-        raise tornado.web.HTTPError(401)
-
diff --git a/x2gobroker/web/json.py b/x2gobroker/web/json.py
deleted file mode 100644
index 2e97f89..0000000
--- a/x2gobroker/web/json.py
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/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 at obviously-nice.de>
-# Copyright (C) 2011-2012 by Heinz-Markus Graesing <heinz-m.graesing at obviously-nice.de>
-# Copyright (C) 2012 by Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
-#
-# X2Go Session Broker is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# X2Go Session Broker is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program; if not, write to the
-# Free Software Foundation, Inc.,
-# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
-
-# modules
-import tornado.web
-
-
-class X2GoBrokerWeb(tornado.web.RequestHandler):
-
-    # MUSIC OF THE FUTURE
-    pass
\ No newline at end of file


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).




More information about the x2go-commits mailing list