1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Add support for docker-v2 protocol in Keycloak modules (#8216)

* Add support for docker-v2 protocol in Keycloak modules

* use dash instead of underscore for the docker-v2

* Update documentation

* Add changelog fragment

* fix missing whitespace around operator

* Update changelogs/fragments/8215-add-docker-v2-protocol.yml

Update changelog fragment to reviewers suggestion, add refrence to issue and pull request

Co-authored-by: Felix Fontein <felix@fontein.de>

* Add documentation about adding docker-v2 value in community general 8.6.0

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
Anders Stiksrud Helmen 2024-04-20 09:24:00 +02:00 committed by GitHub
parent 12b76ead29
commit a5b2b5ce8c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 18 additions and 12 deletions

View file

@ -0,0 +1,2 @@
minor_changes:
- keycloak_client, keycloak_clientscope, keycloak_clienttemplate - added ``docker-v2`` protocol support, enhancing alignment with Keycloak's protocol options (https://github.com/ansible-collections/community.general/issues/8215, https://github.com/ansible-collections/community.general/pull/8216).

View file

@ -248,8 +248,9 @@ options:
description: description:
- Type of client. - Type of client.
- At creation only, default value will be V(openid-connect) if O(protocol) is omitted. - At creation only, default value will be V(openid-connect) if O(protocol) is omitted.
- The V(docker-v2) value was added in community.general 8.6.0.
type: str type: str
choices: ['openid-connect', 'saml'] choices: ['openid-connect', 'saml', 'docker-v2']
full_scope_allowed: full_scope_allowed:
description: description:
@ -393,7 +394,7 @@ options:
protocol: protocol:
description: description:
- This specifies for which protocol this protocol mapper is active. - This specifies for which protocol this protocol mapper is active.
choices: ['openid-connect', 'saml'] choices: ['openid-connect', 'saml', 'docker-v2']
type: str type: str
protocolMapper: protocolMapper:
@ -724,6 +725,7 @@ import copy
PROTOCOL_OPENID_CONNECT = 'openid-connect' PROTOCOL_OPENID_CONNECT = 'openid-connect'
PROTOCOL_SAML = 'saml' PROTOCOL_SAML = 'saml'
PROTOCOL_DOCKER_V2 = 'docker-v2'
CLIENT_META_DATA = ['authorizationServicesEnabled'] CLIENT_META_DATA = ['authorizationServicesEnabled']
@ -785,7 +787,7 @@ def main():
consentText=dict(type='str'), consentText=dict(type='str'),
id=dict(type='str'), id=dict(type='str'),
name=dict(type='str'), name=dict(type='str'),
protocol=dict(type='str', choices=[PROTOCOL_OPENID_CONNECT, PROTOCOL_SAML]), protocol=dict(type='str', choices=[PROTOCOL_OPENID_CONNECT, PROTOCOL_SAML, PROTOCOL_DOCKER_V2]),
protocolMapper=dict(type='str'), protocolMapper=dict(type='str'),
config=dict(type='dict'), config=dict(type='dict'),
) )
@ -819,7 +821,7 @@ def main():
authorization_services_enabled=dict(type='bool', aliases=['authorizationServicesEnabled']), authorization_services_enabled=dict(type='bool', aliases=['authorizationServicesEnabled']),
public_client=dict(type='bool', aliases=['publicClient']), public_client=dict(type='bool', aliases=['publicClient']),
frontchannel_logout=dict(type='bool', aliases=['frontchannelLogout']), frontchannel_logout=dict(type='bool', aliases=['frontchannelLogout']),
protocol=dict(type='str', choices=[PROTOCOL_OPENID_CONNECT, PROTOCOL_SAML]), protocol=dict(type='str', choices=[PROTOCOL_OPENID_CONNECT, PROTOCOL_SAML, PROTOCOL_DOCKER_V2]),
attributes=dict(type='dict'), attributes=dict(type='dict'),
full_scope_allowed=dict(type='bool', aliases=['fullScopeAllowed']), full_scope_allowed=dict(type='bool', aliases=['fullScopeAllowed']),
node_re_registration_timeout=dict(type='int', aliases=['nodeReRegistrationTimeout']), node_re_registration_timeout=dict(type='int', aliases=['nodeReRegistrationTimeout']),

