From c8b016c446f8267c36807d56f7fa5a6bf6bbab71 Mon Sep 17 00:00:00 2001 From: Marcello Stanisci Date: Mon, 3 Dec 2018 12:40:04 +0100 Subject: BB Web auth. Trying Nginx authentication feature. --- etc/nginx/sites-enabled/buildbot-ssl.site | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'etc/nginx') diff --git a/etc/nginx/sites-enabled/buildbot-ssl.site b/etc/nginx/sites-enabled/buildbot-ssl.site index ba998bb..99696df 100644 --- a/etc/nginx/sites-enabled/buildbot-ssl.site +++ b/etc/nginx/sites-enabled/buildbot-ssl.site @@ -11,6 +11,21 @@ server { server_name bb.taler.net; include conf.d/talerssl; + # location /api/v2/builders maps to the builder's + # "view", so there is no need to restrict the access there. + + # This location is _usually_ targeted by POSTs in order + # to trigger builds. + location /api/v2/builds { + auth_basic "Core devs restricted area"; + auth_basic_user_file "/etc/nginx/htpasswd"; + proxy_pass http://127.0.0.1:8010; + proxy_redirect off; + proxy_set_header Host $host; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + } + location / { proxy_pass http://127.0.0.1:8010; proxy_redirect off; -- cgit v1.2.3