-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[nginx] allow enabling proxy_ssl_verify
[nginx] proxy ssl verification off by default because it would be off in the resulting docker image so better to have it the same in development
- Loading branch information
Showing
7 changed files
with
71 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# This file is not in the built docker image and have to be added by hand. | ||
|
||
proxy_ssl_trusted_certificate ca-bundle.crt; | ||
proxy_ssl_verify on; | ||
proxy_ssl_verify off; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# SSL/TLS Verification | ||
|
||
APIcast supports certificate verification against trusted CAs. This feature is off by default because some environments use custom CAs and would make those connections fail by default. | ||
|
||
## Upstream verification | ||
|
||
This validation is controller by `proxy_ssl_*` nginx directives. Everything is set up to use default OS trusted certificates. Only step needed is to add custom configuration to enable the verification: | ||
|
||
```nginx | ||
# apicast.d/proxy_ssl.conf | ||
proxy_ssl_verify on; | ||
``` | ||
|
||
## 3scale AMP verification | ||
|
||
To enable verification for connections between APIcast and 3scale AMP you'll need to set `OPENSSL_VERIFY` environment variable. Everything is set up to use the default OS trusted certificate chain. | ||
|
||
```shell | ||
docker run --env OPENSSL_VERIFY=true apicast | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"services": [ | ||
{ | ||
"id": "wrong-host", | ||
"backend_version": 1, | ||
"proxy": { | ||
"api_backend": "https://wrong.host.badssl.com", | ||
"hosts": [ | ||
"wrong.host.badssl.com" | ||
], | ||
"proxy_rules": [ | ||
{ | ||
"http_method": "GET", | ||
"pattern": "/", | ||
"metric_system_name": "hits", | ||
"delta": 1 | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"id": "ok-host", | ||
"backend_version": 1, | ||
"proxy": { | ||
"api_backend": "https://badssl.com", | ||
"hosts": [ | ||
"badssl.com" | ||
], | ||
"proxy_rules": [ | ||
{ | ||
"http_method": "GET", | ||
"pattern": "/", | ||
"metric_system_name": "hits", | ||
"delta": 1 | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
proxy_ssl_verify on; |