Skip to content
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 policy and ejabberd #5580

Closed
stephdl opened this issue Sep 16, 2018 · 22 comments
Closed

TLS policy and ejabberd #5580

stephdl opened this issue Sep 16, 2018 · 22 comments
Labels
verified All test cases were verified successfully

Comments

@stephdl
Copy link

stephdl commented Sep 16, 2018

Ejabberd after the update is not hardened by the tls-policy we implemented, I propose to make it possible.

I followed this tutorial https://blog.process-one.net/securing-ejabberd-with-tls-encryption/ and for now I modified

  • c2s on port 5222
  • s2s on port 5269
  • for these port I added a new option relative to tls_compression.
  • new ciphers, only compatible to tls1.2 (compatible to our TLS-policy 20180621)

I saw that we could make also a dh key to enhance the security, for now I did nothing, maybe it could be a NFR.

@stephdl stephdl self-assigned this Sep 16, 2018
@stephdl stephdl added this to ✋ Needs review in NethServer 7 via automation Sep 16, 2018
@DavidePrincipi DavidePrincipi moved this from ✋ Needs review to ⚙ Developing in NethServer 7 Sep 17, 2018
@DavidePrincipi DavidePrincipi changed the title Tls-policy and ejabberd TLS policy and ejabberd Sep 17, 2018
@DavidePrincipi
Copy link
Member

DavidePrincipi commented Sep 17, 2018

I think we need a new policy identifier, because we actually upgrade the ejabberd configuration from a "default" one to a newly defined (more restrictive) one. Like 2018-10-01

Why to allow only TLS 1.2? Can we allow also TLS 1.1?

@stephdl
Copy link
Author

stephdl commented Sep 17, 2018

Why to allow only TLS 1.2? Can we allow also TLS 1.1?

you are right, I checked the documentation (tlspolicy page) and I saw now that sslV3 and tlsv1 is removed, but in the comment code I read that only tls1.2 is allowed....it is my mistake

Probably the doc should be adjusted because I Tested with testssl.sh and of course tls1.0/1.1 is still allowed.

Honestly I do not think we need another policy name, except if we want to protect other services by a new list of really secure ciphers....But we could enhance the security of ejabberd when the tlspolicy is not default

@DavidePrincipi
Copy link
Member

DavidePrincipi commented Sep 18, 2018

Note that docs section is about "slapd"!

I'm assuming the server is at "upstream default" setup: if now the ejabberd clients can use SSL3 or TLS < 1.2 we must define a new policy identifier and require an explicit policy upgrade. Othewise there is a (theoretical at least) risk of cutting them out.

It's fine that a policy actually affects just one service, like ejabberd, which has some dedicated TCP ports and protocols.

@DavidePrincipi
Copy link
Member

Remember the docs! ;)

  • add policy 2018-10-01 documentation

stephdl added a commit to NethServer/nethserver-base that referenced this issue Sep 19, 2018
@nethbot
Copy link
Member

nethbot commented Sep 19, 2018

in 7.5.1804/testing:

@stephdl
Copy link
Author

stephdl commented Sep 19, 2018

@DavidePrincipi please review the documentation NethServer/docs#364

@DavidePrincipi
Copy link
Member

@stephdl, I added some changes: please review them (I cannot set you as reviewer of your PR)

stephdl added a commit to NethServer/nethserver-ejabberd that referenced this issue Sep 20, 2018
@nethbot
Copy link
Member

nethbot commented Sep 20, 2018

in 7.5.1804/testing:

@nethbot
Copy link
Member

nethbot commented Sep 20, 2018

in 7.5.1804/testing:

@nethbot
Copy link
Member

nethbot commented Sep 21, 2018

in 7.5.1804/testing:

@DavidePrincipi DavidePrincipi added the testing Packages are available from testing repositories label Sep 25, 2018
@DavidePrincipi
Copy link
Member

Test case 0

After RPM update, an existing system must preserve the previous available cipher suite

Test case 1

Upgrade to TLS policy 20181001: only TLS 1.2 is available from ejabberd service


QA note: as STARTTLS method seems not working with nmap, test TLS-wrap connection on port 5223

@DavidePrincipi
Copy link
Member

DavidePrincipi commented Sep 25, 2018

@stephdl, did you verify the S2S socket?

The C2S is VERIFIED for me

@stephdl
Copy link
Author

stephdl commented Sep 25, 2018

For me, even our previous configuration has an issue, we ought to prove what cipher you used even with nmap, testssl or https://xmpp.net/

Check https://community.nethserver.org/t/starttls-and-ejabberd/10800

Something is wrong.... Sure we could test the 5223 and accept it could be right for the 5222 (starttls) but I do not understand what it occurs

Let me try https://xmpp.net/ with the port 5269

@nethbot
Copy link
Member

nethbot commented Sep 25, 2018

in 7.5.1804/testing:

@stephdl
Copy link
Author

stephdl commented Sep 25, 2018

Let me try https://xmpp.net/ with the port 5269

from this https://xmpp.net/result.php?id=826718, S2S is well secured by the new policy 20181001

from this https://xmpp.net/result.php?id=826747 , S2S get the default cipher configuration with older policy

the s2s is verified @DavidePrincipi

@nethbot
Copy link
Member

nethbot commented Sep 27, 2018

in 7.5.1804/testing:

@stephdl
Copy link
Author

stephdl commented Sep 27, 2018

QA

Ciphers list compatible with https://bettercrypto.org/static/applied-crypto-hardening.pdf and the tlspolicy20180621 we implemented (ECC compatible)

this time we harden

web admin interface 5280
c2s 5222,5223
s2s 5269

to test 5280,5223 (without starttls)
nmap --script ssl-enum-ciphers conference.de-labrusse.fr -p 5223
nmap --script ssl-enum-ciphers conference.de-labrusse.fr -p 5280

for s2s and c2s (starttls) , please use https://xmpp.net/index.php

  • s2s (5269) you must use conference.domain.org or pubsub.domain.org
  • c2s (5222) you must use domain.org (relevant to your ejabberd domain))

@stephdl
Copy link
Author

stephdl commented Sep 27, 2018

Remember the docs! ;)

  • add policy 2018-10-01 documentation

stephdl added a commit to NethServer/nethserver-ejabberd that referenced this issue Sep 27, 2018
@nethbot
Copy link
Member

nethbot commented Sep 27, 2018

in 7.5.1804/testing:

@DavidePrincipi DavidePrincipi added verified All test cases were verified successfully and removed testing Packages are available from testing repositories labels Sep 28, 2018
@DavidePrincipi
Copy link
Member

VERIFIED

See my comment here NethServer/nethserver-ejabberd#16 (comment)

DavidePrincipi pushed a commit to NethServer/docs that referenced this issue Sep 28, 2018
@nethbot
Copy link
Member

nethbot commented Sep 28, 2018

in 7.5.1804/updates:

@nethbot
Copy link
Member

nethbot commented Sep 28, 2018

in 7.5.1804/updates:

NethServer 7 automation moved this from ⚙ Developing to 🗑 Done Sep 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
verified All test cases were verified successfully
Projects
No open projects
NethServer 7
🗑 Done
Development

No branches or pull requests

3 participants