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

Upgrading past 2.6.3 breaks deployment #398

Closed
harpunius opened this issue Dec 7, 2023 · 4 comments · Fixed by #402
Closed

Upgrading past 2.6.3 breaks deployment #398

harpunius opened this issue Dec 7, 2023 · 4 comments · Fixed by #402

Comments

@harpunius
Copy link

harpunius commented Dec 7, 2023

Upgrading past 2.6.3 breaks our dockerised deployment

Summary

Upgrading from 1.8.1 to the latest version broke our deployment. We managed to pinpoint version 2.6.3 as the version where things stopped working.

Environment

  • OS: Linux
  • Kernel (e.g. uname -a): Linux ip-10-151-96-182 5.15.0-1050-aws Update docu to 1.2.1 before release #55~20.04.1-Ubuntu SMP Mon Nov 6 12:15:34 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
  • Server (e.g. Keycloak or any other IdP): Keycloak
  • Gatekeeper: 2.6.3
  • Docker Compose version v2.23.3

Expected Results

With no breaking update guide, I expected to be able to upgrade to v2.

Actual Results

Upgrading past 2.6.3 (any version, we tried 2.7.x, 2.8.x, 2.9.x) crash-loops the container.

Steps to reproduce

docker-compose.yaml file with the following

  gatekeeper:
    container_name: gatekeeper
    image: quay.io/gogatekeeper/gatekeeper:2.9.0 (or 2.6.3 or anything inbetween)
    restart: always
    command: [
      "--resources=uri=/*|roles=devops-admin,devops-write|require-any-role=true",
    ]

and run it with
docker compose -f docker-compose.yaml up gatekeeper.

This results in

[error] invalid resource devops-write|require-any-role=true, invalid resource keypair, should be (uri|roles|headers|methods|white-listed)=comma_values

Prior to version 2.6.3, this does not happen and gogatekeeper parses the --resources correctly.

Additional Information

We tried wrapping the command in double-quotes, single-quotes etc, but to no avail (only the error message changed slightly, but parsing still fails).

My guess is the upgrade to urfave/cli/v2 broke some parsing. I found this interesting issue about comma-containing fields and this case that it's supposed to fix. Looks like our case.

@p53
Copy link

p53 commented Dec 7, 2023

@harpunius thanks for reporting! will look at it

@p53
Copy link

p53 commented Dec 8, 2023

@harpunius , fixed, you can try 2.9.3-rc3

@p53 p53 linked a pull request Dec 8, 2023 that will close this issue
2 tasks
@harpunius
Copy link
Author

Works, thanks a lot for the quick solution! Do you have an ETA on when this will be released?

@p53
Copy link

p53 commented Dec 11, 2023

@harpunius today

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants