openresty / openresty/lua-nginx-module
[Feature Request / General Approach] OCSP for non-downstream sockets
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 11.8k
- Forks
- 2.1k
- Avg merge
- 6h 1m
- Merged PRs (30d)
- 6
Description
Our OpenResty installation is configured to create a TCP co-socket to upstream servers and making HTTP requests using lua-resty-http.
When calling the co-socket SSL handshake I noticed the 4th parameter is send_status_req which requests OCSP stapling during the handshake.
- I didn't see any code validating the response. And indeed I setup a small setup of an OCSP server and an invalid certificate - and nothing happened. Am I doing something wrong? Is there any functionality to this feature at the moment?
- We would like to have the ability to validate OCSP in case there's no stapling in the response (the upstream server didn't support / want to hand a response). Currently the only way I'm aware of receiving the SSL certificate chain out of the SSL handshake will be to parse the user data with an FFI call to OpenSSL. After having the chain I'd be able to use the very helpful
ngx.ocspto issue the requests with my own strategy. Is this something we'd want to have implemented within the engine (and have configuration to choose the strategy)? I believe at least exposing the SSL handshake certificate chain will be useful to begin with :)
What do you think?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the co-socket SSL handshake, including its send_status_req parameter, and review the existing ngx.ocsp functionality and the proposed OpenSSL FFI certificate-chain access. Done would require a decided scope for validating stapled responses, handling missing stapling, and exposing the certificate chain or configuration strategy.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, nginx
- Domain
- networking, security
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100