ruebox / openhab2-addons

Add-ons for openHAB 2.x
Eclipse Public License 1.0
16 stars 6 forks source link

Arbitrary users: Connection fails #1

Closed ruebox closed 6 years ago

ruebox commented 6 years ago

In the latest implementation the only allowed user is "installer". If using another login with installer privileges, the XMPP login fails:

m_XmppClient.login(m_Configuration.login, m_Configuration.password);

with

> OUT: <body xmlns="http://jabber.org/protocol/httpbind" rid="1049209250657429" sid="51d942e7-228a-43c5-889e-b117b3935eb9"><auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="SCRAM-SHA-1">biwsbj1UZXN0LHI9OHJaOXVrOVNnWkJZcmdNTTF3VUlhUT09</auth></body>
> IN : <body sid='51d942e7-228a-43c5-889e-b117b3935eb9' xmlns:stream='http://etherx.jabber.org/streams' xmlns='http://jabber.org/protocol/httpbind'><failure xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><not-authorized/></failure></body>

UserName displayed on website is not 1:1 linked to jid of xmpp. The mapping can be fetched by: http://localhost/settings.json

ruebox commented 6 years ago

solved with 80b95e52d1e05d6afaf39428e419bb1f0b6536c9