Sunday, September 29, 2013

django-ssl-auth

Hi everyone

I am running Django 1.5.2, using Apache 2.2.22, (WSGI) on Linux Ubuntu 12.10. I am a Django newbie and am trying to get my head around the following problem.

I am trying to utilise x509 user certificates for user login. Apache handles the request for the user certificate and validates against the CA certificate (I see this occurring in the Apache logs). The details within the certificate (name and email) will then need to be validated against the user details present in the pre-populated db (this is to implement).

My problem, is that I cannot seem to access the certificate details/information that are exchanged. I received feedback from Florian (Apollo13), who suggested looking in the "REMOTE_USER" of the request.META. I do not see this value within the META. I have also attempted to use the django-ssl-client-auth code provided by Kimmo (Kimvais). The code looks for "HTTP_X_SSL_USER_DN" within the META but I don't see this either (list of META values - https://dpaste.de/D9UW). None of the values I see, seems to contain anything about the certificate details that I see exchanged in the Apache log. Is the Apache exchange even available to Django/WSGI (I think it surely would be ) ?

There is some mention of using environmental variables, but this generally involves mod_python, which I'm not using.

I would be most appreciative of pointers or directions to help clear up my misunderstanding / lack of knowledge.

Liam



--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment