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

Conversation

anderssh
Copy link
Contributor

SUMMARY

This pull request introduces the addition of the "docker-v2" protocol support to the keycloak_client, keycloak_clientscope, and keycloak_clienttemplate modules within the community.general collection. The "docker-v2" protocol is a valid and supported option in Keycloak, which is crucial for configurations involving Docker registry authentication, among others. Fixes #8215.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME
  • keycloak_client
  • keycloak_clientscope
  • keycloak_clienttemplate
ADDITIONAL INFORMATION

I have enhanced the protocol parameter across the keycloak_client, keycloak_clientscope, and keycloak_clienttemplate modules to include the "docker-v2" option. It's important to note that the existing protocol choices varied across different modules — some were limited to ['openid-connect', 'saml'], while others used Python constants to define the choices. I've respected the existing structure and conventions in each module, only extending them to include "docker-v2".

For instance, if a module's protocol choices were previously defined as:

protocol=dict(type='str', choices=['openid-connect', 'saml'])

I have updated this to

protocol=dict(type='str', choices=['openid-connect', 'saml', 'docker-v2'])

And similarly, for modules using Python constants to define protocol choices, I've appended "docker-v2" to the existing list without altering the existing structure.

The documentation for each affected module has been updated to include "docker-v2" as a valid protocol option.

The modifications were tested to confirm that the "docker-v2" protocol is recognized and behaves as expected across the updated modules. I encourage further testing by the community to validate these changes across various usage scenarios.

I have not verified the potential error message from the Keycloak API when this option is used when the keycloak server has not activated the docker-v2 protocol, (disabled by default and enabled by running bin/standalone.sh|bat -Dkeycloak.profile.feature.docker=enabled starting the service, see (https://www.keycloak.org/server/features).

@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added feature This issue/PR relates to a feature request module module new_contributor Help guide this first time contributor plugins plugin (any type) labels Apr 11, 2024
@ansibullbot

This comment was marked as outdated.

@ansibullbot ansibullbot added ci_verified Push fixes to PR branch to re-run CI needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR labels Apr 11, 2024
@ansibullbot ansibullbot removed ci_verified Push fixes to PR branch to re-run CI needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR labels Apr 11, 2024
@felixfontein felixfontein added check-before-release PR will be looked at again shortly before release and merged if possible. backport-8 Automatically create a backport for the stable-8 branch labels Apr 12, 2024
Copy link
Collaborator

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution!

changelogs/fragments/8215-add-docker-v2-protocol.yml Outdated Show resolved Hide resolved
plugins/modules/keycloak_client.py Show resolved Hide resolved
Update changelog fragment to reviewers suggestion, add refrence to issue and pull request

Co-authored-by: Felix Fontein <felix@fontein.de>
@ansibullbot ansibullbot added needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR and removed needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR labels Apr 12, 2024
@felixfontein
Copy link
Collaborator

If nobody objects, I'll merge this in ~a week.

@felixfontein felixfontein removed the check-before-release PR will be looked at again shortly before release and merged if possible. label Apr 20, 2024
@felixfontein felixfontein merged commit a5b2b5c into ansible-collections:main Apr 20, 2024
132 of 133 checks passed
Copy link

patchback bot commented Apr 20, 2024

Backport to stable-8: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-8/a5b2b5ce8ca879a49df69a5fd997f74dd5139c47/pr-8216

Backported as #8239

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Apr 20, 2024
* 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>
(cherry picked from commit a5b2b5c)
@felixfontein
Copy link
Collaborator

@anderssh thanks for your contribution!

felixfontein pushed a commit that referenced this pull request Apr 20, 2024
…ocol in Keycloak modules (#8239)

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>
(cherry picked from commit a5b2b5c)

Co-authored-by: Anders Stiksrud Helmen <anders.s.helmen@gmail.com>
aretrosen pushed a commit to aretrosen/community.general that referenced this pull request Apr 22, 2024
…ctions#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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-8 Automatically create a backport for the stable-8 branch feature This issue/PR relates to a feature request module module new_contributor Help guide this first time contributor plugins plugin (any type)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add "docker-v2" Protocol Support to Keycloak Modules
3 participants