add config ALLOW_ADMIN_EMAIL_LOGIN and implement password-less SOGo login admins

This commit is contained in:
Marcel Hofer
2019-02-23 17:59:18 +01:00
parent 9213d65c85
commit cac67db203
12 changed files with 1104 additions and 991 deletions

View File

@@ -164,6 +164,17 @@ server {
client_max_body_size 0;
}
# auth_request endpoint if ALLOW_ADMIN_EMAIL_LOGIN is set
location /sogo-auth-verify {
internal;
proxy_set_header X-Original-URI $request_uri;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_set_header Content-Length "";
proxy_pass http://127.0.0.1:80/sogo-auth;
proxy_pass_request_body off;
}
location ^~ /SOGo {
include /etc/nginx/conf.d/sogo.active;
proxy_set_header X-Real-IP $remote_addr;

View File

@@ -0,0 +1,7 @@
if printf "%s\n" "${ALLOW_ADMIN_EMAIL_LOGIN}" | grep -E '^([yY][eE][sS]|[yY])+$' >/dev/null; then
echo '
auth_request /sogo-auth-verify;
auth_request_set $user $upstream_http_x_username;
proxy_set_header x-webobjects-remote-user $user;
'
fi