Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions changelogs/fragments/8215-add-docker-v2-protocol.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
minor_changes:
- Added `docker-v2` protocol support to `keycloak_client`, `keycloak_clientscope`, `keycloak_clienttemplate`, enhancing alignment with Keycloak's protocol options.
anderssh marked this conversation as resolved.
Show resolved Hide resolved
9 changes: 5 additions & 4 deletions plugins/modules/keycloak_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@
- Type of client.
- At creation only, default value will be V(openid-connect) if O(protocol) is omitted.
felixfontein marked this conversation as resolved.
Show resolved Hide resolved
type: str
choices: ['openid-connect', 'saml']
choices: ['openid-connect', 'saml', 'docker-v2']

full_scope_allowed:
description:
Expand Down Expand Up @@ -393,7 +393,7 @@
protocol:
description:
- This specifies for which protocol this protocol mapper is active.
choices: ['openid-connect', 'saml']
choices: ['openid-connect', 'saml', 'docker-v2']
type: str

protocolMapper:
Expand Down Expand Up @@ -724,6 +724,7 @@

PROTOCOL_OPENID_CONNECT = 'openid-connect'
PROTOCOL_SAML = 'saml'
PROTOCOL_DOCKER_V2 = 'docker-v2'
CLIENT_META_DATA = ['authorizationServicesEnabled']


Expand Down Expand Up @@ -785,7 +786,7 @@ def main():
consentText=dict(type='str'),
id=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'),
config=dict(type='dict'),
)
Expand Down Expand Up @@ -819,7 +820,7 @@ def main():
authorization_services_enabled=dict(type='bool', aliases=['authorizationServicesEnabled']),
public_client=dict(type='bool', aliases=['publicClient']),
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'),
full_scope_allowed=dict(type='bool', aliases=['fullScopeAllowed']),
node_re_registration_timeout=dict(type='int', aliases=['nodeReRegistrationTimeout']),
Expand Down
8 changes: 4 additions & 4 deletions plugins/modules/keycloak_clientscope.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
protocol:
description:
- Type of client.
choices: ['openid-connect', 'saml', 'wsfed']
choices: ['openid-connect', 'saml', 'wsfed', 'docker-v2']
type: str

protocol_mappers:
Expand All @@ -95,7 +95,7 @@
description:
- This specifies for which protocol this protocol mapper.
- is active.
choices: ['openid-connect', 'saml', 'wsfed']
choices: ['openid-connect', 'saml', 'wsfed', 'docker-v2']
type: str

protocolMapper:
Expand Down Expand Up @@ -330,7 +330,7 @@ def main():
protmapper_spec = dict(
id=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'),
config=dict(type='dict'),
)
Expand All @@ -341,7 +341,7 @@ def main():
id=dict(type='str'),
name=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'),
protocol_mappers=dict(type='list', elements='dict', options=protmapper_spec, aliases=['protocolMappers']),
)
Expand Down
8 changes: 4 additions & 4 deletions plugins/modules/keycloak_clienttemplate.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
protocol:
description:
- Type of client template.
choices: ['openid-connect', 'saml']
choices: ['openid-connect', 'saml', 'docker-v2']
type: str

full_scope_allowed:
Expand Down Expand Up @@ -107,7 +107,7 @@
protocol:
description:
- This specifies for which protocol this protocol mapper is active.
choices: ['openid-connect', 'saml']
choices: ['openid-connect', 'saml', 'docker-v2']
type: str

protocolMapper:
Expand Down Expand Up @@ -292,7 +292,7 @@ def main():
consentText=dict(type='str'),
id=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'),
config=dict(type='dict'),
)
Expand All @@ -304,7 +304,7 @@ def main():
id=dict(type='str'),
name=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'),
full_scope_allowed=dict(type='bool'),
protocol_mappers=dict(type='list', elements='dict', options=protmapper_spec),
Expand Down
Loading