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

Bind Responder Policy to Content Switch instead of Load Balancer #676

Open
siegenthalerroger opened this issue Jan 13, 2025 · 0 comments
Open

Comments

@siegenthalerroger
Copy link

Describe the bug

Redirecting from http to https with a Responder Policy results in a browser error with "Too many redirects". This appears to be the case due to responder policy being bound to the load balancer instead of the content switch.

To Reproduce

  1. Steps
  • We have a Netscaler VPX in front of a AKS cluster with overlay networking, as well as cert-manager with HTTP ACME challenges.
  • We have a rewritepolicy to enforce SSL for everything except the HTTP01 challenge routes required by cert-manager.
apiVersion: citrix.com/v1
kind: rewritepolicy
metadata:
  name: httpsredirect
spec:
  responder-policies:
  - responder-policy:
      redirect:
        url: '"https://" +http.req.HOSTNAME.SERVER+":"+"443"+http.req.url'
      comment: 'Redirect HTTP to HTTPS'
      respond-criteria: 'http.req.is_valid && HTTP.REQ.URL.PATH.SET_TEXT_MODE(IGNORECASE).STARTSWITH("/") && HTTP.REQ.URL.PATH.SET_TEXT_MODE(IGNORECASE).STARTSWITH("/.well-known/acme-challenge/").NOT'
  • We attach this policy to the ingress with the annnotation ingress.citrix.com/rewrite-responder_crd: httpsredirect
  • A request to http://hostname.com/.well-known/acme-challenge/... functions as expected. A request to http://hostname.com/... is redirected to https://... correctly but then there is an endless loop of redirects that result in a browser error.
  1. Version of the NetScaler Ingress Controller
  • 2.2.10
  1. Version of MPX/VPX/CPX
  1. Environment variables (minus secrets)
  • Nothing special, deployed with helm, NS_IP and credential secret set.

Expected behavior

If the responder policy were set on the content switch it should work from what I understand.

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

No branches or pull requests

1 participant