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

keycloak_role: quote role name in urls #3536

Merged
merged 4 commits into from
Oct 9, 2021

Conversation

laurpaum
Copy link
Contributor

@laurpaum laurpaum commented Oct 8, 2021

SUMMARY

Fix #3535
Quote role names in URL path when making calls to Keycloak API

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

keycloak_role

@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added bug This issue/PR relates to a bug identity module_utils module_utils 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 plugins plugin (any type) labels Oct 8, 2021
@ansibullbot ansibullbot removed the needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI label Oct 8, 2021
@ansibullbot
Copy link
Collaborator

The test ansible-test sanity --test line-endings [explain] failed with 1 error:

changelogs/fragments/3536-quote-role-name-in-url.yml:0:0: use "\n" for line endings instead of "\r\n"

The test ansible-test sanity --test line-endings [explain] failed with 1 error:

changelogs/fragments/3536-quote-role-name-in-url.yml:0:0: use "\n" for line endings instead of "\r\n"

The test ansible-test sanity --test line-endings [explain] failed with 1 error:

changelogs/fragments/3536-quote-role-name-in-url.yml:0:0: use "\n" for line endings instead of "\r\n"

The test ansible-test sanity --test line-endings [explain] failed with 1 error:

changelogs/fragments/3536-quote-role-name-in-url.yml:0:0: use "\n" for line endings instead of "\r\n"

The test ansible-test sanity --test line-endings [explain] failed with 1 error:

changelogs/fragments/3536-quote-role-name-in-url.yml:0:0: use "\n" for line endings instead of "\r\n"

click here for bot help

@ansibullbot ansibullbot added the ci_verified Push fixes to PR branch to re-run CI label Oct 8, 2021
Copy link
Collaborator

@Ajpantuso Ajpantuso left a comment

Choose a reason for hiding this comment

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

One note on the changelog fragment, but seems reasonable to me.

changelogs/fragments/3536-quote-role-name-in-url.yml Outdated Show resolved Hide resolved
@ansibullbot ansibullbot added needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI ci_verified Push fixes to PR branch to re-run CI and removed ci_verified Push fixes to PR branch to re-run CI needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI labels Oct 8, 2021
@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 ci_verified Push fixes to PR branch to re-run CI 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 Oct 8, 2021
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.

Quoting user-provided input is always a good idea!

@felixfontein felixfontein requested a review from Ajpantuso October 9, 2021 08:16
@felixfontein felixfontein added backport-2 check-before-release PR will be looked at again shortly before release and merged if possible. labels Oct 9, 2021
Copy link
Collaborator

@Ajpantuso Ajpantuso left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@ansibullbot ansibullbot removed the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR label Oct 9, 2021
@felixfontein felixfontein removed the check-before-release PR will be looked at again shortly before release and merged if possible. label Oct 9, 2021
@felixfontein felixfontein merged commit 9de01e0 into ansible-collections:main Oct 9, 2021
@patchback
Copy link

patchback bot commented Oct 9, 2021

Backport to stable-2: 💔 cherry-picking failed — conflicts found

❌ Failed to cleanly apply 9de01e0 on top of patchback/backports/stable-2/9de01e04f27979fe1e31ad081e956c5c8ea3cc5a/pr-3536

Backporting merged PR #3536 into main

  1. Ensure you have a local repo clone of your fork. Unless you cloned it
    from the upstream, this would be your origin remote.
  2. Make sure you have an upstream repo added as a remote too. In these
    instructions you'll refer to it by the name upstream. If you don't
    have it, here's how you can add it:
    $ git remote add upstream https://github.com/ansible-collections/community.general.git
  3. Ensure you have the latest copy of upstream and prepare a branch
    that will hold the backported code:
    $ git fetch upstream
    $ git checkout -b patchback/backports/stable-2/9de01e04f27979fe1e31ad081e956c5c8ea3cc5a/pr-3536 upstream/stable-2
  4. Now, cherry-pick PR keycloak_role: quote role name in urls #3536 contents into that branch:
    $ git cherry-pick -x 9de01e04f27979fe1e31ad081e956c5c8ea3cc5a
    If it'll yell at you with something like fatal: Commit 9de01e04f27979fe1e31ad081e956c5c8ea3cc5a is a merge but no -m option was given., add -m 1 as follows intead:
    $ git cherry-pick -m1 -x 9de01e04f27979fe1e31ad081e956c5c8ea3cc5a
  5. At this point, you'll probably encounter some merge conflicts. You must
    resolve them in to preserve the patch from PR keycloak_role: quote role name in urls #3536 as close to the
    original as possible.
  6. Push this branch to your fork on GitHub:
    $ git push origin patchback/backports/stable-2/9de01e04f27979fe1e31ad081e956c5c8ea3cc5a/pr-3536
  7. Create a PR, ensure that the CI is green. If it's not — update it so that
    the tests and any other checks pass. This is it!
    Now relax and wait for the maintainers to process your pull request
    when they have some cycles to do reviews. Don't worry — they'll tell you if
    any improvements are necessary when the time comes!

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

@patchback
Copy link

patchback bot commented Oct 9, 2021

Backport to stable-3: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-3/9de01e04f27979fe1e31ad081e956c5c8ea3cc5a/pr-3536

Backported as #3539

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

@felixfontein
Copy link
Collaborator

@laurpaum thanks for fixing this!
@Ajpantuso thanks for reviewing!

patchback bot pushed a commit that referenced this pull request Oct 9, 2021
* quote role name in urls

* add changelog fragment

* Update changelogs/fragments/3536-quote-role-name-in-url.yml

Co-authored-by: Ajpantuso <[email protected]>

* fix linefeeds

Co-authored-by: Ajpantuso <[email protected]>
(cherry picked from commit 9de01e0)
felixfontein pushed a commit that referenced this pull request Oct 9, 2021
* quote role name in urls

* add changelog fragment

* Update changelogs/fragments/3536-quote-role-name-in-url.yml

Co-authored-by: Ajpantuso <[email protected]>

* fix linefeeds

Co-authored-by: Ajpantuso <[email protected]>
(cherry picked from commit 9de01e0)

Co-authored-by: Laurent Paumier <[email protected]>
JonEllis pushed a commit to JonEllis/community.general that referenced this pull request Nov 16, 2021
* quote role name in urls

* add changelog fragment

* Update changelogs/fragments/3536-quote-role-name-in-url.yml

Co-authored-by: Ajpantuso <[email protected]>

* fix linefeeds

Co-authored-by: Ajpantuso <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug identity module_utils module_utils plugins plugin (any type)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

keycloak_role should allow special characters in role name
4 participants