-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
New Module: Keycloak User Rolemapping #4898
New Module: Keycloak User Rolemapping #4898
Conversation
@bratwurzt this PR contains the following merge commits: Please rebase your branch to remove these commits. |
This comment was marked as outdated.
This comment was marked as outdated.
There was a problem hiding this 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! I've added some very first comments.
Please note that every new module must come with tests (integration or unit tests). Since other keycloak modules have unit tests as well, adding similar tests is probably a good idea.
f0a30d2
to
9281495
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
965e448
to
ad510d4
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides the following point, this looks good to me. I cannot really test this, but the code changes look good to me (i.e. they don't seem to break something that already worked) and since none of the maintainers reacted so far, I guess nobody objects. I'll merge this in a couple of days (assuming the below modification has been done).
Hmm, I must have done something strange, this should have ended up with a comment in another PR... I'll look at this one later, please ignore this for now :)
tests/integration/targets/keycloak_user_rolemapping/tasks/main.yml
Outdated
Show resolved
Hide resolved
tests/integration/targets/keycloak_user_rolemapping/vars/main.yml
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since nobody else bothered to comment on this, and it looks good enough to me (I don't use keycloak so I cannot really comment on that aspect), I'm declaring this ready to merge and will merge it :)
Backport to stable-5: 💚 backport PR created✅ Backport PR branch: Backported as #5324 🤖 @patchback |
* keycloak_user_rolemapping: implement user role mapping * keycloak_user_rolemapping: additional logging * keycloak_user_rolemapping: move to getters, use names parameters * keycloak_user_rolemapping: add service account user example * Add keyring and keyring_info modules (#4764) * keycloak_user_rolemapping: write tests, address ansibullbot concerns no.1 * keycloak_user_rolemapping: address felixfontein concerns no.1 * keycloak_user_rolemapping: remove rebase mistakes * keycloak_user_rolemapping: address felixfontein concerns no.2 * keycloak_user_rolemapping: refactor duplicate username usage example * keycloak_user_rolemapping: fix sanity check errors no.1 * keycloak_user_rolemapping: fix sanity check errors no.2 * keycloak_user_rolemapping: fix sanity check errors no.3 * keycloak_user_rolemapping: fix sanity check errors no.4 * keycloak_user_rolemapping: write tests, address ansibullbot concerns no.1 * keycloak_user_rolemapping: resolve rebase conflicts with origin/main branch # Conflicts: # plugins/module_utils/identity/keycloak/keycloak.py * keycloak_user_rolemapping: remove keycloak_role_composites from BOTMETA.yml * keycloak_user_rolemapping: fix sanity check errors no.5 * keycloak_user_rolemapping: address felixfontein reviews concerns no.1 * keycloak_user_rolemapping: address felixfontein reviews concerns no.2 Co-authored-by: Dušan Markovič <[email protected]> Co-authored-by: ahussey-redhat <[email protected]> (cherry picked from commit 2cac3ae)
@bratwurzt thanks a lot for your contribution, and sorry that it took so long to get it merged! |
* keycloak_user_rolemapping: implement user role mapping * keycloak_user_rolemapping: additional logging * keycloak_user_rolemapping: move to getters, use names parameters * keycloak_user_rolemapping: add service account user example * Add keyring and keyring_info modules (#4764) * keycloak_user_rolemapping: write tests, address ansibullbot concerns no.1 * keycloak_user_rolemapping: address felixfontein concerns no.1 * keycloak_user_rolemapping: remove rebase mistakes * keycloak_user_rolemapping: address felixfontein concerns no.2 * keycloak_user_rolemapping: refactor duplicate username usage example * keycloak_user_rolemapping: fix sanity check errors no.1 * keycloak_user_rolemapping: fix sanity check errors no.2 * keycloak_user_rolemapping: fix sanity check errors no.3 * keycloak_user_rolemapping: fix sanity check errors no.4 * keycloak_user_rolemapping: write tests, address ansibullbot concerns no.1 * keycloak_user_rolemapping: resolve rebase conflicts with origin/main branch # Conflicts: # plugins/module_utils/identity/keycloak/keycloak.py * keycloak_user_rolemapping: remove keycloak_role_composites from BOTMETA.yml * keycloak_user_rolemapping: fix sanity check errors no.5 * keycloak_user_rolemapping: address felixfontein reviews concerns no.1 * keycloak_user_rolemapping: address felixfontein reviews concerns no.2 Co-authored-by: Dušan Markovič <[email protected]> Co-authored-by: ahussey-redhat <[email protected]> (cherry picked from commit 2cac3ae) Co-authored-by: bratwurzt <[email protected]>
* upstream/main: (203 commits) Make pfexec become usable for illumos (ansible-collections#3889) znode: add options for authentication (ansible-collections#5306) keycloak_user_federation: add explanation and example to vendor option (ansible-collections#4893) Next expected release is 5.8.0. Allow terraform module to specify complex variable structures (ansible-collections#4797) Fix ansible-collections#5313: redhat_subscription module is not idempotent when pool_ids (ansible-collections#5319) bitwarden: Add field to search for all item attributes, instead of on… (ansible-collections#5297) New Module: Keycloak User Rolemapping (ansible-collections#4898) chore: Update lxc_container to support py3 (ansible-collections#5304) terraform: run `init` with no-color, too (ansible-collections#5147) nmcli: fix error when setting previously unset mac address (ansible-collections#5291) [feat] proxmox_snap: snapshot containers with configured mountpoints (ansible-collections#5274) machinectl: include the success command (ansible-collections#5287) Add SetSessionService to redfish_config (ansible-collections#5009) locale_gen: fix UbuntuMode (ansible-collections#5282) ini_file: fix lint error (ansible-collections#5307) netcup_dnsapi: Add timeout paramter (ansible-collections#5301) stable-2.14 is now default. Add stable-2.14 to CI, adjust to devel version bump (ansible-collections#5298) Try to run reuse workflow without explicitly allowing it for new contributors. (ansible-collections#5296) ...
No worries, glad I could contribute. |
* keycloak_user_rolemapping: implement user role mapping * keycloak_user_rolemapping: additional logging * keycloak_user_rolemapping: move to getters, use names parameters * keycloak_user_rolemapping: add service account user example * Add keyring and keyring_info modules (ansible-collections#4764) * keycloak_user_rolemapping: write tests, address ansibullbot concerns no.1 * keycloak_user_rolemapping: address felixfontein concerns no.1 * keycloak_user_rolemapping: remove rebase mistakes * keycloak_user_rolemapping: address felixfontein concerns no.2 * keycloak_user_rolemapping: refactor duplicate username usage example * keycloak_user_rolemapping: fix sanity check errors no.1 * keycloak_user_rolemapping: fix sanity check errors no.2 * keycloak_user_rolemapping: fix sanity check errors no.3 * keycloak_user_rolemapping: fix sanity check errors no.4 * keycloak_user_rolemapping: write tests, address ansibullbot concerns no.1 * keycloak_user_rolemapping: resolve rebase conflicts with origin/main branch * keycloak_user_rolemapping: remove keycloak_role_composites from BOTMETA.yml * keycloak_user_rolemapping: fix sanity check errors no.5 * keycloak_user_rolemapping: address felixfontein reviews concerns no.1 * keycloak_user_rolemapping: address felixfontein reviews concerns no.2 Co-authored-by: Dušan Markovič <[email protected]> Co-authored-by: ahussey-redhat <[email protected]>
* keycloak_user_rolemapping: implement user role mapping * keycloak_user_rolemapping: additional logging * keycloak_user_rolemapping: move to getters, use names parameters * keycloak_user_rolemapping: add service account user example * Add keyring and keyring_info modules (ansible-collections#4764) * keycloak_user_rolemapping: write tests, address ansibullbot concerns no.1 * keycloak_user_rolemapping: address felixfontein concerns no.1 * keycloak_user_rolemapping: remove rebase mistakes * keycloak_user_rolemapping: address felixfontein concerns no.2 * keycloak_user_rolemapping: refactor duplicate username usage example * keycloak_user_rolemapping: fix sanity check errors no.1 * keycloak_user_rolemapping: fix sanity check errors no.2 * keycloak_user_rolemapping: fix sanity check errors no.3 * keycloak_user_rolemapping: fix sanity check errors no.4 * keycloak_user_rolemapping: write tests, address ansibullbot concerns no.1 * keycloak_user_rolemapping: resolve rebase conflicts with origin/main branch * keycloak_user_rolemapping: remove keycloak_role_composites from BOTMETA.yml * keycloak_user_rolemapping: fix sanity check errors no.5 * keycloak_user_rolemapping: address felixfontein reviews concerns no.1 * keycloak_user_rolemapping: address felixfontein reviews concerns no.2 Co-authored-by: Dušan Markovič <[email protected]> Co-authored-by: ahussey-redhat <[email protected]>
SUMMARY
Add
keycloak_user_rolemapping
module to provide management of direct assignment of client/realm roles to users. Also provides user role mapping for service-account users.ISSUE TYPE
COMPONENT NAME
keycloak_user_rolemapping
ADDITIONAL INFORMATION
Example: