I have configured anonymous login correctly and restarted the server, but I get 401 not-authorised from jwchat and pidgin when i try to login with an unregistered account. What gives?
Using ejabbered 2.0.1
config:
{hosts, ["mydomain.com", "private.mydomain.com"]}.
{auth_method, internal}.
{host_config, "mydomain.com", [
{auth_method, [anonymous]},
{anonymous_protocol, both}
]}.tried with anon_login as well, no joy.
jwchat is using http-bind
After adding the anonymous login I can't login with existing registered accounts either
The error returned is 401 not-authorised
=INFO REPORT==== 2009-06-19 17:18:21 ===
I(<0.262.0>:ejabberd_listener:112) : (#Port<0.409>) Accepted connection {{[cut ip]},52617} -> {{[cut ip]},5222}
=INFO REPORT==== 2009-06-19 17:18:21 ===
D(<0.343.0>:ejabberd_receiver:297) : Received XML on stream = "<?xml version='1.0' ?>"
=INFO REPORT==== 2009-06-19 17:18:21 ===
D(<0.343.0>:ejabberd_receiver:297) : Received XML on stream = "<stream:stream to='marketme.com.au' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>"
=INFO REPORT==== 2009-06-19 17:18:21 ===
D(<0.344.0>:ejabberd_c2s:1336) : Send XML on stream = "<?xml version='1.0'?><stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='941233700' from='mydomain.com' version='1.0' xml:lang='en'>"
=INFO REPORT==== 2009-06-19 17:18:21 ===
D(<0.344.0>:ejabberd_c2s:1336) : Send XML on stream = "<stream:features><mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><mechanism>ANONYMOUS</mechanism><mechanism>DIGEST-MD5</mechanism><mechanism>PLAIN</mechanism></mechanisms><register xmlns='http://jabber.org/features/iq-register'/></stream:features>"
=INFO REPORT==== 2009-06-19 17:18:22 ===
D(<0.343.0>:ejabberd_receiver:297) : Received XML on stream = "<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='DIGEST-MD5'/>"
=INFO REPORT==== 2009-06-19 17:18:22 ===
D(<0.343.0>:shaper:61) : State: {maxrate,1000,0,1245395901986905}, Size=71
M=35.5000, I=27.5180
=INFO REPORT==== 2009-06-19 17:18:22 ===
D(<0.344.0>:ejabberd_c2s:1336) : Send XML on stream = "<challenge xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>[cut base64 data]</challenge>"
=INFO REPORT==== 2009-06-19 17:18:22 ===
D(<0.343.0>:ejabberd_receiver:297) : Received XML on stream = "<response xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>[cut base64 data]</response>"
=INFO REPORT==== 2009-06-19 17:18:22 ===
D(<0.343.0>:shaper:61) : State: {maxrate,1000,998.959,1245395902022442}, Size=338
M=337.648, I=18.9450
=INFO REPORT==== 2009-06-19 17:18:22 ===
I(<0.344.0>:ejabberd_c2s:698) : ({socket_state,gen_tcp,#Port<0.409>,<0.343.0>}) Failed authentication for
=INFO REPORT==== 2009-06-19 17:18:22 ===
D(<0.344.0>:ejabberd_c2s:1336) : Send XML on stream = "<failure xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><not-authorized/></failure>"
mechanism='DIGEST-MD5'
I was looking at the anonymous login specs for XMPP and it looks like the client is supposed to respond mechanism='ANONYMOUS'. I guess this simply means neither client supports anonymous sasl?
set authtype in jwchat
I was looking at JSJaCHTTPBindingCnnection.js and realised authtype is a connection setting:
oArgs.authtype = 'saslanon';
con.connect(oArgs);
I still have two issues:
* I can't find anything similar for pidgin (is this a limitation of libpurple?)
* I can't login from pidgin as an authorised user (admin) either. The instructions say I should be able to mix anon and registered users.
options are overwritten
This is your configuration:
{hosts, ["mydomain.com", "private.mydomain.com"]}. {auth_method, internal}. {host_config, "mydomain.com", [ {auth_method, [anonymous]}, {anonymous_protocol, both} ]}.The auth_methods are not accumulated, they are overwritten. So in mydomain.com only anonymous is allowed.
Try this instead:
{hosts, ["mydomain.com", "private.mydomain.com"]}. {auth_method, internal}. {host_config, "mydomain.com", [ {auth_method, [internal, anonymous]}, {anonymous_protocol, both} ]}.Maybe you prefer to put [anonymous, internal], I am not sure.