8000 New Module: Keycloak ClientSecret with PR changes by johncant · Pull Request #5606 · ansible-collections/community.general · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
8000

New Module: Keycloak ClientSecret with PR changes #5606

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

Conversation

johncant
Copy link
Contributor
SUMMARY

Updated version of PR #3997 by @fynncfchen

ISSUE TYPE
  • New Module Pull Request
COMPONENT NAME

keycloak_clientsecret

ADDITIONAL INFORMATION

I rebased the original PR and made all of the changes, plus one or two extra

  • Structure of plugins/modules changed since original PR. No symlinks present after rebase.
  • Added an entry in meta/runtime.yml to help anyone using keycloak_clientsecret in fynncfchen:keycloak-clientsecret (4.3.0) switching to the version that includes this PR, where the structure of plugins/modules has changed.
  • All suggested changes from @felixfontein and @russoz implemented
  • Changed version added from 4.4.0 to 6.1.0

Testing

I tested the following:

  • Built docs - they look OK
  • Used the module with the following args to retrieve my keycloak client secret as part of my home network setup: auth_client_id, auth_keycloak_url, auth_realm, auth_username, auth_password, state, realm, client_id - it worked first time with no code changes needed.
  • Nothing else tested by me

@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added identity module module module_utils module_utils new_contributor Help guide this first time contributor new_plugin New plugin plugins plugin (any type) labels Nov 26, 2022
@felixfontein felixfontein added check-before-release PR will be looked at again shortly before release and merged if possible. backport-6 labels Nov 26, 2022
@github-actions
Copy link
github-actions bot commented Nov 26, 2022

Docs Build 📝

Thank you for contribution!✨

This PR has been merged and your docs changes will be incorporated when they are next published.

@ansibullbot ansibullbot added the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR label Nov 26, 2022
@johncant
Copy link
Contributor Author

It looks like the test failures are due to a rate limit being exceeded and not as a result of the PR changes.

@ansibullbot ansibullbot removed the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR label Nov 26, 2022
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 reviving this PR! Please note that new modules must come with tests (unit and/or integration).

@johncant
Copy link
Contributor Author

Happy to write some tests.

I'm doing this now and I found something that doesn't make a lot of sense:

https://github.com/ansible-collections/community.general/pull/5606/files#diff-0e3de7219d2d49b252059fc768951af14b1f81fc584ce34eede5675aaa9621aeR218-R226

state: absent creates a new client secret rather than deletes it (no endpoint for this). If I change the value of state for this case, what should it be?

@ansibullbot ansibullbot added integration tests/integration tests tests labels Nov 27, 2022
@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 Nov 28, 2022
@johncant
Copy link
Contributor Author

Hi @felixfontein - all changes made. I'd be grateful if you could take another look.

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.

Sorry for the late response!

johncant and others added 8 commits December 4, 2022 11:13
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
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.

Besides this, LGTM!

Co-authored-by: Felix Fontein <felix@fontein.de>
@johncant
Copy link
Contributor Author
johncant commented Dec 4, 2022

Besides this, LGTM!

Awesome!

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.

Will merge tomorrow if nobody objects.

@felixfontein felixfontein merged commit 7ea544a into ansible-collections:main Dec 5, 2022
@patchback
Copy link
patchback bot commented Dec 5, 2022

Backport to stable-6: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-6/7ea544a6244c7324e45c6972cdf0b6674797e0e9/pr-5606

Backported as #5654

🤖 @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 Dec 5, 2022
* feat(plugins/keycloak): add get and create util function for client secret

* feat(plugins/keycloak): add client secret module

* chore: add maintainer in BOTMETA

* Update plugins/modules/identity/keycloak/keycloak_clientsecret.py

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

* Make changes to keycloak_clientsecret from PR

* Add SPDX identifier for keycloak_clientsecret

* Add copyright in keycloak_clientsecret for REUSE

* Add integration test for keycloak_clientsecret

* rm clientsecret from keycloak_clientsecret result

  - end_state used instead

* keycloak_clientsecret: Undo meta/runtime.yml change

* Fix sanity tests for keycloak_clientsecret