View file

@ -79,7 +79,8 @@ options:
protocol: protocol:
description: description:
- Type of client. - Type of client.
choices: ['openid-connect', 'saml', 'wsfed'] - The V(docker-v2) value was added in community.general 8.6.0.
choices: ['openid-connect', 'saml', 'wsfed', 'docker-v2']
type: str type: str
protocol_mappers: protocol_mappers:
@ -95,7 +96,7 @@ options:
description: description:
- This specifies for which protocol this protocol mapper. - This specifies for which protocol this protocol mapper.
- is active. - is active.
choices: ['openid-connect', 'saml', 'wsfed'] choices: ['openid-connect', 'saml', 'wsfed', 'docker-v2']
type: str type: str
protocolMapper: protocolMapper:
@ -330,7 +331,7 @@ def main():
protmapper_spec = dict( protmapper_spec = dict(
id=dict(type='str'), id=dict(type='str'),
name=dict(type='str'), name=dict(type='str'),
protocol=dict(type='str', choices=['openid-connect', 'saml', 'wsfed']), protocol=dict(type='str', choices=['openid-connect', 'saml', 'wsfed', 'docker-v2']),
protocolMapper=dict(type='str'), protocolMapper=dict(type='str'),
config=dict(type='dict'), config=dict(type='dict'),
) )
@ -341,7 +342,7 @@ def main():
id=dict(type='str'), id=dict(type='str'),
name=dict(type='str'), name=dict(type='str'),
description=dict(type='str'), description=dict(type='str'),
protocol=dict(type='str', choices=['openid-connect', 'saml', 'wsfed']), protocol=dict(type='str', choices=['openid-connect', 'saml', 'wsfed', 'docker-v2']),
attributes=dict(type='dict'), attributes=dict(type='dict'),
protocol_mappers=dict(type='list', elements='dict', options=protmapper_spec, aliases=['protocolMappers']), protocol_mappers=dict(type='list', elements='dict', options=protmapper_spec, aliases=['protocolMappers']),
) )

View file

@ -68,7 +68,8 @@ options:
protocol: protocol:
description: description:
- Type of client template. - Type of client template.
choices: ['openid-connect', 'saml'] - The V(docker-v2) value was added in community.general 8.6.0.
choices: ['openid-connect', 'saml', 'docker-v2']
type: str type: str
full_scope_allowed: full_scope_allowed:
@ -107,7 +108,7 @@ options:
protocol: protocol:
description: description:
- This specifies for which protocol this protocol mapper is active. - This specifies for which protocol this protocol mapper is active.
choices: ['openid-connect', 'saml'] choices: ['openid-connect', 'saml', 'docker-v2']
type: str type: str
protocolMapper: protocolMapper:
@ -292,7 +293,7 @@ def main():
consentText=dict(type='str'), consentText=dict(type='str'),
id=dict(type='str'), id=dict(type='str'),
name=dict(type='str'), name=dict(type='str'),
protocol=dict(type='str', choices=['openid-connect', 'saml']), protocol=dict(type='str', choices=['openid-connect', 'saml', 'docker-v2']),
protocolMapper=dict(type='str'), protocolMapper=dict(type='str'),
config=dict(type='dict'), config=dict(type='dict'),
) )
@ -304,7 +305,7 @@ def main():
id=dict(type='str'), id=dict(type='str'),
name=dict(type='str'), name=dict(type='str'),
description=dict(type='str'), description=dict(type='str'),
protocol=dict(type='str', choices=['openid-connect', 'saml']), protocol=dict(type='str', choices=['openid-connect', 'saml', 'docker-v2']),
attributes=dict(type='dict'), attributes=dict(type='dict'),
full_scope_allowed=dict(type='bool'), full_scope_allowed=dict(type='bool'),
protocol_mappers=dict(type='list', elements='dict', options=protmapper_spec), protocol_mappers=dict(type='list', elements='dict', options=protmapper_spec),