aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Elkins <melkins@tislabs.com>2011-01-22 16:39:48 +0000
committerMichael Elkins <melkins@tislabs.com>2011-01-22 16:39:48 +0000
commite84a4a71b033eb6fffce1c44a63d45babbecbf63 (patch)
tree544ac479afb3353420bfed3c00baf6380e6dbb76
parent7ae467df17dd1694dbf54e6f46d20dc6651ced8d (diff)
revert back to using Django's built in authentication rather than HTTP Digest auth now that rpkidemo can log in via Django
svn path=/portal-gui/Makefile.in; revision=3634
-rw-r--r--portal-gui/Makefile.in2
-rw-r--r--portal-gui/apache/rpki.conf.in17
-rw-r--r--portal-gui/rpkigui/myrpki/views.py5
-rw-r--r--portal-gui/rpkigui/settings.py.in5
4 files changed, 11 insertions, 18 deletions
diff --git a/portal-gui/Makefile.in b/portal-gui/Makefile.in
index 5a38905e..ea6a4b25 100644
--- a/portal-gui/Makefile.in
+++ b/portal-gui/Makefile.in
@@ -128,8 +128,6 @@ install-data: $(BUILD)
for f in $(INSTALL_FILES); do \
install $$f $(INSTDIR)/$$f; \
done
- touch $(INSTDIR)/htpasswd
- chmod 644 $(INSTDIR)/htpasswd
cd $(INSTDIR)/rpkigui && $(PYTHON) manage.py syncdb
install: install-data install-perms
diff --git a/portal-gui/apache/rpki.conf.in b/portal-gui/apache/rpki.conf.in
index 6c77823b..fca4627f 100644
--- a/portal-gui/apache/rpki.conf.in
+++ b/portal-gui/apache/rpki.conf.in
@@ -1,5 +1,4 @@
# sample apache configuration file for using the portal-gui with mod_wsgi
-# @configure_input@
# defines the url to the portal-gui
WSGIScriptAlias / @INSTDIR@/apache/rpki.wsgi
@@ -9,14 +8,14 @@ Allow from all
</Directory>
# enable http digest auth
-<Location /accounts/login>
-AuthType digest
-AuthName "rpki"
-AuthDigestDomain /
-AuthDigestProvider file
-AuthUserFile @INSTDIR@/htpasswd
-Require valid-user
-</Location>
+#<Location /accounts/login>
+#AuthType digest
+#AuthName "rpki"
+#AuthDigestDomain /
+#AuthDigestProvider file
+#AuthUserFile @INSTDIR@/htpasswd
+#Require valid-user
+#</Location>
# media for the /admin/ site
Alias /media/ /usr/lib/python2.6/site-packages/django/contrib/admin/media/
diff --git a/portal-gui/rpkigui/myrpki/views.py b/portal-gui/rpkigui/myrpki/views.py
index 206d334f..f15ebbdd 100644
--- a/portal-gui/rpkigui/myrpki/views.py
+++ b/portal-gui/rpkigui/myrpki/views.py
@@ -554,9 +554,4 @@ def upload_myrpki_xml(request, self_handle):
return serve_file(self_handle, 'myrpki.xml', 'application/xml')
-# apache is configured to set REMOTE_USER when the user visits /accounts/login/
-# simply redirect to the dashboard page since the user will already be logged in
-def login(request):
- return http.HttpResponseRedirect('/myrpki/')
-
# vim:sw=4 ts=8 expandtab
diff --git a/portal-gui/rpkigui/settings.py.in b/portal-gui/rpkigui/settings.py.in
index 178d6010..d9ae3fb4 100644
--- a/portal-gui/rpkigui/settings.py.in
+++ b/portal-gui/rpkigui/settings.py.in
@@ -66,7 +66,7 @@ MIDDLEWARE_CLASSES = (
'django.contrib.auth.middleware.AuthenticationMiddleware',
# uncomment if using apache basic/digest http auth
- 'django.contrib.auth.middleware.RemoteUserMiddleware',
+ #'django.contrib.auth.middleware.RemoteUserMiddleware',
# order is important here. if csrfmidware is put before condgetmidware,
# the returned pages get truncated for some reason!
@@ -104,7 +104,8 @@ TEMPLATE_CONTEXT_PROCESSORS = (
# uncomment if using apache basic/digest http auth
AUTHENTICATION_BACKENDS = (
- 'django.contrib.auth.backends.RemoteUserBackend',
+ #'django.contrib.auth.backends.RemoteUserBackend',
+ 'django.contrib.auth.backends.ModelBackend',
)
# Top of directory tree where rpki.conf, etc are stored for each