From 2e42e7d22a5b44f021cb2e1967fe3bfa5c7c5cfb Mon Sep 17 00:00:00 2001
From: Adar Nimrod <nimrod@shore.co.il>
Date: Thu, 22 Apr 2021 02:04:45 +0300
Subject: [PATCH] Snippet for LDAP authentication.

---
 snippets/ldap-auth.conf | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 snippets/ldap-auth.conf

diff --git a/snippets/ldap-auth.conf b/snippets/ldap-auth.conf
new file mode 100644
index 0000000..55f4cbc
--- /dev/null
+++ b/snippets/ldap-auth.conf
@@ -0,0 +1,15 @@
+auth_request    /validate;
+
+location = /validate {
+  proxy_pass                        https://auth.shore.co.il/validate;
+  proxy_http_version                1.1;
+  proxy_ssl_verify                  on;
+  proxy_ssl_verify_depth            3;
+  proxy_ssl_name                    auth.shore.co.il;
+  proxy_ssl_server_name             on;
+  proxy_ssl_trusted_certificate     /etc/ssl/certs/ca-certificates.crt;
+  internal;
+  include                           snippets/proxy-headers.conf;
+  proxy_pass_request_body           off;
+  proxy_set_header Content-Length   "";
+}
-- 
GitLab