Skip to content

Commit d742d5c

Browse files
Jeremy J. Millerthibaultcha
authored andcommitted
feat(*) set default LuaSec protocol to 'any' & expose option
Allows changing the TLS encryption version. The underlying luasec library allows for setting the encryption protocol to 'any' [1]. When set as such, the client negotiates the highest encryption protocol available. This `any` protocol version setting is widely in use in the luasec repository [2]. In my testing, when `any` is set, it resulted in TLSv1.2 being utilized for the conneciton. While I expected TLSv1.3 to be utilized, after some research, I discovered that JDK 8 has had TLSv1.3 support backported to it but TLSv1.3 is not enabled by default and requires extra configuration when starting the JVM [3]. Partially implements #106. [1] - https://github.com/brunoos/luasec/blob/711a98b7605ad87b521ba607024947113bc1f527/CHANGELOG#L101 [2] - https://github.com/brunoos/luasec/search?q=protocol+%3D+%22any%22 [3] - https://www.oracle.com/java/technologies/javase/8u261-relnotes.html#JDK-8145252 Signed-off-by: Jeremy J. Miller <[email protected]> Signed-off-by: Thibault Charbonnier <[email protected]>
1 parent 8ff3adb commit d742d5c

21 files changed

+63
-17
lines changed

docs/examples/authentication.lua.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ <h2>authentication.lua</h2>
108108
</div> <!-- id="main" -->
109109
<div id="about">
110110
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
111-
<i style="float:right;">Last updated 2019-09-25 17:56:05 </i>
111+
<i style="float:right;">Last updated 2021-02-17 16:19:34 </i>
112112
</div> <!-- id="about" -->
113113
</div> <!-- id="container" -->
114114
</body>

docs/examples/batch.lua.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ <h2>batch.lua</h2>
142142
</div> <!-- id="main" -->
143143
<div id="about">
144144
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
145-
<i style="float:right;">Last updated 2019-09-25 17:56:05 </i>
145+
<i style="float:right;">Last updated 2021-02-17 16:19:34 </i>
146146
</div> <!-- id="about" -->
147147
</div> <!-- id="container" -->
148148
</body>

docs/examples/intro.lua.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ <h2>intro.lua</h2>
187187
</div> <!-- id="main" -->
188188
<div id="about">
189189
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
190-
<i style="float:right;">Last updated 2019-09-25 17:56:05 </i>
190+
<i style="float:right;">Last updated 2021-02-17 16:19:34 </i>
191191
</div> <!-- id="about" -->
192192
</div> <!-- id="container" -->
193193
</body>

docs/examples/pagination.lua.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ <h2>pagination.lua</h2>
118118
</div> <!-- id="main" -->
119119
<div id="about">
120120
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
121-
<i style="float:right;">Last updated 2019-09-25 17:56:05 </i>
121+
<i style="float:right;">Last updated 2021-02-17 16:19:34 </i>
122122
</div> <!-- id="about" -->
123123
</div> <!-- id="container" -->
124124
</body>

docs/examples/ssl.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ http {
3535
contact_points = {"127.0.0.1", "127.0.0.2"},
3636
keyspace = "my_keyspace",
3737
ssl = true,
38+
encryption_protocol = 'any'
3839
verify = true
3940
}
4041
if not cluster then

docs/examples/ssl.lua.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ <h2>ssl.lua</h2>
100100
</span> contact_points = {<span class="string">"127.0.0.1"</span>, <span class="string">"127.0.0.2"</span>},
101101
keyspace = <span class="string">"my_keyspace"</span>,
102102
ssl = <span class="keyword">true</span>,
103+
encryption_protocol = <span class="string">'any'</span>
103104
verify = <span class="keyword">true</span>
104105
}
105106
<span class="keyword">if</span> <span class="keyword">not</span> cluster <span class="keyword">then</span>
@@ -124,7 +125,7 @@ <h2>ssl.lua</h2>
124125
</div> <!-- id="main" -->
125126
<div id="about">
126127
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
127-
<i style="float:right;">Last updated 2019-09-25 17:56:05 </i>
128+
<i style="float:right;">Last updated 2021-02-17 16:19:34 </i>
128129
</div> <!-- id="about" -->
129130
</div> <!-- id="container" -->
130131
</body>

docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ <h2>Examples</h2>
135135
</div> <!-- id="main" -->
136136
<div id="about">
137137
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
138-
<i style="float:right;">Last updated 2019-09-25 17:56:05 </i>
138+
<i style="float:right;">Last updated 2021-02-17 16:19:34 </i>
139139
</div> <!-- id="about" -->
140140
</div> <!-- id="container" -->
141141
</body>

docs/manual/README.md.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ <h2>License</h2>
256256
</div> <!-- id="main" -->
257257
<div id="about">
258258
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
259-
<i style="float:right;">Last updated 2019-09-25 17:56:05 </i>
259+
<i style="float:right;">Last updated 2021-02-17 16:19:34 </i>
260260
</div> <!-- id="about" -->
261261
</div> <!-- id="container" -->
262262
</body>

docs/modules/cassandra.html

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -853,6 +853,12 @@ <h3>Fields:</h3>
853853
<li><span class="parameter">ssl</span>
854854
Determines if the client should connect using SSL.
855855
(<code>boolean</code>, default: <code>false</code>)
856+
</li>
857+
<li><span class="parameter">ssl_protocol</span>
858+
The client encryption protocol version to use
859+
if <code>ssl</code> is enabled (LuaSec usage only, see <code>lua_ssl_protocols</code> directive
860+
for ngx_lua).
861+
(<a href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a>, default: <code>any</code>)
856862
</li>
857863
<li><span class="parameter">verify</span>
858864
Enable server certificate validation if <code>ssl</code> is enabled.
@@ -1123,7 +1129,7 @@ <h3>Usage:</h3>
11231129
</div> <!-- id="main" -->
11241130
<div id="about">
11251131
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
1126-
<i style="float:right;">Last updated 2019-09-25 17:56:05 </i>
1132+
<i style="float:right;">Last updated 2021-02-17 16:19:34 </i>
11271133
</div> <!-- id="about" -->
11281134
</div> <!-- id="container" -->
11291135
</body>

docs/modules/resty.cassandra.cluster.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ <h3>Fields:</h3>
528528
</div> <!-- id="main" -->
529529
<div id="about">
530530
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
531-
<i style="float:right;">Last updated 2019-09-25 17:56:05 </i>
531+
<i style="float:right;">Last updated 2021-02-17 16:19:34 </i>
532532
</div> <!-- id="about" -->
533533
</div> <!-- id="container" -->
534534
</body>

0 commit comments

Comments
 (0)