-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[THREESCALE-10156] Configure ssl_verify_client per product #1491
Changes from 7 commits
7aa2362
219c79f
68a45ce
6cd73e7
cc090de
2850210
e85a9ce
c7f735b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -402,6 +402,15 @@ Path to a file with the X.509 certificate secret key in the PEM format. | |||||||||
Defines the maximum length of the client certificate chain. | ||||||||||
If this parameter has `1` as its value, it is possible to include an additional certificate in the client certificate chain. For example, root certificate authority. | ||||||||||
|
||||||||||
### `APICAST_HTTPS_VERIFY_CLIENT` | ||||||||||
|
||||||||||
**Default:** `optional_no_ca` | ||||||||||
**Values:** | ||||||||||
- `off`: Don't request client certificates and don't do client certificate verification. | ||||||||||
- `optional_no_ca`: Requests the client certificate, but does not fail the request when the client certificate is not signed by a trusted CA certificate. | ||||||||||
|
||||||||||
Enables verification of client certificates. The client certificates can be verified with TLS Client Certificate Validation policy | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed. |
||||||||||
|
||||||||||
### `all_proxy`, `ALL_PROXY` | ||||||||||
|
||||||||||
**Default:** no value | ||||||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -5,3 +5,26 @@ This policy can validate TLS Client Certificate against a whitelist. | |||||
Whitelist expects PEM formatted CA or Client certificates. | ||||||
It is not necessary to have the full certificate chain, just partial matches are allowed. | ||||||
For example you can add to the whitelist just leaf client certificates without the whole bundle with a CA certificate. | ||||||
|
||||||
## Configuration | ||||||
|
||||||
For this policy to work, APIcast need to be setup to listen for TLS connection. | ||||||
|
||||||
By default, client certificates are requested during the TLS handshake, however, APIcast will not verify the certificate or terminate the request unless a TLS Validation Policy is in the chain. In most cases, the client not presenting a client certificate will not affect a service that does not have TLS Validation policy configured. The only exception is when the service is used by a browser or front-end application, which will cause the browser to always prompt the end user to select a client certificate to send if they have ANY client certificates configured when browsing the service. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed. |
||||||
|
||||||
To work around this, the environment variable `APICAST_HTTPS_VERIFY_CLIENT` can be set to `off` to instruct APIcast to request a client certificate ONLY when the policy is in the chain. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed. |
||||||
|
||||||
NOTE: This policy is not compatible with `APICAST_PATH_ROUTING` or `APICAST_PATH_ROUTING_ONLY` when `APICAST_HTTPS_VERIFY_CLIENT` is set to `off`. | ||||||
|
||||||
## Example | ||||||
|
||||||
``` | ||||||
{ | ||||||
"name": "apicast.policy.tls_validation", | ||||||
"configuration": { | ||||||
"whitelist": [ | ||||||
{ "pem_certificate": ""-----BEGIN CERTIFICATE----- XXXXXX -----END CERTIFICATE-----"} | ||||||
] | ||||||
} | ||||||
} | ||||||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggesting the removal of the contraction and use of "don't" twice in one line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.