aboutsummaryrefslogtreecommitdiff
path: root/nixops/modules
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2019-04-15 12:30:08 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2019-04-15 12:30:56 +0200
commit415bcd272a0cbd65494fbb245bd94f0420656044 (patch)
tree26babca016fa1d65d1dad89ee74c29f47cdff949 /nixops/modules
parent0962f4e8bdfc1ede00c4d8de7e9a1a383283f47a (diff)
downloadNix-415bcd272a0cbd65494fbb245bd94f0420656044.tar.gz
Nix-415bcd272a0cbd65494fbb245bd94f0420656044.tar.zst
Nix-415bcd272a0cbd65494fbb245bd94f0420656044.zip
Move ldap keys to secure location
Related issue: https://git.immae.eu/mantisbt/view.php?id=122
Diffstat (limited to 'nixops/modules')
-rw-r--r--nixops/modules/websites/default.nix29
1 files changed, 19 insertions, 10 deletions
diff --git a/nixops/modules/websites/default.nix b/nixops/modules/websites/default.nix
index 307af08..f820c83 100644
--- a/nixops/modules/websites/default.nix
+++ b/nixops/modules/websites/default.nix
@@ -229,6 +229,24 @@ in
229 services.myWebsites.TellesFlorian.integration.enable = true; 229 services.myWebsites.TellesFlorian.integration.enable = true;
230 services.myWebsites.Florian.integration.enable = true; 230 services.myWebsites.Florian.integration.enable = true;
231 231
232 deployment.keys.apache-ldap = {
233 user = "wwwrun";
234 group = "wwwrun";
235 permissions = "0700";
236 text = ''
237 <Macro LDAPConnect>
238 <IfModule authnz_ldap_module>
239 AuthLDAPURL ldap://ldap.immae.eu:389/dc=immae,dc=eu STARTTLS
240 AuthLDAPBindDN cn=httpd,ou=services,dc=immae,dc=eu
241 AuthLDAPBindPassword "${myconfig.env.httpd.ldap.password}"
242 AuthType Basic
243 AuthName "Authentification requise (Acces LDAP)"
244 AuthBasicProvider ldap
245 </IfModule>
246 </Macro>
247 '';
248 };
249
232 services.myWebsites.apacheConfig = { 250 services.myWebsites.apacheConfig = {
233 gzip = { 251 gzip = {
234 modules = [ "deflate" "filter" ]; 252 modules = [ "deflate" "filter" ];
@@ -266,16 +284,7 @@ in
266 LDAPOpCacheTTL 600 284 LDAPOpCacheTTL 600
267 </IfModule> 285 </IfModule>
268 286
269 <Macro LDAPConnect> 287 Include /run/keys/apache-ldap
270 <IfModule authnz_ldap_module>
271 AuthLDAPURL ldap://ldap.immae.eu:389/dc=immae,dc=eu STARTTLS
272 AuthLDAPBindDN cn=httpd,ou=services,dc=immae,dc=eu
273 AuthLDAPBindPassword "${myconfig.env.httpd.ldap.password}"
274 AuthType Basic
275 AuthName "Authentification requise (Acces LDAP)"
276 AuthBasicProvider ldap
277 </IfModule>
278 </Macro>
279 ''; 288 '';
280 }; 289 };
281 global = { 290 global = {