Debian Codegraph @

test/integration/targets/uri/tasks/use_gssapi.yml

raw
1 - name: test that endpoint offers Negotiate auth
2 uri:
3 url: http://{{ httpbin_host }}/gssapi
4 status_code: 401
5 register: no_auth_failure
6 failed_when: no_auth_failure.www_authenticate != 'Negotiate'
7
8 - name: test Negotiate auth over HTTP with explicit credentials
9 uri:
10 url: http://{{ httpbin_host }}/gssapi
11 use_gssapi: yes
12 url_username: '{{ krb5_username }}'
13 url_password: '{{ krb5_password }}'
14 return_content: yes
15 register: http_explicit
16
17 - name: test Negotiate auth over HTTPS with explicit credentials
18 uri:
19 url: https://{{ httpbin_host }}/gssapi
20 use_gssapi: yes
21 url_username: '{{ krb5_username }}'
22 url_password: '{{ krb5_password }}'
23 return_content: yes
24 register: https_explicit
25
26 - name: assert test Negotiate auth with implicit credentials
27 assert:
28 that:
29 - http_explicit.status == 200
30 - http_explicit.content | trim == 'Microsoft Rulz'
31 - https_explicit.status == 200
32 - https_explicit.content | trim == 'Microsoft Rulz'
33
34 - name: skip tests on macOS, I cannot seem to get it to read a credential from a custom ccache
35 when: ansible_facts.distribution != 'MacOSX'
36 block:
37 - name: get Kerberos ticket for implicit auth tests
38 httptester_kinit:
39 username: '{{ krb5_username }}'
40 password: '{{ krb5_password }}'
41
42 - name: test Negotiate auth over HTTP with implicit credentials
43 uri:
44 url: http://{{ httpbin_host }}/gssapi
45 use_gssapi: yes
46 return_content: yes
47 register: http_implicit
48
49 - name: test Negotiate auth over HTTPS with implicit credentials
50 uri:
51 url: https://{{ httpbin_host }}/gssapi
52 use_gssapi: yes
53 return_content: yes
54 register: https_implicit
55
56 - name: assert test Negotiate auth with implicit credentials
57 assert:
58 that:
59 - http_implicit.status == 200
60 - http_implicit.content | trim == 'Microsoft Rulz'
61 - https_implicit.status == 200
62 - https_implicit.content | trim == 'Microsoft Rulz'