ADDONS GUIDE

Module:pyfileserver
Author: Ho Chun Wei, fuzzybr80(at)gmail.com
Project:PyFileServer, http://pyfilesync.berlios.de/
Copyright: Lesser GNU Public License, see LICENSE file attached with package

This section describes the addons available:


windowsdomaincontroller

Module:pyfileserver.addons.windowsdomaincontroller
Author:Ho Chun Wei, fuzzybr80(at)gmail.com
Project:PyFileServer, http://pyfilesync.berlios.de/
Copyright:Lesser GNU Public License, see LICENSE file attached with package

Purpose

Usage:

from pyfileserver.addons.windowsdomaincontroller import SimpleWindowsDomainController
domaincontroller = SimpleWindowsDomainController(presetdomain = None, presetserver = None)

where:

  • domaincontroller object corresponds to that in PyFileServer.conf or as input into pyfileserver.httpauthentication.HTTPAuthenticator.
  • presetdomain allows the admin to specify a domain to be used (instead of any domain that may come as part of the username in domain\user). This is useful only if there is one domain to be authenticated against and you want to spare users from typing the domain name
  • presetserver allows the admin to specify the NETBIOS name of the domain controller to be used (complete with the preceding \\). if absent, it will look for trusted domain controllers on the localhost.

This class allows the user to authenticate against a Windows NT domain or a local computer, requires NT or beyond (2000, XP, 2003, etc).

This class requires Mark Hammond's Win32 extensions for Python at here or sourceforge

Information on Win32 network authentication was from the following resources:

Testability and caveats

Digest Authentication

Digest authentication requires the password to be retrieve from the system to compute the correct digest for comparison. This is sofar impossible (and indeed would be a big security loophole if it was allowed), so digest authentication WILL not work with this class.

Highly recommend basic authentication over SSL support.

User Login

Authentication will count as a user login attempt, so any security in place for invalid password attempts may be triggered.

Also note that, even though the user is logged in, the application does not impersonate the user - the application will continue to run under the account and permissions it started with. The user has the read/write permissions to the share of the running account and not his own account.

Using on a local computer
This class has been tested on a local computer (Windows XP). Leave domain as None and do not specify domain when entering username in this case.
Using for a network domain
This class is being tested for a network domain (I'm setting one up to test).

simplemysqlabstractionlayer

Module:pyfileserver.addons.simplemysqlabstractionlayer
Author:Ho Chun Wei, fuzzybr80(at)gmail.com
Project:PyFileServer, http://pyfilesync.berlios.de/
Copyright:Lesser GNU Public License, see LICENSE file attached with package

This module is specific to the PyFileServer application. It provides a classes SimpleMySQLResourceAbstractionLayer.

Usage:

(see PyFileServer-example.conf)
SimpleMySQLResourceAbstractionLayer(host, user, passwd, db)

host - host of database server
user - username to access database
passwd - passwd to access database
db - name of database on database server

The SimpleMySQLResourceAbstractionLayer provides a very basic, read-only resource layer emulation of a MySQL database. It provides the following interface:

This is a very basic interface and below is a by no means thorough summary of its limitations:

Abstraction Layers must provide the methods as described in abstractionlayerinterface

See extrequestserver.py for more information about resource abstraction layers in PyFileServer


Last Generated : Wed, 31 Aug 2005 07:10:19 GMT