Skip to content

Instantly share code, notes, and snippets.

@icy
Created December 10, 2019 16:35
Show Gist options
  • Save icy/52f3fe241994ad54c2519c3447c80355 to your computer and use it in GitHub Desktop.
Save icy/52f3fe241994ad54c2519c3447c80355 to your computer and use it in GitHub Desktop.
security-nginx-ingress-controller.yaml
### A flaw setup of nginx ingress controller
Assuming you have two sites `publicA` and `privateB`, both are running on
the same `k8s` cluster and exposing accesses through nginx ingress controller.
The site `publicA` requires authentication and the site `privateB`
doesn't. Let's consider the following setup
public ELB/ALB --> public A with authentication
private ELB/ALB --> private B
If `privateB` doesn't have any password protection, it may be accessed
from public domain as below
curl -L <publicA> -H "Host: <privateB>"
Mitigation:
* Using some whitelist
* Use a different ingress class for private services
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment