]> Frank Brehm's Git Trees - pixelpark/hiera.git/commitdiff
spk: add ip requires
authorAndreas Gerstenberg <gerstenberg@pixelpark.com>
Wed, 16 Aug 2017 13:45:18 +0000 (15:45 +0200)
committerAndreas Gerstenberg <gerstenberg@pixelpark.com>
Wed, 16 Aug 2017 13:45:18 +0000 (15:45 +0200)
customer/spk-spar-checker/test.yaml

index 275cf221c9e36f6e2e3ba20d2347b5c470195899..a8e89b547482becff987fd0f929fde4b1f0fd98d 100644 (file)
@@ -34,8 +34,7 @@ infra::profile::apache::pp_vhosts:
     docroot_group: apache
     docroot_mode: '0775'
     directories:
-      - directory_root:
-        provider: directory
+      - provider: directory
         path: '/var/www/spar-checker/sparchecker-frontend/'
         addhandlers:
           - { handler: "proxy:unix:/var/run/php5-fpm-sparchecker.sock|fcgi://./" , extensions: '.php' }
@@ -47,8 +46,7 @@ infra::profile::apache::pp_vhosts:
         directoryindex: 'index.php index.html'
         setenv:
           - 'APPLICATION_ENV production'
-      - location_root:
-        provider: location
+      - provider: location
         path: '/'
         auth_type: Digest
         auth_name: server
@@ -56,17 +54,25 @@ infra::profile::apache::pp_vhosts:
         auth_digest_algorithm: MD5
         auth_user_file: '/etc/httpd/htdigest'
         auth_require: 'valid-user'
-      - location_api:
-        provider: location
+      - provider: location
         path: '/api'
-      - location_sfp:
-        provider: location
+      - provider: location
         path: '/sfp'
+        auth_type: Digest
+        auth_name: server
+        auth_digest_provider: file
+        auth_digest_algorithm: MD5
+        auth_user_file: '/home/deploy.spk/spar-checker-conf/htdigest'
+        requires:
+          - 'valid-user'
+          - 'ip 80.146.239.2/32'
+          - 'ip 109.86.229.215/32'
+          - 'ip 195.69.134.114/32'
+          - 'ip 195.69.134.114/32'
         error_documents:
           - { error_code: 401 , document: "/401.html" }
 
-      - directory_sfp:
-        provider: directory
+      - provider: directory
         path: '/var/www/spar-checker/sparchecker-backend/public/sfp/'
         addhandlers:
           - { handler: "proxy:unix:/var/run/php5-fpm-sparchecker.sock|fcgi://./" , extensions: '.php' }
@@ -95,8 +101,7 @@ infra::profile::apache::pp_vhosts:
             rewrite_rule:
               - '^(.*)$ %%{ich-trickse}{ENV:BASE}/index.php [L]'
 
-      - directory_api:
-        provider: directory
+      - provider: directory
         path: '/var/www/spar-checker/sparchecker-backend/public/api/'
         addhandlers:
           - { handler: "proxy:unix:/var/run/php5-fpm-sparchecker.sock|fcgi://./" , extensions: '.php' }