fix: group matching in oauthproxy with keycloak

This commit is contained in:
2023-06-07 08:01:04 +00:00
parent 8e2daf02be
commit 2bae3bd42e
2 changed files with 25 additions and 2 deletions

View File

@@ -69,6 +69,28 @@
web_origins: '{{ keycloak_clients[item]["redirect_uris"] }}'
frontchannel_logout: False
protocol: openid-connect
protocol_mappers:
- config:
accesss.token.claim: true
claim.name: "groups"
id.token.claim: true
userinfo.token.claim: true
full.path: false
id: "{{ keycloak_clients[item]['keycloak_id'] | regex_replace('^(?P<X>.{2})(.)', '\\g<X>' ~ '1') }}"
consentRequired: false
protocol: "openid-connect"
protocolMapper: "oidc-group-membership-mapper"
name: "client-group-mapper"
- config:
included.client.audience: '{{ keycloak_clients[item]["client_id"] }}'
id.token.claim: false
access.token.claim: true
id: "{{ keycloak_clients[item]['keycloak_id'] | regex_replace('^(?P<X>.{2})(.)', '\\g<X>' ~ '2') }}"
# ist das regex zu stark bist du zu schwach
consentRequired: false
protocol: "openid-connect"
protocolMapper: "oidc-audience-mapper"
name: "aud-mapper-client"
with_items: "{{ keycloak_clients.keys() | list }}"
- name: Update master realm settings