openshift / origin

Conformance test suite for OpenShift
http://www.openshift.org
Apache License 2.0
8.48k stars 4.7k forks source link

Integrate simple auth basic to Openshift Routes. #20324

Open jkroepke opened 6 years ago

jkroepke commented 6 years ago

Hi,

HAProxy supports auth basic. Sometimes its required to simply protect debug/dev or web server stats urls.

It would be nicely if routes can be project via annotations. Is might looks insecure, but since certificates are included as plaintext so it should be okay.

Version
oc version
oc v3.9.0+191fece
kubernetes v1.9.1+a0ce1bc657
features: Basic-Auth

Server 
openshift v3.9.0+71543b2-33
kubernetes v1.9.1+a0ce1bc657
Additional Information

HAProxy documentations: https://cbonte.github.io/haproxy-dconv/1.8/configuration.html#3.4

With the new ingress handler upcoming in 3.10, auth basic credentials can be provided as secret like: https://github.com/kubernetes/ingress-nginx/tree/c9fcefe8401cb9e61d5989d836aa7e9dbda71ca1/docs/examples/auth/basic

hufon commented 6 years ago

+1

jwforres commented 6 years ago

@openshift/sig-network-edge

openshift-merge-robot commented 5 years ago

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

jkroepke commented 5 years ago

/lifecycle frozen

jkroepke commented 5 years ago

/remove-lifecycle stale

ibotty commented 3 years ago

That would be really great. It is possible with custom templating and mounting a secret. Would you accept a PR implementing it?

jkroepke commented 3 years ago

mounting a secret

RedHat decide to avoid a dependency against user provided secrets.

Thats one reason why certificate and private keys are part of the Route object.

It looks like the content of a htaccss needs to be passed inside a value of a annotation.