-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Feature Request]: Enable auth for all locations (security opt-out) #3276
Comments
Hello, having the same requirement here. Thanks |
Hello, we worked around by creating a server-snippet kind: ConfigMap
apiVersion: v1
metadata:
name: ingress
namespace: default
labels:
data:
server-snippet: |
auth_basic "Local Users";
auth_basic_user_file /etc/auth/users; hope this helps |
@Kalise, if you are interested, I have referenced a PR which solves this issue. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/close |
@okryvoshapka-connyun: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Is this a request for help? (If yes, you should use our troubleshooting guide and community support channels, see https://kubernetes.io/docs/tasks/debug-application-cluster/troubleshooting/.): No
What keywords did you search in NGINX Ingress controller issues before filing this one? (If you have found any duplicates, you should instead reply there.):
Is this a BUG REPORT or FEATURE REQUEST? (choose one):
FEATURE REQUEST
NGINX Ingress controller version:
0.19.0
Kubernetes version (use
kubectl version
):What happened:
We have several applications (~20) running in the cluster. Most of them need to be protected by external auth (all except UI).
We have a bouncer-service (deployed under the path
/srv/bouncer/api/v1
) who is responsible for checking the auth header (on/me
endpoint).Looks like that the only official way to protect all services is to protect every service (security opt-in), by adding annotation
to every service's ingress.
We have found a way around to turn it into security opt-out concept by using snippets.
For nginx configuration we are using location-snippet:
And for bouncer-ingress we are using annotation:
What you expected to happen:
Would be nice to be able to set the global external auth to protect all the services at once with external auth using nginx-controller configuration.
Then the whole security can be handled very well in combination with
no-auth-locations
, presented in in #2243Anything else we need to know:
Unfortunately the presented concept works only when
enable-dynamic-configuration: "false"
because of https://github.com/kubernetes/ingress-nginx/pull/2280/commits as in our case the external auth location is not an auto-generated locatiob blocklocation = /_external-auth-Lv {}
, but a normal one as for any other service withset $proxy_upstream_name "default-bouncer-svc-80";
The text was updated successfully, but these errors were encountered: