mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-05 17:55:11 +00:00
Keycloak client scope support (#10842)
* first commit
* sanity
* fixe test
* trailing white space
* sanity
* Fragment
* test sanity
* Update changelogs/fragments/10842-keycloak-client-scope-support.yml
* Update plugins/modules/keycloak_client.py
* add client_scopes_behavior
* Sanity
* Sanity
* Update plugins/modules/keycloak_client.py
* Fix typo.
* Update plugins/modules/keycloak_client.py
* Update plugins/modules/keycloak_client.py
* Update plugins/modules/keycloak_client.py
* Update plugins/modules/keycloak_client.py
---------
(cherry picked from commit f34842b7b2)
Co-authored-by: desand01 <desrosiers.a@hotmail.com>
Co-authored-by: Andre Desrosiers <andre.desrosiers@ssss.gouv.qc.ca>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
97 lines
No EOL
2.9 KiB
YAML
97 lines
No EOL
2.9 KiB
YAML
---
|
|
# Copyright (c) Ansible Project
|
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
url: http://localhost:8080/auth
|
|
admin_realm: master
|
|
admin_user: admin
|
|
admin_password: password
|
|
realm: myrealm
|
|
client_id: myclient
|
|
client_id_2: mynewclient
|
|
role: myrole
|
|
description_1: desc 1
|
|
description_2: desc 2
|
|
|
|
auth_args:
|
|
auth_keycloak_url: "{{ url }}"
|
|
auth_realm: "{{ admin_realm }}"
|
|
auth_username: "{{ admin_user }}"
|
|
auth_password: "{{ admin_password }}"
|
|
|
|
redirect_uris1:
|
|
- "http://example.c.com/"
|
|
- "http://example.b.com/"
|
|
- "http://example.a.com/"
|
|
|
|
client_attributes1: {"backchannel.logout.session.required": true, "backchannel.logout.revoke.offline.tokens": false, "oauth2.device.authorization.grant.enabled": true, "client.secret.creation.time": 0}
|
|
|
|
client_attributes2: {"backchannel.logout.session.required": false, "oauth2.device.authorization.grant.enabled": false, "client.secret.creation.time": 0}
|
|
|
|
protocol_mappers1:
|
|
- name: 'email'
|
|
protocol: 'openid-connect'
|
|
protocolMapper: 'oidc-usermodel-property-mapper'
|
|
config:
|
|
"claim.name": "email"
|
|
"user.attribute": "email"
|
|
"jsonType.label": "String"
|
|
"id.token.claim": true
|
|
"access.token.claim": true
|
|
"userinfo.token.claim": true
|
|
|
|
- name: 'email_verified'
|
|
protocol: 'openid-connect'
|
|
protocolMapper: 'oidc-usermodel-property-mapper'
|
|
config:
|
|
"claim.name": "email_verified"
|
|
"user.attribute": "emailVerified"
|
|
"jsonType.label": "boolean"
|
|
"id.token.claim": true
|
|
"access.token.claim": true
|
|
"userinfo.token.claim": true
|
|
|
|
- name: 'family_name'
|
|
protocol: 'openid-connect'
|
|
protocolMapper: 'oidc-usermodel-property-mapper'
|
|
config:
|
|
"claim.name": "family_name"
|
|
"user.attribute": "lastName"
|
|
"jsonType.label": "String"
|
|
"id.token.claim": "true"
|
|
"access.token.claim": "true"
|
|
"userinfo.token.claim": "true"
|
|
|
|
protocol_mappers2_unordered:
|
|
- "{{ protocol_mappers1[2] }}"
|
|
- "{{ protocol_mappers1[1] }}"
|
|
- "{{ protocol_mappers1[0] }}"
|
|
|
|
protocol_mappers3_modifed:
|
|
- "{{ protocol_mappers1[2] }}"
|
|
- name: address
|
|
protocol: openid-connect
|
|
protocolMapper: oidc-address-mapper
|
|
consentRequired: false
|
|
config:
|
|
user.attribute.formatted: formatted
|
|
user.attribute.country: country
|
|
introspection.token.claim: 'true'
|
|
user.attribute.postal_code: postal_code
|
|
userinfo.token.claim: 'true'
|
|
user.attribute.street: street
|
|
id.token.claim: 'true'
|
|
user.attribute.region: region
|
|
access.token.claim: 'true'
|
|
user.attribute.locality: locality
|
|
- name: 'email'
|
|
protocol: 'openid-connect'
|
|
protocolMapper: 'oidc-usermodel-property-mapper'
|
|
config:
|
|
"claim.name": "email"
|
|
"user.attribute": "email"
|
|
"jsonType.label": "String"
|
|
"id.token.claim": true
|
|
"access.token.claim": false
|
|
"userinfo.token.claim": true |