views:

46

answers:

1

Hi everyone,

is it possible to read personal digital certificates with extension Pcks#7 ( http://en.wikipedia.org/wiki/X.509#Certificate_filename_extensions ) with python? I have to develop an application using Django that authenticate its users by reading their certificate.

In an initial step we are going to use an external services to accomplish this but it would be nice to understand how to develop a personal solution.

Any information about the subject is higly appreciated, thanks!

Federico

A: 

You've tagged your question with "django" and you've mentioned logging in users using certificates. Sorry to say the rest of your question doesn't make much sense to me.

If your question is "How to I authenticate users in my Django website using SSL certificate authentication?"

Then my suggestion would be to use apache to handle the authentication:
http://httpd.apache.org/docs/2.0/ssl/ssl_howto.html#accesscontrol

And write yourself custom authentication backend to hook this up with Django.
http://docs.djangoproject.com/en/dev/topics/auth/#authentication-backends

Not tried it myself, I presume it's possible to get mod_ssl to place something useful in the request environment.

MattH
sorry, I have forgotten to mention Django, yes, I'm using Django and Python. We need to use personal digital certificates to authenticate users, we'll have to deal with many types of certificates, but the most important ones are pkcs7 and pkcs12 ( en.wikipedia.org/wiki/X.509 ). Sorry for not being more specific, is that I don't know much about this subject and that's why I came here hoping someone would give me some suggestion to look for more information. Now I'll edit the question so it's clearer. Thanks
nemesisdesign
The way the certificates are packaged for customers, as far as I'm aware, is entirely irrelevant to your web service. Again, as far as I'm aware, pkcs7 are pkcs12 are just ways that certificates are packaged for distribution to users and not a particular concern to your web app. Look at apache ssl document I've linked in my answer.
MattH
ok thanks for your help
nemesisdesign