satorix-rails 1.1.7 → 1.1.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ee5e2a9bca28a5625d0d6c611c585d1d6b32b02a
4
- data.tar.gz: 678aed79747a3c59bcdca0a9f2cf435feaa5823a
3
+ metadata.gz: 0b9d6f9e7b878b946c92879ecdca57539e17b726
4
+ data.tar.gz: 51f759acfe38d749d2d629f9c0c2d0aaba1c4a2a
5
5
  SHA512:
6
- metadata.gz: 83da29607fba4219c0377040617fe74a45b4d8c473ced5ad3d07e9e5454c6929b8a23a8fb2339a66ea5a2fa391642123d13d007d83ab7790f640034826ad51eb
7
- data.tar.gz: 9ef8a25c787bf82dfa15f7ac41d338209c54cd084c33921797e15f5449f633e40e64a585f3ff066d257f0eba8cee79be51d34b0bc9ca73431d060b220ee0dc36
6
+ metadata.gz: 3061312baa499d9421499caf785bb7239c6199e1d8811f6b6fb996a1e31c65cafe5485fcef62b81a6d9e785313c1428bb8dc6fb363260bc00b6cfdd4cc4ecc79
7
+ data.tar.gz: 98dc15e19de99dc0e7f160aa5a265b9fee5525b87a6c3f4cc7d215990dd8dad9d14f4db91fb27690c8dbc5f5d2e5b50bd2e3542031ab10223a5f96f51fd38255
data/README.md CHANGED
@@ -6,22 +6,19 @@ By [Internet Exposure](https://www.iexposure.com/)
6
6
  [![coverage](http://gitlab.iexposure.com/satorix/satorix-rails/badges/master/coverage.svg)](http://gitlab.iexposure.com/satorix/satorix-rails/pipelines)
7
7
 
8
8
 
9
- [Satorix](http://gitlab.iexposure.com/satorix/satorix) is a full-featured CI/CD pipeline developed by Internet Exposure.
9
+ [Satorix](https://www.satorix.com): Get your app from local to live
10
10
 
11
- The satorix-rails gem provides a streamlined mechanism for a 12-factor capable Rails application to interact with the Satorix ecosystem.
11
+ The `satorix-rails` gem provides a streamlined mechanism for a 12-factor capable Rails application to interact with the Satorix ecosystem.
12
12
 
13
-
14
- ## Getting Started
13
+ ## Preparing your application
15
14
 
16
15
  Add Satorix to your Rails application by including it in your Gemfile with:
17
16
 
18
17
  ```ruby
19
- source 'https://gems.iexposure.com' do
20
- gem 'satorix-rails'
21
- end
18
+ gem 'satorix-rails'
22
19
  ```
23
20
 
24
- Run the bundle command to install it.
21
+ Run the `bundle` command to install it.
25
22
 
26
23
  Next, run the generator from a terminal at the root of your application:
27
24
 
@@ -29,7 +26,7 @@ Next, run the generator from a terminal at the root of your application:
29
26
  $ rails g satorix:install
30
27
  ```
31
28
 
32
- Congratulations, your application is now suitable for deployment into Satorix.
29
+ This creates a set of files that utilize environment variables created by default with Satorix. These include the [Phusion Passenger Rails app server](https://www.phusionpassenger.com/) and the Passenger built in Nginx web server.
33
30
 
34
31
  # Logging in Rails 4 and below
35
32
 
@@ -40,57 +37,62 @@ You will need to either:
40
37
  * add `gem 'rails_12factor', group: :production` to your Gemfile
41
38
  * Set `config.logger = Logger.new(STDOUT)` in `config/environments/production.rb`
42
39
 
40
+ # Configuring your application
43
41
 
44
- ## What's Included
42
+ You can configure your application on a per-environment basis using environment variables.
45
43
 
44
+ ### Default environment Variables
46
45
 
47
- ## Environment Variables
46
+ The following default environment variables are used by the `satorix-rails` generated files and can be managed through the Satorix Dashboard:
48
47
 
49
- You can configure your application on a per-environment basis using environment variables.
48
+ ##### SATORIX_CANONICAL_URI_HOST
50
49
 
51
- The following environment variables are used by the generated files:
50
+ *Optional*, a domain to rewrite all requests to by default. Setting this will make it so all requests to your site will go to the supplied domain.
52
51
 
53
- Using the Satorix Dashboard? You can relax, all of these variables are automatically configured for you.
52
+ Common setting:
54
53
 
55
- ##### SATORIX_AUTHENTICATION_USER_NAMES_AND_PASSWORDS
54
+ * `www.domain.dom`
56
55
 
57
- Optional
56
+ ##### SATORIX_CANONICAL_URI_PROTOCOL
58
57
 
59
- Hashed usernames:passwords, newline separated
58
+ *Optional*, the `HTTP` protocol to rewrite requests to.
60
59
 
61
- ##### SATORIX_AUTHENTICATION_ALLOWED_IPS
60
+ Valid settings:
62
61
 
63
- Optional
62
+ * `http`
63
+ * `https`
64
64
 
65
- Valid settings:
65
+ ##### SATORIX_PROXY_IPS
66
66
 
67
- * all (`all`)
68
- * single IP (`192.168.101.2`)
69
- * single IP range (`192.168.101.0/24`)
70
- * multiple IPs/ranges (`192.168.101.3 192.168.1.4`)
67
+ *Optional*, used to define proxy IP addresses, for services like CloudFlare. This will allow you to get the actual client IP address accessing your site in the logs and accessible to your application.
71
68
 
72
- ##### SATORIX_CANONICAL_URI_HOST
69
+ Valid settings:
73
70
 
74
- Optional
71
+ * Space separated list of IPs or network ranges (`103.21.244.0/22 103.22.200.0/22 103.31.4.0/22 104.16.0.0/12 108.162.192.0/18 131.0.72.0/22 141.101.64.0/18 162.158.0.0/15 172.64.0.0/13 173.245.48.0/20 188.114.96.0/20 190.93.240.0/20 197.234.240.0/22 198.41.128.0/17 199.27.128.0/21`)
75
72
 
76
- If specified, t
73
+ ##### SATORIX_AUTHENTICATION_HTPASSWDS
77
74
 
78
- ##### SATORIX_CANONICAL_URI_PROTOCOL
75
+ *Optional*, used to control access to your site with HTTP Basic authentication. Needs to be generated in the format created by the Apache tool `htpasswd -nb username password` or using an [online generator](http://www.htaccesstools.com/htpasswd-generator/).
79
76
 
80
- Optional
77
+ Valid settings:
81
78
 
82
- ##### SATORIX_PROXY_IPS
79
+ * Newline separated list of username and hashed password (`username:$apr1$vAxBKb8N$m0en1zabtHktHeFyT3j9y`)
80
+
81
+ ##### SATORIX_AUTHENTICATION_ALLOWED_IPS
83
82
 
84
- was NGINX_ADDITIONAL_REAL_IPS
83
+ *Optional*, used to control access to your site by bypassing the above HTTP Basic authentication. If set to `all` no authentication will be required. Any IP addresses or networks added here will not need to supply the username and password to access the site.
85
84
 
86
- Used to define proxy IP addresses, for services like CloudFlare.
85
+ Valid settings:
87
86
 
87
+ * All (`all`)
88
+ * Single IP (`192.168.1.2`)
89
+ * Network range (`192.168.1.0/24`)
90
+ * Space separated list of multiple IPs or network ranges (`192.168.1.3 192.168.2.0/24`)
88
91
 
89
92
  ## Contributing
90
93
 
91
94
  Please coordinate contributions using the [official issue tracker](http://gitlab.iexposure.com/satorix/satorix-rails/issues).
92
95
 
93
-
94
96
  ## Testing
95
97
 
96
98
  This application is tested using [rspec](http://rspec.info/).
@@ -100,8 +102,7 @@ You can run the same tests that run during CI with:
100
102
  ```
101
103
  bundle exec rspec spec
102
104
  ```
103
-
104
-
105
+
105
106
  ## CI/CD
106
107
 
107
108
  Satorix is used to provide continuous integration and continuous deployment for this application.
@@ -110,9 +111,6 @@ CI is run against every push.
110
111
 
111
112
  CD is used to build and publish the gem for the master branch.
112
113
 
113
-
114
-
115
114
  ## License
116
115
 
117
-
118
116
  The Satorix gem is released under the terms described in the [LICENSE file](LICENSE).
@@ -22,16 +22,16 @@
22
22
  end
23
23
 
24
24
  allowed_without_auth = ENV['SATORIX_AUTHENTICATION_ALLOWED_IPS'].to_s.split
25
- allowed_without_auth = ['any'] if allowed_without_auth.empty?
25
+ allowed_without_auth = ['all'] if allowed_without_auth.empty?
26
26
  -%>
27
27
 
28
28
  # Allow listed networks to access without auth, otherwise require password if defined
29
29
  location / {
30
30
  satisfy any;
31
- deny all;
32
31
  <%% allowed_without_auth.each do |target| -%>
33
32
  allow <%%= target %>;
34
33
  <%% end -%>
34
+ deny all;
35
35
  <%% if File.file?(password_file_location('htpasswd')) -%>
36
36
  auth_basic "Please Log In";
37
37
  auth_basic_user_file <%%= password_file_location('htpasswd') %>;
@@ -1,7 +1,7 @@
1
1
  module Satorix
2
2
  module Rails
3
3
  module Version
4
- VERSION = '1.1.7'
4
+ VERSION = '1.1.8'
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: satorix-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.7
4
+ version: 1.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Internet Exposure
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-09-13 00:00:00.000000000 Z
11
+ date: 2019-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: passenger