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

Failed inbound s2s EXTERNAL authentication #2186

Closed
97zgxgw opened this issue Dec 26, 2017 · 18 comments
Closed

Failed inbound s2s EXTERNAL authentication #2186

97zgxgw opened this issue Dec 26, 2017 · 18 comments

Comments

@97zgxgw
Copy link

97zgxgw commented Dec 26, 2017

What version of ejabberd are you using?
17.11

What operating system (version) are you using?
Ubuntu 16.04

How did you install ejabberd (source, package, distribution)?
from ejabberd-17.11-linux-x86_64-installer.run

What did not work as expected? Are there error messages in the log? What
was the unexpected behavior? What was the expected result?
I create SSL cert from gandi.net, create a user and login to jabber and all fine.
I add new contact to jabber from other server and when i try authorize him in log i see this
<0.486.0>@ejabberd_s2s_in:handle_auth_failure:206 (tls|<0.485.0>) Failed inbound s2s EXTERNAL authentication otherserver.im -> myserver.com (::FFFF:144.7.1.2): unable to get local issuer certificate

And all my contact in offline.

@weiss
Copy link
Member

weiss commented Dec 26, 2017

Failed inbound s2s EXTERNAL authentication otherserver.im -> myserver.com

So you don't trust the certificate offered by otherserver.im.

Do you have mod_s2s_dialback: {} in your list of modules?

@97zgxgw
Copy link
Author

97zgxgw commented Dec 26, 2017

Yes mod_s2s_dialback: {} enabled in modules section of my ejabberd.yml

@97zgxgw
Copy link
Author

97zgxgw commented Dec 26, 2017

I add
s2s_cafile: "/etc/ssl/certs/ca-certificates.crt"
and my issue resolved, but i thing it is workaround ...

@zinid
Copy link
Contributor

zinid commented Dec 26, 2017

A workaround to what? How to tame openssl on every platform?

@zinid
Copy link
Contributor

zinid commented Dec 26, 2017

Ah, this is the installer.
The installer will be fixed by release of 17.12.

@zinid zinid closed this as completed Dec 26, 2017
@97zgxgw
Copy link
Author

97zgxgw commented Dec 26, 2017

Why i need to do when 17.12 is released ?

@97zgxgw
Copy link
Author

97zgxgw commented Dec 26, 2017

What wrong with 17.11 installer ? I have another way to fix my issue ?

@zinid
Copy link
Contributor

zinid commented Dec 26, 2017

You need nothing to do. The installer will be shipped with CA bundle (from Mozilla), and ca_file would be configured in the default config pointing to the bundle.

@zinid
Copy link
Contributor

zinid commented Dec 26, 2017

No, s2s_cafile is normal workaround to your problem.

@laszlovl
Copy link

I ran into this problem on a 18.04 install as well.

How about adding s2s_cafile: "/etc/ssl/certs/ca-certificates.crt" to the https://github.com/processone/ejabberd/blob/master/ejabberd.yml.example example config file?

@zinid
Copy link
Contributor

zinid commented Jun 18, 2018

Our installers have already Mozilla's CA bundle included and configured in ca_file option (and it's used as a fallback if s2s_cafile is not set).
I don't think it's a great idea to set the option in ejabberd.yml.example because the location of the CA bundle is OS specific. It's supposed that you know what you do when building ejabberd from source and you're prepared to configure more.

@laszlovl
Copy link

I do use the DEB package, but I copied the config file from a previous install and compared it with https://github.com/processone/ejabberd/blob/master/ejabberd.yml.example to see if anything needed changing.

You're right that the location of ca-certificates.crt may be different, so perhaps add it as commented-out so people can easily see that the option exists? (I came across this bugreport before, but since s2s_cafile isn't mentioned in either ejabberd.yml.example or the documentation, I thought it was no longer relevant after the recent SSL related changes)

@zinid
Copy link
Contributor

zinid commented Jun 18, 2018

so perhaps add it as commented-out so people can easily see that the option exists?

There is already commented ca_file. Since it's used as a default value if s2s_cafile is not set I don't see the reason to set it explicitly once again.

@laszlovl
Copy link

Right, I didn't know that. In that case, perhaps update the comment for that configuration option?

If your system provides only a single CA file (CentOS/FreeBSD)

That reads as if you only need to set this option if your system doesn't provide individual CA certificate files in /etc/ssl/certs (CentOS/FreeBSD). But if I understand it correctly now, the option needs to be set on each and every system for s2s ssl validation to work.

@zinid
Copy link
Contributor

zinid commented Jun 18, 2018

But if I understand it correctly now, the option needs to be set on each and every system for s2s ssl validation to work.

No. This depends on your openssl configuration. The problem you're facing is strictly speaking a problem of your openssl library which is configured/compiled incorrectly (its defaults are not set to the location of your OS bundle).

@zinid
Copy link
Contributor

zinid commented Jun 18, 2018

Whatever, it's OK for me to rephrase the comment so it doesn't confuse people.

@laszlovl
Copy link

No. This depends on your openssl configuration. The problem you're facing is strictly speaking a problem of your openssl library which is configured/compiled incorrectly (its defaults are not set to the location of your OS bundle).

OK, that's unfortunate. This is on a Ubuntu 18.04 LTS system, so this'll likely affect plenty of other people for a few years to come.

@lock
Copy link

lock bot commented Jun 18, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants