You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2020/01/20 17:01:06 UTC
[tomcat] branch master updated: Add encryption as the first option
to secure a cluster
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/master by this push:
new e8cadf9 Add encryption as the first option to secure a cluster
e8cadf9 is described below
commit e8cadf94b63c4dce947ad5d0cb72b0fdea540cb1
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Mon Jan 20 16:58:02 2020 +0000
Add encryption as the first option to secure a cluster
---
webapps/docs/config/cluster.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/webapps/docs/config/cluster.xml b/webapps/docs/config/cluster.xml
index 36bbf0d..91e8328 100644
--- a/webapps/docs/config/cluster.xml
+++ b/webapps/docs/config/cluster.xml
@@ -52,6 +52,7 @@ to run a cluster on a insecure, untrusted network.</p>
<p>There are many options for providing a secure, trusted network for use by a
Tomcat cluster. These include:</p>
<ul>
+ <li><a href="cluster-interceptor.html#org.apache.catalina.tribes.group.interceptors.EncryptInterceptor_Attributes">EncryptInterceptor</a></li>
<li>private LAN</li>
<li>a Virtual Private Network (VPN)</li>
<li>IPSEC</li>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: [tomcat] branch master updated: Add encryption as the first
option to secure a cluster
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Mark,
On 1/21/20 12:14 PM, Mark Thomas wrote:
> On 21/01/2020 15:53, Christopher Schultz wrote:
>> Mark,
>>
>> On 1/20/20 2:25 PM, Mark Thomas wrote:
>>> On 20/01/2020 17:21, Mark Thomas wrote:
>>>> On 20/01/2020 17:08, Christopher Schultz wrote:
>>>>> On 1/20/20 12:01 PM, markt@apache.org wrote:
>>>>
>>>> <snip/>
>>>>
>>>>>> Add encryption as the first option to secure a cluster
>>>>>> ---
>>>>
>>>> <snip/>
>>>>
>>>>> I could have sworn I added this, already. Thanks for doing
>>>>> it.
>>>>
>>>> I'm looking at back-porting the Interceptor to 7.0.x. I've
>>>> got everything done apart from GCMParameterSpec which is new
>>>> in Java 7.
>>>>
>>>> I don't suppose you've looked into this previously and know
>>>> if there is a Java 6 equivalent? It would save me the time
>>>> to research it.
>>>>
>>>> If not, I'll make it a Java 7+ feature with JreCompat.
>>
>>> Java 6 doesn't support GCM. JreCompat it is.
>>
>> You may not need it: I checked, and the GCMParameterSpec class
>> isn't referenced except in the GCMEncryptionManager class, which
>> will only be loaded if the user specifically requests GCM
>> block-cipher mode.
>
> It won't compile unless we compile with Java 7 and Tomcat 7
> ideally needs to compile with Java 6 unless we want to start
> jumping through the same sort of hoops we have to jump through for
> WebSocket.
>
>> So maybe you could just leave it alone and allow CNFE to occur on
>> Java 7. Or, if you want a nicer error message, you can catch CNFE
>> (or similar) or explicitly check the Java version and print a
>> nice error message.
>>
>> But don't require Java 7 for the EncryptInterceptor in general.
>
> I went with the option of using reflection to call the Constructor.
> That way it compiles on Java 6 but if the user specifies GCM it
> will fail unless GCM is available (Java 7+ for Solaris, Java 8+ for
> everyone else).
Sounds good to me. The use is so limited that using reflection for
everything isn't the end of the world. It just makes the code a little
harder to follow. Aain, it's like 10 lines of code initially, so the
reflection won't be awful.
Thanks for doing this work.
- -chris
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/
iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl4nRB0ACgkQHPApP6U8
pFgfFw/+KNgG0RBBt/EsDLbE6o3GLod475NBU92Js0oOK7R6sf1zxgjE3CxCQhlE
Q8xWfHgx1zbVIXtG1DXBuFPTU8aOaP03jfcL/mu11SKRaHykUZTFQKQ4Fk5bjILe
5uK2SDHm6Qnki0U9MsX6MJeeRwSoUyHLM3JxVVSodG641vsB70a/w1fG14xGvHyJ
nP9FOotg8weKwmgnftGe2Q4qg1Ug5+XcU9DYLeiYTHzIp+CnuH2HqRYDX8ERzEsM
7u94QEJRNThw58egmXqDlY7sOaMOlK31Yq7bC57KYt6U40ahs56FlZZwwfojTKQf
Sab1m44lC2Av5y6SUby+0z/dcSlpV0fF5l13SDgVEN/mkqgGj71kfSu9TqQiCLSo
ug6jpuM+u/rdQG7hPs+NlnOfJoIAsQgrVt6QkQy8Ro2mGq+jgo1R0Gqi25iuzUfI
Bo/w057CNCoVaNKf5GLz9WHt00+Rq0mJP+AXoXD2nWxFzwe3E79AL41yXTdZfjRM
YlpNylGIwoFXzrks5Rw3ESilhzQ07RZR9HOUKhv0T2EX/la5GoThSYjLgFyANS1o
wapi1Bi713ZC8WnbOjnzmnz4ZbQV8UTnj+g5R50phTDnMn0/gWBsXv7O9KO8uW3M
pEeKwyZxHp688H0P+BqozC9mTmlEfG/WuMo2UAd763GgJgK4mFo=
=bwmC
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: [tomcat] branch master updated: Add encryption as the first
option to secure a cluster
Posted by Mark Thomas <ma...@apache.org>.
On 21/01/2020 15:53, Christopher Schultz wrote:
> Mark,
>
> On 1/20/20 2:25 PM, Mark Thomas wrote:
>> On 20/01/2020 17:21, Mark Thomas wrote:
>>> On 20/01/2020 17:08, Christopher Schultz wrote:
>>>> On 1/20/20 12:01 PM, markt@apache.org wrote:
>>>
>>> <snip/>
>>>
>>>>> Add encryption as the first option to secure a cluster ---
>>>
>>> <snip/>
>>>
>>>> I could have sworn I added this, already. Thanks for doing it.
>>>
>>> I'm looking at back-porting the Interceptor to 7.0.x. I've got
>>> everything done apart from GCMParameterSpec which is new in Java
>>> 7.
>>>
>>> I don't suppose you've looked into this previously and know if
>>> there is a Java 6 equivalent? It would save me the time to
>>> research it.
>>>
>>> If not, I'll make it a Java 7+ feature with JreCompat.
>
>> Java 6 doesn't support GCM. JreCompat it is.
>
> You may not need it: I checked, and the GCMParameterSpec class isn't
> referenced except in the GCMEncryptionManager class, which will only
> be loaded if the user specifically requests GCM block-cipher mode.
It won't compile unless we compile with Java 7 and Tomcat 7 ideally
needs to compile with Java 6 unless we want to start jumping through the
same sort of hoops we have to jump through for WebSocket.
> So maybe you could just leave it alone and allow CNFE to occur on Java
> 7. Or, if you want a nicer error message, you can catch CNFE (or
> similar) or explicitly check the Java version and print a nice error
> message.
>
> But don't require Java 7 for the EncryptInterceptor in general.
I went with the option of using reflection to call the Constructor. That
way it compiles on Java 6 but if the user specifies GCM it will fail
unless GCM is available (Java 7+ for Solaris, Java 8+ for everyone else).
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: [tomcat] branch master updated: Add encryption as the first
option to secure a cluster
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Mark,
On 1/20/20 2:25 PM, Mark Thomas wrote:
> On 20/01/2020 17:21, Mark Thomas wrote:
>> On 20/01/2020 17:08, Christopher Schultz wrote:
>>> On 1/20/20 12:01 PM, markt@apache.org wrote:
>>
>> <snip/>
>>
>>>> Add encryption as the first option to secure a cluster ---
>>
>> <snip/>
>>
>>> I could have sworn I added this, already. Thanks for doing it.
>>
>> I'm looking at back-porting the Interceptor to 7.0.x. I've got
>> everything done apart from GCMParameterSpec which is new in Java
>> 7.
>>
>> I don't suppose you've looked into this previously and know if
>> there is a Java 6 equivalent? It would save me the time to
>> research it.
>>
>> If not, I'll make it a Java 7+ feature with JreCompat.
>
> Java 6 doesn't support GCM. JreCompat it is.
You may not need it: I checked, and the GCMParameterSpec class isn't
referenced except in the GCMEncryptionManager class, which will only
be loaded if the user specifically requests GCM block-cipher mode.
So maybe you could just leave it alone and allow CNFE to occur on Java
7. Or, if you want a nicer error message, you can catch CNFE (or
similar) or explicitly check the Java version and print a nice error
message.
But don't require Java 7 for the EncryptInterceptor in general.
- -chris
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/
iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl4nHnYACgkQHPApP6U8
pFg60BAAyd5I50nyPL4IGtovVLAbKgEaWSO0MUgoBQ4KbVErt863lQkqShjAoQHV
pk72r/FM/Fw2iOqXlmGprO1gHpIqlJXuJVCEBaBvff5cJ8qKT319zf5v03i+/KD3
1vlzieoFnx7dv+GFWNIvg9PbKBMiJQdjLvik+4R+FOO7UADBdyixM5TldWcYlClV
j533WOuXSsHL9Y8moMA3CntEGBJR6/CCRVXuC+jqlWmOkcxO7xurDg7dKHbYwBDH
OLAnq0l3UhgZ60b7sP/0wqNnxf4iGWTrARAc2DfhVuTVmnX5w0BeNci7VueAPIMA
tIL8zs8fG2rRiUrAasLCUIhuWswkSxpg3qn3Xh1KkVJpCZD73/V97Z4Fn98VC+Xx
+PmhsV+R9n820ggbNXbyextAmdT/AQIbzXik/ixRBaEHKo7W5EqYEPfH9p3o7Vbl
s8Xn19xMATKkylq/3b0GYbME3JR9yO6faeFi/cIMVFdkEqE3/ILt+lJO/d5h5atP
BAB01a+IKYHd/7qOLCsk8TOUGYGfCuSgJgOozImnhsQgj3Mm1U6gIeEQuFQ6tZMc
Aac2nL5n8Sx9rxjf/Ib99ETqaLk+n9Cejgr/FoISw3v5bnl4cRS3dc6LthAM3RId
pSsTCXt1edbuors9z3fv6tFRYu99ywtzE0r6Mx79CtXoYnCaHzI=
=IRI4
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: [tomcat] branch master updated: Add encryption as the first
option to secure a cluster
Posted by Mark Thomas <ma...@apache.org>.
On 20/01/2020 17:21, Mark Thomas wrote:
> On 20/01/2020 17:08, Christopher Schultz wrote:
>> On 1/20/20 12:01 PM, markt@apache.org wrote:
>
> <snip/>
>
>>> Add encryption as the first option to secure a cluster ---
>
> <snip/>
>
>> I could have sworn I added this, already. Thanks for doing it.
>
> I'm looking at back-porting the Interceptor to 7.0.x. I've got
> everything done apart from GCMParameterSpec which is new in Java 7.
>
> I don't suppose you've looked into this previously and know if there is
> a Java 6 equivalent? It would save me the time to research it.
>
> If not, I'll make it a Java 7+ feature with JreCompat.
Java 6 doesn't support GCM. JreCompat it is.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: [tomcat] branch master updated: Add encryption as the first
option to secure a cluster
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Mark,
On 1/20/20 12:21 PM, Mark Thomas wrote:
> On 20/01/2020 17:08, Christopher Schultz wrote:
>> On 1/20/20 12:01 PM, markt@apache.org wrote:
>
> <snip/>
>
>>> Add encryption as the first option to secure a cluster ---
>
> <snip/>
>
>> I could have sworn I added this, already. Thanks for doing it.
>
> I'm looking at back-porting the Interceptor to 7.0.x. I've got
> everything done apart from GCMParameterSpec which is new in Java
> 7.
>
> I don't suppose you've looked into this previously and know if
> there is a Java 6 equivalent? It would save me the time to research
> it.
Hmm, I have not.
One option would be to simply drop support for the GCM block-cipher
mode. I believe both CFB and CTR modes are still supported, and are
better choices than CBC. I'm not sure about OFB.
> If not, I'll make it a Java 7+ feature with JreCompat.
That's always an option. If we want to support GCM on Java 7 but not
cause errors on Java 6, we could re-work the code a little bit to only
attempt to load the GCMParameterSpec class if GCM mode is specifically
requested.
- -chris
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/
iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl4nHeoACgkQHPApP6U8
pFgEkw/7BB7dz13sh50+LNknutGBrygsmomDSzY807qgO4ypuUQPnuANP3qTbZw9
E2j51ivoWPf8+NV6BP3zOcVCtPTZ/KSNfLHFYMmbfHt2PV2WER5Rcbmy8H55Nlu3
gjdyFcs3iKsLs+5gEi+TzQ7qMLHfX5gNQCdLyLvtQAVHQCEBy5AFowNseHcYiF3n
rjF93Enc3RGNa1pAwLEiYwxW+rZ9OkSqVvDyG/cz2MVEk9heudkTcKEhwOwdubdx
0VXuhIrlh9VkukwctgXZnE4KVYwcjvrrCfamB90wJof1sOCb3gJdoI5d1z/TR/sq
JZGNzga3ShzGaPM+SvhuwLorRVor9KXuRrgP2QyrNwRsH0LR9PmW9HPFVdLTEGbL
XdUktXFn9TXnNzq4ZpKVAWoKAM7oEDUlX2MD0W4hZgM+zM0aJdOVy+Xxh58lch2h
uEn55gaZSHaK1OryJUr2v+5A6TmgF/zT+JLT8to5wvO7Mi9DM4ExxJEeGPMqeEX/
VrWcJ5LYh4b6qdizA9s88Sai3qWci8+6PZX+0qQr0JWjvDJzrSgApZ7Sb5a23hHT
zlDDe6uUS1OVtHMgStaGTgZhDtz0fiTMLfew4TFFrfP0MUsmg3208oSxG+FxrTcY
g8MaZQEiwmxjK9ItGjnV5G+pqBLMvvuhScDxT0QDyBT/LpjkwxY=
=Qhpj
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: [tomcat] branch master updated: Add encryption as the first
option to secure a cluster
Posted by Mark Thomas <ma...@apache.org>.
On 20/01/2020 17:08, Christopher Schultz wrote:
> On 1/20/20 12:01 PM, markt@apache.org wrote:
<snip/>
>> Add encryption as the first option to secure a cluster ---
<snip/>
> I could have sworn I added this, already. Thanks for doing it.
I'm looking at back-porting the Interceptor to 7.0.x. I've got
everything done apart from GCMParameterSpec which is new in Java 7.
I don't suppose you've looked into this previously and know if there is
a Java 6 equivalent? It would save me the time to research it.
If not, I'll make it a Java 7+ feature with JreCompat.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: [tomcat] branch master updated: Add encryption as the first
option to secure a cluster
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Mark,
On 1/20/20 12:01 PM, markt@apache.org wrote:
> This is an automated email from the ASF dual-hosted git
> repository.
>
> markt pushed a commit to branch master in repository
> https://gitbox.apache.org/repos/asf/tomcat.git
>
>
> The following commit(s) were added to refs/heads/master by this
> push: new e8cadf9 Add encryption as the first option to secure a
> cluster e8cadf9 is described below
>
> commit e8cadf94b63c4dce947ad5d0cb72b0fdea540cb1 Author: Mark Thomas
> <ma...@apache.org> AuthorDate: Mon Jan 20 16:58:02 2020 +0000
>
> Add encryption as the first option to secure a cluster ---
> webapps/docs/config/cluster.xml | 1 + 1 file changed, 1
> insertion(+)
>
> diff --git a/webapps/docs/config/cluster.xml
> b/webapps/docs/config/cluster.xml index 36bbf0d..91e8328 100644 ---
> a/webapps/docs/config/cluster.xml +++
> b/webapps/docs/config/cluster.xml @@ -52,6 +52,7 @@ to run a
> cluster on a insecure, untrusted network.</p> <p>There are many
> options for providing a secure, trusted network for use by a Tomcat
> cluster. These include:</p> <ul> + <li><a
> href="cluster-interceptor.html#org.apache.catalina.tribes.group.interc
eptors.EncryptInterceptor_Attributes">EncryptInterceptor</a></li>
>
>
<li>private LAN</li>
> <li>a Virtual Private Network (VPN)</li> <li>IPSEC</li>
I could have sworn I added this, already. Thanks for doing it.
- -chris
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/
iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl4l3pMACgkQHPApP6U8
pFhV8Q//dkavwcauOXAE6OPkBfLLoClORYZ8mopQ0Pjfwnf9SPvnDO49bZNrPF8o
JVmt+XiwyhuKxMFI0M7t+GssoH6HGabDHZ8LtkOAWqvzivcKf2lWC9GzFvrq1fgf
eljO6FccQXH8KWODA9G0X+5yrmXFjMKVvkwb4wT6m/nKrKP1hC0QsbSH22qvuG5O
qjOmxlsgWrJQe/5XdTugD4WP2eqBE5fjNmvL5GAXGDMhEpyFfeZ3PbdffCORdRkK
CwH36qEP/qFhPJAuRR6CURQa8K2y8GQuWXLuouXt2Ul6niPeakAE+6NShjGe92a7
Z8EKkv79S3FVSRFWW1ZxC6SsQh936BTqvG9eBV51v7EVJrnJzaVzYygNMETCiERZ
NFI0Q4v3XrkPNXctMutext5nnx+6ICyXTVEygYWJQSP16QUBQtlMQYMwqI4X6DJ1
NAtiBx7K3hkg769CgWMYRiMRfIyHahZJXvipAtLOHxA6RycrSLlM+TlsAVMz0qec
9OQu736EGOa6cieroahJrG4oRVUknvjCoER0SvmlFQRJUHxV64qiSnWHRlMX1LEc
iqk7D/tkCyJHgafYdt+Def2i8VfB0Z7Y7/PQhwC8JQI841+IuBH8V+aV1HjwKYTk
nrhpDY71+10XriYIHvOD54WNVGtWBXih8IO+qjBDDDXNR3nh2Wk=
=4wzn
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org