rroemhild / docker-ejabberd

Dockerfile for Ejabberd server
MIT License
268 stars 160 forks source link

SQL and anonymous authentication strange behaviour #153

Open ABCurado opened 6 years ago

ABCurado commented 6 years ago

After configuring ejabberd with sql authentication it works as expected, by advertising the DIGEST-MD5 and SCRAM-SHA-1 as possible authentication mechanisms. But when I add the possibility to authenticate as anonymous it stops advertising DIGEST-MD5 and SCRAM-SHA-1 as possible auth mechanisms.

Example:

host_config: "xmpp.example.com": auth_method: [sql]

[debug] (tls|<0.570.0>) Send XML on stream =

 <<"<stream:features>
<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
<mechanism>SCRAM-SHA-1</mechanism>
<mechanism>DIGEST-MD5</mechanism>
<mechanism>PLAIN</mechanism>
<mechanism>X-OAUTH2</mechanism></mechanisms>
</stream:features>">>

host_config: "xmpp.example.com": auth_method: [sql, anonymous]

[debug] (tls|<0.554.0>) Send XML on stream =

<<"<stream:features>
<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
<mechanism>ANONYMOUS</mechanism>
<mechanism>PLAIN</mechanism>
<mechanism>X-OAUTH2</mechanism>
</mechanisms></stream:features>">>

Not sure if the issue is on docker or on ejabberd itself, if this is not the place for this issue I will close it