summaryrefslogtreecommitdiffstats
path: root/tests/helpers/http.py
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2015-05-05 12:37:31 -0400
committerSimo Sorce <simo@redhat.com>2015-05-07 10:50:12 -0400
commit93d4e52712767fe955f3a44a60a6c6f0f909423b (patch)
treeaba926ba11d3ebb79394cb16196221e5fb2732ab /tests/helpers/http.py
parentdfa2d200b460cc852ec10a8780fe3966dc0d5906 (diff)
downloadipsilon-93d4e52712767fe955f3a44a60a6c6f0f909423b.tar.gz
ipsilon-93d4e52712767fe955f3a44a60a6c6f0f909423b.tar.xz
ipsilon-93d4e52712767fe955f3a44a60a6c6f0f909423b.zip
Pull the GSSAPI principal out of the userattrs
This was originally getting the principal from the user object itself which meant it was looking for it in the database. Look in the attributes instead which are stored in the user session. Signed-off-by: Rob Crittenden <rcritten@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
Diffstat (limited to 'tests/helpers/http.py')
-rwxr-xr-xtests/helpers/http.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/helpers/http.py b/tests/helpers/http.py
index 0da7ee2..97098c8 100755
--- a/tests/helpers/http.py
+++ b/tests/helpers/http.py
@@ -94,8 +94,9 @@ class HttpSessions(object):
session = self.get_session(url)
allow_redirects = False
if krb:
- # In at least the test instance we don't get back a negotiate
- # blob to do mutual authentication against.
+ # python-requests-kerberos isn't too bright about doing mutual
+ # authentication and it tries to do it on any non-401 response
+ # which doesn't work in our case since we follow redirects.
kerberos_auth = HTTPKerberosAuth(mutual_authentication=OPTIONAL)
kwargs['auth'] = kerberos_auth
allow_redirects = True