SSL Client Certificates? #2568
t00thpick1
started this conversation in
Ideas
Replies: 1 comment
-
With only a brief glance at the unit tests setup, I'd imagine the unit tests would be something close to below. However I did not immediately see how you are doing parameters and the mapping of resource names. /test/test_ssl/test_clientVerify.py def test_web1_ssl_client_verify_success(docker_compose, nginxproxy, clientCertificatePath, clientKeyPath):
r = nginxproxy.get("https://web1.nginx-proxy.tld:8443/port", allow_redirects=False, cert=(clientCertificatePath, clientKeyPath))
assert r.status_code == 200
def test_web1_ssl_client_verify_failure_bad_cert(docker_compose, nginxproxy, badClientCertificatePath, badClientKeyPath):
r = nginxproxy.get("https://web1.nginx-proxy.tld:8443/port", allow_redirects=False, cert=(badClientCertificatePath, badClientKeyPath))
assert r.status_code == 495
def test_web1_ssl_client_verify_failure_no_cert(docker_compose, nginxproxy):
r = nginxproxy.get("https://web1.nginx-proxy.tld:8443/port", allow_redirects=False)
assert r.status_code == 496 /test/test_ssl/test_clientVerify.yml services:
web1:
image: web
expose:
- "81"
environment:
WEB_PORTS: "81"
VIRTUAL_HOST: "*.nginx-proxy.tld"
sut:
image: nginxproxy/nginx-proxy:test
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./certs:/etc/nginx/certs:ro
- ./ca:/etc/nginx/ca:ro
- ./acme_root:/usr/share/nginx/html:ro
environment:
HTTP_PORT: 8080
HTTPS_PORT: 8443 With some added certificates in /test/test_ssl/ca |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
There have been two PR's in the past, one closed itself as a duplicate, the other dropped the SSL Client Certificate part due to a lack of unit tests, but it seems it was forgotten after the remainder of that PR was merged. Any chance this feature could be reconsidered?
#1197
#1644
Beta Was this translation helpful? Give feedback.
All reactions