views:

25

answers:

1

I have a set of URL's in my django application that trigger certain actions or processes. This would be similar to cron jobs. I have a script that polls one or more of these URLS at some regular inverval and I'm interested in adding a layer of security.

I'd like to set up an account for the script and require authentication before the proccesses would execute. I've been reading around in the Django user authentication documentation, along with python's urllib2 library and I'm just a bit lost. I have some ideas of how this might be done, but I dont' have a lot of experience in security like this.

Any suggested reading materials?

+1  A: 

I have a script that polls one or more of these URLS at some regular inverval and I'm interested in adding a layer of security.

Have you considered using Celery? Celery works seamlessly with Django. This will let you periodically run jobs using the same authentication mechanism as the rest of the project. You can also make things a bit more uniform by avoiding urllib2.

Manoj Govindan
Very cool. I've been writing my own ghetto version of exactly what this does. This looks fantastic.
Aaron Merriam