The unified diff between revisions [c5eced75..] and [106139fa..] is displayed below. It can also be downloaded as a raw diff.
#
#
# rename "cgi-bin/openid.fcgi"
# to "uccid/server.py"
#
# add_dir "uccid"
#
# add_dir "www"
#
# add_file "cgi-bin/uccid.cgi"
# content [c5b1bfa3dda2d5452e4eca1721023a5ffe11ada7]
#
# add_file "cgi-bin/uccid.fcgi"
# content [0e6ef65357f3e2351b10858871d13b72ef56a005]
#
# add_file "cgi-bin/uccid.scgi"
# content [2431913f8bab6d265381bffda13258077c279ab1]
#
# add_file "config.py"
# content [645cab488b437b5d9146e6e04ba046bfb94773e4]
#
# patch "README"
# from [dfaee07c32342e0827715a659069b0016e8b0544]
# to [6be4afeeb6c2c2ccf2a83a8d56962922c92a320a]
#
# set "cgi-bin/uccid.cgi"
# attr "mtn:execute"
# value "true"
#
# set "cgi-bin/uccid.fcgi"
# attr "mtn:execute"
# value "true"
#
# set "cgi-bin/uccid.scgi"
# attr "mtn:execute"
# value "true"
#
# set "config.py"
# attr "mtn:execute"
# value "true"
#
============================================================
--- cgi-bin/uccid.cgi c5b1bfa3dda2d5452e4eca1721023a5ffe11ada7
+++ cgi-bin/uccid.cgi c5b1bfa3dda2d5452e4eca1721023a5ffe11ada7
@@ -0,0 +1,17 @@
+#!/usr/bin/env python2.4
+
+# UCCid, the UCC OpenID server.
+# http://ucc.asn.au/projects/uccid/
+
+# Standard libraries and path append.
+import os, sys
+
+# This is so we can access the uccid namespace.
+sys.path[0:0] = ["../"]
+
+# Import our config and the uccid library.
+import config, uccid
+
+# Run the per-request server.
+if __name__ == "__main__":
+ uccid.Server(config).run()
============================================================
--- cgi-bin/uccid.fcgi 0e6ef65357f3e2351b10858871d13b72ef56a005
+++ cgi-bin/uccid.fcgi 0e6ef65357f3e2351b10858871d13b72ef56a005
@@ -0,0 +1,17 @@
+#!/usr/bin/env python2.4
+
+# UCCid, the UCC OpenID server.
+# http://ucc.asn.au/projects/uccid/
+
+# Standard libraries and path append.
+import os, sys
+
+# This is so we can access the uccid namespace.
+sys.path[0:0] = ["../"]
+
+# Import our config and the uccid library.
+import config, uccid
+
+# Run the FastCGI server.
+if __name__ == "__main__":
+ uccid.Server(config).runfcgi()
============================================================
--- cgi-bin/uccid.scgi 2431913f8bab6d265381bffda13258077c279ab1
+++ cgi-bin/uccid.scgi 2431913f8bab6d265381bffda13258077c279ab1
@@ -0,0 +1,17 @@
+#!/usr/bin/env python2.4
+
+# UCCid, the UCC OpenID server.
+# http://ucc.asn.au/projects/uccid/
+
+# Standard libraries and path append.
+import os, sys
+
+# This is so we can access the uccid namespace.
+sys.path[0:0] = ["../"]
+
+# Import our config and the uccid library.
+import config, uccid
+
+# Run the SCGI server.
+if __name__ == "__main__":
+ uccid.Server(config).runscgi()
============================================================
--- config.py 645cab488b437b5d9146e6e04ba046bfb94773e4
+++ config.py 645cab488b437b5d9146e6e04ba046bfb94773e4
@@ -0,0 +1,58 @@
+#!/dev/null # Do not run
+
+# UCCid, the UCC OpenID server.
+# http://ucc.asn.au/projects/uccid/
+
+# This is a really simple python file used purely for configuration.
+# Each configuration option has some simple instructions on how
+# to use it.
+
+import uccid, uccid.identity, uccid.auth
+from uccid.auth import *
+from uccid.identity import *
+
+# Do you want to see error messages, ad et al?
+debug = True
+
+# The base directory of this install.
+base_dir = os.getcwd()
+
+# The UCCid server can provide several forms of identities using any number of
+# authentication methods. See below for a simple example. More information and
+# examples are available from the in-code documentation.
+
+# This will be a list of our identity providers. They will be tried in list
+# order so, if you're worried about performance, put your highest-throughput
+# identities first.
+identities = []
+
+# Here we use a regexp to parse the identity and turn it into a username. The
+# python-ldap only supports simple binds at the moment, but it is possible to
+# provide a CN with access to the entire database and query that way instead
+# of using a bind if you don't allow user binding on your server using by="dn"
+# and setting dn="cn=admin,..." or similar and cred="password" for the dn.
+auth_ucc = LdapAuthenticator(server="mussel.ucc.asn.au")
+
+# The result of the regexp will be passed as kwargs to the authenticator.
+# In this case we're using one authenticator, however you could use a list of
+# several to provide backups (default), or specify authenticate="all" to
+# authenticate against them all successfully, or authenticate="one" to try
+# them all for validity.
+id_ucc_regexp = re.compile('http://(?P(username)[a-z0-9-_]{5,})\.ucc\.(?:asn|gu\.uwa\.edu)\.au/')
+id_ucc = HttpDomainIdentityProvider(
+ regexp=id_ucc_regexp,
+ authenticator=auth_ldap)
+
+identities.append(id_ucc)
+
+# A different form of identifier and authentication again. This is done by
+# proxy using an IMAP server to authenticate.
+auth_tartarus = ImapAuthenticator(server="tartarus.uwa.edu.au")
+
+id_tartarus_regexp = re.compile('http://(?:student|tartarus)\.uwa\.edu\.au/~[a-zA-Z0-9-_]/')
+id_tartarus = HttpDomainIdentityProvider(
+ regexp=id_tartarus_regexp,
+ authenticator=auth_tartarus)
+
+identities.append(id_tartarus)
+
============================================================
--- README dfaee07c32342e0827715a659069b0016e8b0544
+++ README 6be4afeeb6c2c2ccf2a83a8d56962922c92a320a
@@ -1,5 +1,8 @@
-UCCid
------
+# UCCid - the UCC OpenID Server
+# -----------------------------
+# http://ucc.asn.au/projects/uccid/
Project to write a working UCC OpenID server.
+There's a lot of documentation and a great user story in the config.py.
+