-
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
TLS Client Certificate validation policy [THREESCALE-1671] #966
Conversation
Hi @mikz. |
@y-tabata yes, this policy enables validation of TLS Client certificates used by clients when connecting to APIcast. |
Extracted from 3scale/APIcast#966
52f7c1b
to
777a66e
Compare
Extracted from 3scale/APIcast#966
proxy_ssl_certificate_key $TEST_NGINX_SERVER_ROOT/html/client.key; | ||
proxy_pass https://$server_addr:$apicast_port/t; | ||
proxy_set_header Host localhost; | ||
log_by_lua_block { collectgarbage() } |
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.
Why is this needed?
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.
To run the Test::Nginx memory leak test mode. I was worried that there are some memory leaks in the OpenSSL wrapper, so I was running the memory leak checker.
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.
👍
|
||
policy:access() | ||
|
||
assert.stub(ngx.exit).was_called_with(400) |
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.
Would 403 be more appropriate?
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.
I think I got the 400 from testing normal nginx certificate veritifation.
Extracted from 3scale/APIcast#966
Extracted from 3scale/APIcast#966
Extracted from 3scale/APIcast#966
BIO, EVP, X509, X509 Store and CTX to read, print and validate certificates.
Validate TLS Client Certiticate against a whitelist of individual certificates or CAs.
777a66e
to
31e6c22
Compare
Experiment with FFI and OpenSSL to validate client certificates.
rover exec bin/busted spec/resty/openssl --repeat=10000 --no-auto-insulate
without memory leaksIn case of expired or not yet valid certificate nginx rejects the client certificate right away before applying any policies.