Hi everybody, here is my first post ^_^ !!
I'm a french student (so, please, excuse my english ;-)) in computer
sciences (master degree), and was really suprised by Turbogears ...
Looks very nice, isn't it. So, I decide to begin the devellopment of a
management software with it.
My problem : I set up a Single Sign In mechanism (based on shadowed nis
for obscure reasons) in the place the application will run, and I must
keep it, if I want to be really 'user-friendly' ^_^. So, I cant use the
IdentityFramework of the 0.9a4 realease ... what a shame !!
I had a look inside the 'soprovider.py' script, and I'm quiute sure
it's pretty easy to alter this file and adding unix like password
support :
1. altering the encrypt_password lambda from a 1 argument to a 2
arguments lambda
2. Doing the ad'hoc changes in the existant lambda definition
self.encrypt_password= lambda clear,crypted: md5.new(clear).hexdigest()
self.encrypt_password= lambda clear,crypted: sha.new(clear).hexdigest()
3. importing crypt module at the beginnning :
import crypt
4. Add something like the following before the else statement :
elif "unix"==algorithm:
self.encrypt_password= lambda clear,crypted:
crypt.crypt(clear,crypted).hexdigest()
5. While checking the password, give to encrypt_password the crypted
one :
try:
user= user_class.byUserId( user_name )
if user.password!=self.encrypt_password(password,user.password):
log.info( "Passwords don't match for user: %s", user_name )
return None
6. I must check if it's possible and find a way to crypt a password
from python in order to be Unix compliant. If it's possible, I think it
will be a great add to TurboGears framework.
My Idea is :
1. update the TG_user relationnal scheme for each password change
2. If a user want to change his password, he must use a script called
passwd.sh which do the following :
# step 1 : do your job
passwd
# step 2 : update the db scheme
/root/private/update_dbms.py
3. the 'update_dbms.py' script will do something like :
3.1 read the password file (shadowed or not, il depends)
3.2 keep lines with a uid > to XX (typically 1000)
3.3 update ad'hoc tuple in TG_user scheme if there is a change
I'm volounteer to do it, but I would like to be sure that it's a good
idea (and that nobody else is currently working on it ^_^).
Thank you for reading this so long message, please excuse my poor
english and ... God save TurboGears ?
--
Sebastian
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---