Skip to content

Commit 8536f75

Browse files
committed
Merge branch 'release/v2.0.5'
2 parents cf735ad + 44bc841 commit 8536f75

File tree

8 files changed

+78
-45
lines changed

8 files changed

+78
-45
lines changed

CHANGELOG.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5-
## [Unreleased](https://github.com/passbolt/passbolt_docker/compare/v2.0.4...HEAD)
5+
## [Unreleased](https://github.com/passbolt/passbolt_docker/compare/v2.0.5...HEAD)
6+
7+
## [2.0.5](https://github.com/passbolt/passbolt_docker/compare/v2.0.4...v2.0.5) - 2018-05-08
8+
9+
### Fixed
10+
11+
- Nginx configuration file root directive for passbolt
612

713
## [2.0.4](https://github.com/passbolt/passbolt_docker/compare/v2.0.2...v2.0.4) - 2018-04-26
814

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM php:7-fpm
22

33
LABEL maintainer="[email protected]"
44

5-
ARG PASSBOLT_VERSION="2.0.4"
5+
ARG PASSBOLT_VERSION="2.0.5"
66
ARG PASSBOLT_URL="https://github.com/passbolt/passbolt_api/archive/v${PASSBOLT_VERSION}.tar.gz"
77

88
ARG PHP_EXTENSIONS="gd \

Gemfile.lock

+6-6
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@ GEM
33
specs:
44
coderay (1.1.2)
55
diff-lcs (1.3)
6-
docker-api (1.34.0)
6+
docker-api (1.34.2)
77
excon (>= 0.47.0)
88
multi_json
9-
excon (0.60.0)
9+
excon (0.62.0)
1010
method_source (0.9.0)
11-
multi_json (1.12.2)
11+
multi_json (1.13.1)
1212
net-scp (1.2.1)
1313
net-ssh (>= 2.6.5)
1414
net-ssh (4.2.0)
1515
net-telnet (0.1.1)
1616
pry (0.11.3)
1717
coderay (~> 1.1.0)
1818
method_source (~> 0.9.0)
19-
rake (12.3.0)
19+
rake (12.3.1)
2020
rspec (3.7.0)
2121
rspec-core (~> 3.7.0)
2222
rspec-expectations (~> 3.7.0)
@@ -32,14 +32,14 @@ GEM
3232
rspec-mocks (3.7.0)
3333
diff-lcs (>= 1.2.0, < 2.0)
3434
rspec-support (~> 3.7.0)
35-
rspec-support (3.7.0)
35+
rspec-support (3.7.1)
3636
serverspec (2.41.3)
3737
multi_json
3838
rspec (~> 3.0)
3939
rspec-its
4040
specinfra (~> 2.72)
4141
sfl (2.3)
42-
specinfra (2.73.0)
42+
specinfra (2.73.3)
4343
net-scp
4444
net-ssh (>= 2.7, < 5.0)
4545
net-telnet

conf/passbolt.conf

+22-31
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,23 @@ server {
1010
keepalive_timeout 5 5;
1111
send_timeout 10;
1212

13-
root /var/www/passbolt;
13+
root /var/www/passbolt/webroot;
14+
index index.php;
1415

1516
location / {
1617
try_files $uri $uri/ /index.php?$args;
17-
index index.php;
1818
}
1919

2020
location ~ \.php$ {
21-
fastcgi_index index.php;
22-
fastcgi_pass 127.0.0.1:9000;
23-
fastcgi_split_path_info ^(.+\.php)(.+)$;
24-
include fastcgi_params;
25-
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
26-
fastcgi_param SERVER_NAME $http_host;
27-
fastcgi_param PHP_VALUE "upload_max_filesize=5M \n post_max_size=5M";
28-
}
29-
30-
location ~* \.(jpe?g|woff|woff2|ttf|gif|png|bmp|ico|css|js|ejs|json|pdf|zip|htm|html|docx?|xlsx?|pptx?|txt|wav|swf|svg|avi|mp\d)$ {
31-
access_log off;
32-
log_not_found off;
33-
try_files $uri /webroot/$uri /index.php?$args;
34-
#try_files $uri /app/webroot/$uri /index.php?$args;
21+
try_files $uri =404;
22+
include fastcgi_params;
23+
fastcgi_pass 127.0.0.1:9000;
24+
fastcgi_index index.php;
25+
fastcgi_intercept_errors on;
26+
fastcgi_split_path_info ^(.+\.php)(.+)$;
27+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
28+
fastcgi_param SERVER_NAME $http_host;
29+
fastcgi_param PHP_VALUE "upload_max_filesize=5M \n post_max_size=5M";
3530
}
3631

3732
}
@@ -56,26 +51,22 @@ server {
5651
ssl_ciphers "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4:@STRENGTH";
5752
ssl_session_tickets off;
5853

59-
root /var/www/passbolt;
54+
root /var/www/passbolt/webroot;
55+
index index.php;
6056

6157
location / {
6258
try_files $uri $uri/ /index.php?$args;
63-
index index.php;
6459
}
6560

6661
location ~ \.php$ {
67-
fastcgi_index index.php;
68-
fastcgi_pass 127.0.0.1:9000;
69-
fastcgi_split_path_info ^(.+\.php)(.+)$;
70-
include fastcgi_params;
71-
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
72-
fastcgi_param SERVER_NAME $http_host;
73-
fastcgi_param PHP_VALUE "upload_max_filesize=5M \n post_max_size=5M";
74-
}
75-
76-
location ~* \.(jpe?g|woff|woff2|ttf|gif|png|bmp|ico|css|js|json|pdf|zip|htm|html|docx?|xlsx?|pptx?|txt|wav|swf|svg|avi|mp\d)$ {
77-
access_log off;
78-
log_not_found off;
79-
try_files $uri /webroot/$uri /index.php?$args;
62+
try_files $uri =404;
63+
include fastcgi_params;
64+
fastcgi_pass 127.0.0.1:9000;
65+
fastcgi_index index.php;
66+
fastcgi_intercept_errors on;
67+
fastcgi_split_path_info ^(.+\.php)(.+)$;
68+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
69+
fastcgi_param SERVER_NAME $http_host;
70+
fastcgi_param PHP_VALUE "upload_max_filesize=5M \n post_max_size=5M";
8071
}
8172
}