* New keycloak_clientsecret_info module

  - Replaces keycloak_clientsecret
  - Module definition and some common logic moved into module_utils
  - Update documentation, tests, etc.
  - Add myself as author

* Misc fixes to keycloak_clientsecret_info

* Add keycloak_clientsecret_regenerate module

* keycloak_clientsecret* Update .github/BOTMETA.yml

* keycloak_clientsecret_regenerate: Fix sanity tests

* Fix README for keycloak_clientsecret integration test

* Separate out keycloak_clientsecret module_utils

* Keycloak_clientsecret module_utils: boilerplate

* Update plugins/modules/keycloak_clientsecret_info.py

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

* Update plugins/modules/keycloak_clientsecret_info.py

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

* Update plugins/modules/keycloak_clientsecret_info.py

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

* Update plugins/modules/keycloak_clientsecret_info.py

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

* Update plugins/modules/keycloak_clientsecret_info.py

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

* Update plugins/modules/keycloak_clientsecret_info.py

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

* keycloak_clientsecret: Add no_log to examples and docs

* keycloak_clientsecret: Update BOTMETA

* Update .github/BOTMETA.yml

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

Co-authored-by: fynncfchen <fynn.cfchen@gmail.com>
Co-authored-by: Fynnnnn <ethan.cfchen@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 7ea544a)
@felixfontein felixfontein removed the check-before-release PR will be looked at again shortly before release and merged if possible. label Dec 5, 2022
@felixfontein
Copy link
Collaborator

@johncant @fynncfchen thanks for your contribution!

felixfontein pushed a commit that referenced this pull request Dec 5, 2022
…ret with PR changes (#5654)

New Module: Keycloak ClientSecret with PR changes (#5606)

* feat(plugins/keycloak): add get and create util function for client secret

* feat(plugins/keycloak): add client secret module

* chore: add maintainer in BOTMETA

* Update plugins/modules/identity/keycloak/keycloak_clientsecret.py

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

* Make changes to keycloak_clientsecret from PR

* Add SPDX identifier for keycloak_clientsecret

* Add copyright in keycloak_clientsecret for REUSE

* Add integration test for keycloak_clientsecret

* rm clientsecret from keycloak_clientsecret result

  - end_state used instead

* keycloak_clientsecret: Undo meta/runtime.yml change

* Fix sanity tests for keycloak_clientsecret

* New keycloak_clientsecret_info module

  - Replaces keycloak_clientsecret
  - Module definition and some common logic moved into module_utils
  - Update documentation, tests, etc.
  - Add myself as author

* Misc fixes to keycloak_clientsecret_info

* Add keycloak_clientsecret_regenerate module

* keycloak_clientsecret* Update .github/BOTMETA.yml

* keycloak_clientsecret_regenerate: Fix sanity tests

* Fix README for keycloak_clientsecret integration test

* Separate out keycloak_clientsecret module_utils

* Keycloak_clientsecret module_utils: boilerplate

* Update plugins/modules/keycloak_clientsecret_info.py

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

* Update plugins/modules/keycloak_clientsecret_info.py

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

* Update plugins/modules/keycloak_clientsecret_info.py

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

* Update plugins/modules/keycloak_clientsecret_info.py

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

* Update plugins/modules/keycloak_clientsecret_info.py

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

* Update plugins/modules/keycloak_clientsecret_info.py

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

* keycloak_clientsecret: Add no_log to examples and docs

* keycloak_clientsecret: Update BOTMETA

* Update .github/BOTMETA.yml

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

Co-authored-by: fynncfchen <fynn.cfchen@gmail.com>
Co-authored-by: Fynnnnn <ethan.cfchen@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 7ea544a)

Co-authored-by: John Cant <a.johncant@gmail.com>
@johncant
Copy link
Contributor Author
johncant commented Dec 5, 2022

@felixfontein thankyou for your time reviewing the PRs!

@johncant johncant deleted the keycloak-clientsecret-rebased-with-pr-changes branch December 19, 2022 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
identity integration tests/integration module_utils module_utils module module new_contributor Help guide this first time contributor new_plugin New plugin plugins plugin (any type) tests tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0