|
Size: 558
Comment:
|
Size: 2053
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 1: | Line 1: |
| Sage doesn't install python-ldap nicely via easy_install (tested with 4.7 on CentOS 5.6 and OS X 10.6 -- same failure). Looks like it is a problem with the egg setup.cfg (2.3.5 to 2.3.9 from [here|http://www.python-ldap.org/download.shtml]. This forced me to do an install from a CVS checkout of python-ldap. I then had [OpenLDAP|http://www.openldap.org/software/download/] and [BerkeleyDB|http://www.oracle.com/technetwork/database/berkeleydb/overview/] problems, so these were installed from the latest source versions (2.4.5 and 5.2.28 respectively). | Sage doesn't install python-ldap nicely via easy_install (tested with 4.7 on CentOS 5.6 and OS X 10.6 -- same failure). Looks like it is a problem with the egg setup.cfg (2.3.5 to 2.3.9 from [[http://www.python-ldap.org/download.shtml|here]]). This forced me to do an install from a CVS checkout of python-ldap. I then had [[http://www.openldap.org/software/download/|OpenLDAP]] and [[http://www.oracle.com/technetwork/database/berkeleydb/overview/|BerkeleyDB]] problems, so these were installed from the latest source versions (2.4.5 and 5.2.28 respectively). For OpenLDAP, configure was run with: {{{#!highlight bash ./configure --with-cyrus-sasl --with-tls --prefix=/usr }}} For BerkeleyDB, configure was run with: {{{#!highlight bash cd build ../dist/configure --prefix=/usr }}} The main thing for installing python-ldap was getting the following lines set properly in setup.cfg: {{{#!highlight bash library_dirs = /usr/lib /usr/lib64 include_dirs = /usr/include /usr/include/sasl libs = ldap_r lber sasl2 ssl crypto requires = python libldap_r.so.2 }}} And then doing LDAP authentication is stupidly simple: {{{#!highlight python import ldap con = ldap.initialize('ldap://nebio-directory.in.hwlab') con.simple_bind_s("uid=ijstokes,cn=users,cn=portal,dc=nebiogrid,dc=org", "cleartext_password") }}} TODO list: 1. How is the UserManager passed to the notebook.Notebook() init method? 2. How to disable the Sage Notebook user manager? If the accounts are managed through LDAP, Sage Notebook gets a read-only view. 3. How to deal with the special accounts: _sage_, admin, guest, pub? 4. Where is configuration information stored, re: LDAP server, DN prefix, which UserManager to use? 5. Setup group-membership to mark some users as "admins". 6. Consider if Notebook can really know about all users, or if it is OK just to know about "users who have logged in since Notebook was started" (i.e. each login will add a user to the list). 7. Consider if fullname, homedir, etc. are useful. |
Sage doesn't install python-ldap nicely via easy_install (tested with 4.7 on CentOS 5.6 and OS X 10.6 -- same failure). Looks like it is a problem with the egg setup.cfg (2.3.5 to 2.3.9 from here). This forced me to do an install from a CVS checkout of python-ldap. I then had OpenLDAP and BerkeleyDB problems, so these were installed from the latest source versions (2.4.5 and 5.2.28 respectively).
For OpenLDAP, configure was run with:
1 ./configure --with-cyrus-sasl --with-tls --prefix=/usr
For BerkeleyDB, configure was run with:
The main thing for installing python-ldap was getting the following lines set properly in setup.cfg:
And then doing LDAP authentication is stupidly simple:
TODO list:
1. How is the UserManager passed to the notebook.Notebook() init method?
2. How to disable the Sage Notebook user manager? If the accounts are managed through LDAP, Sage Notebook gets a read-only view.
3. How to deal with the special accounts: _sage_, admin, guest, pub?
4. Where is configuration information stored, re: LDAP server, DN prefix, which UserManager to use?
5. Setup group-membership to mark some users as "admins".
6. Consider if Notebook can really know about all users, or if it is OK just to know about "users who have logged in since Notebook was started" (i.e. each login will add a user to the list).
7. Consider if fullname, homedir, etc. are useful.