docker-compose-pro.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ services:
1010
- 3306
1111

1212
passbolt:
13-
image: passbolt/passbolt:2.0.4-pro-debian
13+
image: passbolt/passbolt:2.0.5-pro-debian
1414
tty: true
1515
depends_on:
1616
- db

docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ services:
1010
- 3306
1111

1212
passbolt:
13-
image: passbolt/passbolt:2.0.4-debian
13+
image: passbolt/passbolt:2.0.5-debian
1414
tty: true
1515
depends_on:
1616
- db

spec/docker_image/image_spec.rb

+4
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@
8989
it 'has the correct permissions' do
9090
expect(file(site_conf)).to be_owned_by 'root'
9191
end
92+
93+
it 'points to the correct root folder' do
94+
expect(file(site_conf).content).to match 'root /var/www/passbolt/webroot'
95+
end
9296
end
9397

9498
describe 'ports exposed' do

spec/docker_runtime/runtime_spec.rb

+36-4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
describe 'passbolt_api service' do
44

55
before(:all) do
6+
@mysql_image = Docker::Image.create('fromImage' => 'mariadb:latest')
67
@mysql = Docker::Container.create(
78
'Env' => [
89
'MYSQL_ROOT_PASSWORD=test',
@@ -16,7 +17,7 @@
1617
"mysqladmin ping --silent"
1718
]
1819
},
19-
'Image' => 'mariadb')
20+
'Image' => @mysql_image.id)
2021
@mysql.start
2122

2223
while @mysql.json['State']['Health']['Status'] != 'healthy'
@@ -30,6 +31,7 @@
3031
'DATASOURCES_DEFAULT_PASSWORD=P4ssb0lt',
3132
'DATASOURCES_DEFAULT_USERNAME=passbolt',
3233
'DATASOURCES_DEFAULT_DATABASE=passbolt',
34+
'PASSBOLT_SSL_FORCE=true'
3335
],
3436
'Image' => @image.id)
3537
@container.start
@@ -44,8 +46,10 @@
4446
@container.kill
4547
end
4648

47-
let(:http_path) { "/healthcheck/status.json" }
48-
let(:healthcheck) { 'curl -s -o /dev/null -w "%{http_code}" http://localhost/healthcheck/status.json' }
49+
let(:passbolt_host) { @container.json['NetworkSettings']['IPAddress'] }
50+
let(:uri) { "/healthcheck/status.json" }
51+
let(:curl) { "curl -sk -o /dev/null -w '%{http_code}' -H 'Host: passbolt.local' https://#{passbolt_host}/#{uri}" }
52+
let(:conf_app) { "curl -sk -o /dev/null -w '%{http_code}' -H 'Host: passbolt.local' https://#{passbolt_host}/conf/app.php" }
4953

5054
describe 'php service' do
5155
it 'is running supervised' do
@@ -79,7 +83,35 @@
7983

8084
describe 'passbolt status' do
8185
it 'returns 200' do
82-
expect(command(healthcheck).stdout).to eq '200'
86+
expect(command(curl).stdout).to eq '200'
8387
end
8488
end
89+
90+
describe 'passbolt serverkey unaccessible' do
91+
let(:uri) { '/config/gpg/serverkey.asc' }
92+
it "returns 404" do
93+
expect(command(curl).stdout).to eq '404'
94+
end
95+
end
96+
97+
describe 'passbolt serverkey private unaccessible' do
98+
let(:uri) { '/config/gpg/serverkey_private.asc' }
99+
it 'returns 404' do
100+
expect(command(curl).stdout).to eq '404'
101+
end
102+
end
103+
104+
describe 'passbolt conf unaccessible' do
105+
let(:uri) { '/config/app.php' }
106+
it 'returns 404' do
107+
expect(command(curl).stdout).to eq '404'
108+
end
109+
end
110+
describe 'passbolt tmp folder is unaccessible' do
111+
let(:uri) { '/tmp/cache/database/empty' }
112+
it 'returns 404' do
113+
expect(command(curl).stdout).to eq '404'
114+
end
115+
end
116+
85117
end

0 commit comments

Comments
 (0)