-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi all,
I have found a way of authenticating users against an existing SAMBA-PDC (usefull for intranets, so users don't need to remember another username/password, they just use the one the have for Windows-login):
It works with smbauth (http://www.tekrat.com/smbauth/smbauth.html) and the most recent tarball-version of webware (0.8.1):
I reused the AdminPage-code and rewrote the "isValidUserAndPassword"-method as follows:
~ def isValidUserAndPassword(self, username, password): ~ '''Checks if user and password are ok ~ ''' ~ if smbauth.validate(self.nthostname, ~ self.ntdomain, ~ self.ntgroup, ~ username, ~ password) == 0: ~ return True ~ else: # Failure ~ return False
smbauth is imported at the beginning with
import smbauth
"self.nthostname", "self.ntdomain", "self.ntgroup" are set via a simple config-file which is called in
__init__(self):
Overall, the result should be the same as for the dummy function provided with the example, only authentication works with "real" username/passwords (will be transfered with https, no clear-text), return-values are the same, etc.
The problem now is:
I can log in and log out and log in (as expected) but if I restart the AppServer inbetween (i.e. log in, log out, restart AppServer, log in again) I get the following error
Traceback (most recent call last): ~ File "WebKit/Application.py", line 395, in dispatchRequest ~ File "WebKit/Application.py", line 494, in isSessionIdProblematic ~ File "WebKit/HTTPRequest.py", line 222, in session ~ File "WebKit/Transaction.py", line 67, in session ~ File "WebKit/Application.py", line 963, in createSessionForTransaction ~ File "WebKit/Application.py", line 789, in session ~ File "WebKit/SessionDynamicStore.py", line 72, in __getitem__ ~ File "WebKit/SessionDynamicStore.py", line 135, in MovetoMemory ~ File "WebKit/SessionFileStore.py", line 55, in __getitem__ KeyError: '20040713111001-3e83ea8c9b5c61ee58eae562fbb0b712'
which is strange, because this does not happen with the dummy-login-function (and otherwise unchanged code).
I presume, that something goes wrong with the session-cookie, I just don't know what and why. The situation can be solved by manually deleting the appropriate session-file in ~/Sessions, but this can't be a sollution, I think.
If someone stumbled over a similar problem, please let me know.
If you need more information (complete traceback etc.), please let me know.
Thanks in advance.
- -- Bye, Marc Saric
Dr. Marc Saric, Bioinformatik, Proteom Centrum T�bingen, Paul-Ehrlich-Str. 15, D-72076 T�bingen, Germany, Tel: +49 (0)7071 29 77645, [EMAIL PROTECTED] http://www.proteom-centrum-tuebingen.de
- -- Bye, Marc Saric http://www.marcsaric.de -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFA9OZTvKxJUF29wRIRAgi4AJ9Ijw4WFuD8gW1zg/3ctnCRHrIdDgCbBO4z jTJFPPGq6enAX5jg7HMGsoA= =ZpfH -----END PGP SIGNATURE-----
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss
