mirror of
https://github.com/ansible-middleware/keycloak.git
synced 2025-04-04 09:50:29 -07:00
Access token lifespan is too short for ansible run
This commit is contained in:
parent
0d0e52f9ff
commit
d1859aaff2
3 changed files with 18 additions and 1 deletions
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
@ -16,4 +16,4 @@ jobs:
|
|||
with:
|
||||
fqcn: 'middleware_automation/keycloak'
|
||||
molecule_tests: >-
|
||||
[ "default", "overridexml", "https_revproxy", "quarkus", "quarkus-devmode", "quarkus_upgrade", "debian", "quarkus_ha" ]
|
||||
[ "default", "overridexml", "https_revproxy", "quarkus", "quarkus-devmode", "quarkus_upgrade", "debian", "quarkus_ha" ]
|
||||
|
|
|
@ -110,3 +110,6 @@
|
|||
loop_control:
|
||||
loop_var: client
|
||||
when: "'users' in client"
|
||||
|
||||
- name: Provide Access token lifespan
|
||||
ansible.builtin.include_tasks: manage_token_lifespan.yml
|
||||
|
|
14
roles/keycloak_realm/tasks/manage_token_lifespan.yml
Normal file
14
roles/keycloak_realm/tasks/manage_token_lifespan.yml
Normal file
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
- name: "Update Access token lifespan"
|
||||
ansible.builtin.uri:
|
||||
url: "{{ keycloak_url }}{{ keycloak_context }}/admin/realms/{{ keycloak_realm }}"
|
||||
method: PUT
|
||||
body:
|
||||
accessTokenLifespan: 300
|
||||
validate_certs: false
|
||||
body_format: json
|
||||
status_code:
|
||||
- 200
|
||||
- 204
|
||||
headers:
|
||||
Authorization: "Bearer {{ keycloak_auth_response.json.access_token }}"
|
Loading…
Add table
Reference in a new issue