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

Cap rancher-external-ip-webhook to <=1.21 #33893

Closed
cbron opened this issue Aug 3, 2021 · 4 comments
Closed

Cap rancher-external-ip-webhook to <=1.21 #33893

cbron opened this issue Aug 3, 2021 · 4 comments
Assignees
Labels
area/webhook QA/XS release-note Note this issue in the milestone's release notes
Milestone

Comments

@cbron
Copy link
Contributor

cbron commented Aug 3, 2021

The below was shipped in 1.21 and should fix CVE-2020-8554, which means we could cap rancher-external-ip-webhook at <=1.21. This will give users 1 full cycle to transition.

First we need to ensure the upstream fix is a replacement for this chart.

@cbron cbron added this to the v2.6.x milestone Aug 3, 2021
@cbron cbron changed the title Remove rancher-external-ip-webhook after 1.20 support is dropped Cap rancher-external-ip-webhook to 1.22 Aug 3, 2021
@cbron cbron changed the title Cap rancher-external-ip-webhook to 1.22 Cap rancher-external-ip-webhook to <=1.21 Aug 3, 2021
@cbron cbron modified the milestones: v2.6.x, v2.6.2 Aug 3, 2021
@cbron cbron added [zube]: Team Green Backlog release-note Note this issue in the milestone's release notes labels Aug 3, 2021
@cbron cbron modified the milestones: v2.6.2, v2.6.1 Aug 6, 2021
@deniseschannon deniseschannon modified the milestones: v2.6.1, v2.6.2 Aug 13, 2021
@cbron cbron changed the title Cap rancher-external-ip-webhook to <=1.21 Potentially cap rancher-external-ip-webhook to <=1.21 Sep 30, 2021
@cmurphy
Copy link
Contributor

cmurphy commented Oct 1, 2021

The new admission controller blocks the use of external IPs in Service resources entirely: https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#denyserviceexternalips

The external-ip-webhook app enables an allowlist for certain IPs or CIDRs: https://github.com/rancher/externalip-webhook/blob/3252e5d20e5ab3cd9f1f21b5cff797ba617fce67/chart/questions.yaml#L3-L5

So the new admission controller is not a drop-in replacement for the webhook, and some users may still need the flexibility that the webhook provides on >1.21, so I do not think we should add this cap.

I can't find any documentation on using rancher-externalip-webhook in rancher.com/docs except for this blog post but if it exists we should convert it to recommend enabling the feature gate and only using the webhook if they need that flexibility.

@cmurphy
Copy link
Contributor

cmurphy commented Oct 5, 2021

Summary from security meeting: we'll go ahead with this cap for now and revisit supporting the webhook if it becomes apparent that users need the webhook's flexibility.

@zube zube bot removed the [zube]: Working label Oct 5, 2021
@cbron cbron changed the title Potentially cap rancher-external-ip-webhook to <=1.21 Cap rancher-external-ip-webhook to <=1.21 Oct 5, 2021
@sowmyav27 sowmyav27 assigned anupama2501 and unassigned sowmyav27 Oct 11, 2021
@anupama2501
Copy link
Contributor

anupama2501 commented Oct 18, 2021

Moving to-test column as it requires k8s 1.22 in rancher for validating.

From @cmurphy to validate:

the fix in kubernetes exists in 1.21, but the issue is about preventing the chart from installing on 1.22
we still allow it to be installed on 1.21 to give users time to transition

If we try to install external-ip-webhook chart on k8s 1.22 downstream cluster , installation should not go through

@anupama2501
Copy link
Contributor

anupama2501 commented Nov 24, 2021

Verified on v2.6-head 4375161

  • Created a node driver RKE1 cluster on v1.22.3-rancher1-1
  • Tried installing the external-ip-webhook app
  • Installation failed with the error:
helm install --namespace=cattle-externalip-system --timeout=10m0s --values=/home/shell/helm/values-rancher-external-ip-webhook-100.0.1-up1.0.1-rc3.yaml --version=100.0.1+up1.0.1-rc3 --wait=true rancher-external-ip-webhook /home/shell/helm/rancher-external-ip-webhook-100.0.1-up1.0.1-rc3.tgz
Error: INSTALLATION FAILED: chart requires kubeVersion: < 1.22.0 which is incompatible with Kubernetes v1.22.3

Upgrade:

  • Installed the rancher-external-ip-webhook on k8s v1.21.6rancher1-1 and verified the kubeVersion < 1.22.0 is set
> kubectl get apps rancher-external-ip-webhook -n cattle-externalip-system -o yaml| grep kubeVersion
            f:kubeVersion: {}
      kubeVersion: < 1.22.0
  • Upgraded the k8s version to v1.22.3-rancher1-1
  • Tried upgrading the webhook app and the upgrade failed:
Wed, Nov 24 2021 3:01:53 pm | helm upgrade --history-max=5 --install=true --namespace=cattle-externalip-system --timeout=10m0s --values=/home/shell/helm/values-rancher-external-ip-webhook-100.0.1-up1.0.1-rc3.yaml --version=100.0.1+up1.0.1-rc3 --wait=true rancher-external-ip-webhook /home/shell/helm/rancher-external-ip-webhook-100.0.1-up1.0.1-rc3.tgz
Wed, Nov 24 2021 3:01:53 pm | Error: UPGRADE FAILED: chart requires kubeVersion: < 1.22.0 which is incompatible with Kubernetes v1.22.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/webhook QA/XS release-note Note this issue in the milestone's release notes
Projects
None yet
Development

No branches or pull requests

7 participants