lua: add connection():ssl() API#3761
lua: add connection():ssl() API#3761mattklein123 merged 10 commits intoenvoyproxy:masterfrom dio:lua-connection-secure
Conversation
This patch adds connection():secure() API to check whether the current connection is using SSL or not. Signed-off-by: Dhi Aurrahman <dio@rockybars.com>
Signed-off-by: Dhi Aurrahman <dio@rockybars.com>
Signed-off-by: Dhi Aurrahman <dio@rockybars.com>
| Connection object API | ||
| --------------------- | ||
|
|
||
| secure() |
There was a problem hiding this comment.
Thing for the future where I'm guessing people are going to ask for SSL/TLS connection properties in Lua, should we instead return an SSL/TLS object? This object could have no methods right now but the presence of the object or nil could indicate secure? Just thinking for the future. Thoughts?
There was a problem hiding this comment.
Seems like a good idea. Will update it.
Signed-off-by: Dhi Aurrahman <dio@rockybars.com>
If not nil then it is secure and vice versa. Signed-off-by: Dhi Aurrahman <dio@rockybars.com>
Signed-off-by: Dhi Aurrahman <dio@rockybars.com>
Signed-off-by: Dhi Aurrahman <dio@rockybars.com>
Signed-off-by: Dhi Aurrahman <dio@rockybars.com>
|
@dio Thank you so much for adding this and the protocol API, useful stuff. |
mattklein123
left a comment
There was a problem hiding this comment.
Nice, small doc question.
|
|
||
| Returns the current request's underlying :repo:`connection <include/envoy/network/connection.h>`. | ||
|
|
||
| Returns a :ref:`metadata object <config_http_filters_lua_connection_wrapper>`. |
There was a problem hiding this comment.
"metadata object" ? Is this a copy/paste error?
There was a problem hiding this comment.
@mattklein123 oops. Sorry about that. Fixed in 22680ac.
Signed-off-by: Dhi Aurrahman <dio@rockybars.com>
|
@dio looks like coverage is below the limit. You might need to look at adding some: https://s3.amazonaws.com/lyft-envoy/coverage/report-master/coverage.html. Unfortunately looks like we have slipped again. |
|
OK, will take a look. |
Signed-off-by: Dhi Aurrahman <dio@rockybars.com>
|
@mattklein123 I guess it looks OK now. |
Description:
This patch adds
connection():ssl()toStreamHandleWrapper. ThisAPI returns the indication if the underlying connection using SSL or not.
Risk Level: Low
Testing:
Unit and integration tests
Docs Changes:
connection():ssl()API.Release Notes:
connection()wrapper andssl()API.Related PR: #3760 (merged)
Fixes #3704
Signed-off-by: Dhi Aurrahman dio@rockybars.com