mirror of
https://github.com/ansible-middleware/keycloak.git
synced 2025-04-09 04:10:27 -07:00
ci: https_revproxy molecule verify step
This commit is contained in:
parent
a0f6a4931f
commit
8af5d6e556
1 changed files with 10 additions and 16 deletions
|
@ -11,29 +11,23 @@
|
||||||
- ansible_facts.services["keycloak.service"]["state"] == "running"
|
- ansible_facts.services["keycloak.service"]["state"] == "running"
|
||||||
- ansible_facts.services["keycloak.service"]["status"] == "enabled"
|
- ansible_facts.services["keycloak.service"]["status"] == "enabled"
|
||||||
|
|
||||||
- name: Set internal envvar
|
|
||||||
ansible.builtin.set_fact:
|
|
||||||
hera_home: "{{ lookup('env', 'HERA_HOME') }}"
|
|
||||||
|
|
||||||
- name: Verify openid config
|
- name: Verify openid config
|
||||||
|
run_once: True
|
||||||
block:
|
block:
|
||||||
- name: Fetch openID config # noqa blocked_modules command-instead-of-module
|
- name: Fetch openID config # noqa blocked_modules command-instead-of-module
|
||||||
ansible.builtin.shell: |
|
ansible.builtin.uri:
|
||||||
set -o pipefail
|
url: https://localhost:443/realms/master/.well-known/openid-configuration
|
||||||
curl https://localhost:443/realms/master/.well-known/openid-configuration -H "Host: proxy" -k -s | jq .
|
validate_certs: false
|
||||||
args:
|
headers:
|
||||||
executable: /bin/bash
|
Host: proxy
|
||||||
register: openid_config
|
register: openid_config
|
||||||
changed_when: False
|
changed_when: False
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
- name: Verify endpoint URLs
|
- name: Verify endpoint URLs
|
||||||
ansible.builtin.assert:
|
ansible.builtin.assert:
|
||||||
that:
|
that:
|
||||||
- (openid_config.stdout | from_json)["backchannel_authentication_endpoint"] == 'https://proxy/realms/master/protocol/openid-connect/ext/ciba/auth'
|
- openid_config.json["backchannel_authentication_endpoint"] == 'https://proxy/realms/master/protocol/openid-connect/ext/ciba/auth'
|
||||||
- (openid_config.stdout | from_json)['issuer'] == 'https://proxy/realms/master'
|
- openid_config.json['issuer'] == 'https://proxy/realms/master'
|
||||||
- (openid_config.stdout | from_json)['authorization_endpoint'] == 'https://proxy/realms/master/protocol/openid-connect/auth'
|
- openid_config.json['authorization_endpoint'] == 'https://proxy/realms/master/protocol/openid-connect/auth'
|
||||||
- (openid_config.stdout | from_json)['token_endpoint'] == 'https://proxy/realms/master/protocol/openid-connect/token'
|
- openid_config.json['token_endpoint'] == 'https://proxy/realms/master/protocol/openid-connect/token'
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
when:
|
|
||||||
- hera_home is defined
|
|
||||||
- hera_home | length == 0
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue