From 4a04d297bdd276b7bd9fbd1565c9c7dcfc87ee95 Mon Sep 17 00:00:00 2001 From: Brian Waldon Date: Wed, 25 Jan 2012 10:37:33 -0800 Subject: Return 403 instead of 401 when policies reject Fixes bug 921744 Change-Id: Ib4b6405dffa3ee2e8ef2b8a7710124f97f0fdf43 --- nova/api/openstack/wsgi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nova/api') diff --git a/nova/api/openstack/wsgi.py b/nova/api/openstack/wsgi.py index 8a7a077b8..26f6cc97f 100644 --- a/nova/api/openstack/wsgi.py +++ b/nova/api/openstack/wsgi.py @@ -573,7 +573,7 @@ class ResourceExceptionHandler(object): if isinstance(ex_value, exception.NotAuthorized): msg = unicode(ex_value) - raise Fault(webob.exc.HTTPUnauthorized(explanation=msg)) + raise Fault(webob.exc.HTTPForbidden(explanation=msg)) elif isinstance(ex_value, TypeError): LOG.exception(ex_value) raise Fault(webob.exc.HTTPBadRequest()) -- cgit