jsxc / xmpp-cloud-auth

:key: Authentication hub for Nextcloud+JSXC→Prosody, ejabberd, saslauthd, Postfix
https://www.jsxc.org
MIT License
59 stars 18 forks source link

can't login to chat on nextcloud #30

Closed madelynseal closed 6 years ago

madelynseal commented 7 years ago

Hello!

I am trying to set up an external prosody xmpp server setup (on the same machine) I can't seem to login through nextcloud, although I can login to the xmpp server directly just fine. The log from the browser seems to tell what is going on,

      Content Security Policy: Ignoring duplicate source 'unsafe-inline'  (unknown)
      Content Security Policy: Couldn’t parse invalid host 'unsafe-inline'  (unknown)
      Content Security Policy: Directive ‘frame-src’ has been deprecated. Please use directive ‘child-src’ instead.  (unknown)
      JQMIGRATE: Migrate is installed, version 1.4.0  core.js:7:542
      State changed to INITIATING  jsxc.js:183:10
      State changed to SUSPEND  jsxc.js:183:10
      [WARN] Unable to create user prefix jsxc.js:183:10
      [WARN] Unable to create user prefix jsxc.js:183:10
      State changed to ESTABLISHING  jsxc.js:183:10
      New connection  jsxc.js:183:10
      CONNECTING: null  jsxc.js:183:10
      close dialog

Any help would be appreciated!

MarcelWaldvogel commented 7 years ago

What do the Prosody and xmpp-cloud-auth log files say?

madelynseal commented 7 years ago

The prosody logs have zero errors (since being configured to what the wiki says). prosody.log does show the bosh sessions being created, is there more it should show after that?

xcauth.err is empty xcauth.log shows: INFO: FAILURE: Could not authenticate user REDACTED: noauth a few times but not recently

madelynseal commented 7 years ago

I am using apache proxypass through this configuration:

    ProxyPreserveHost On
    ProxyRequests Off
    ProxyPass /http-bind/ http://127.0.0.1:5280/http-bind/
    ProxyPassReverse /http-bind/ http://127.0.0.1:5280/http-bind/
MarcelWaldvogel commented 7 years ago

Did xcauth.log log any activity at all recently? How are you running it? Which extauth plugin/mode?

madelynseal commented 7 years ago

I am running it according to the wiki https://github.com/jsxc/xmpp-cloud-auth/wiki/prosody except I changed external_cloud.py to xcauth.py in prosody, as well as using xcauth.conf under /etc/

xcauth.log shows some successful logins, a few failed because of "noauth" and then more successful logins. logging in through nextcloud (having to click login without chat however) does not add to the log

MarcelWaldvogel commented 7 years ago

Are you using the experimental time-limited tokens (Nextcloud admin page for JSXC) and are using Nextcloud login names with capitals (or other uppercase characters)?

A fix for that is in nextcloud/jsxc.nextcloud@fcc9b7cae which just made it into JSXC 3.3.0-beta.1 (including the Nextcloud app)

madelynseal commented 7 years ago

yes I am using logins with upper case characters. I will try and see if I can manually upgrade to the 3.3 version later today. I hope this works and thanks!

madelynseal commented 7 years ago

hello! I have upgrade ojsxc to 3.3.0-beta but I still have the same issue :( I don't know what I am doing wrong. I have even tried with ejabberd but with less success.

MarcelWaldvogel commented 7 years ago

With the current information, I have to take a stab in the dark. Let me try:

Sorry for the burden

madelynseal commented 7 years ago

Hello, I have tried all these cases before, and none fixed the issue.

The main reason I am trying to set this up is for a company I am volunteering at that need secure communication. XMPP by itself actually has everything we need, which is chat and file transfer. The only thing I need to find out now is just encrypting the data while at rest on the server.

MarcelWaldvogel commented 7 years ago

Nextcloud does provide you with an option to encrypt data at rest. Some XMPP clients such as Conversations do perform (non-standard) encryption while transferring files using XMPP HTTP Upload.

Nevertheless, I would like to know why JSXC is not working for you. Could you provide me with the Nextcloud, Apache (of the proxy), XMPP server, and xcauth log files of your login attempts?

BTW: Did you ever try with a different browser and without plugins? What browser are you currently using? Do you have any other tabs open to the Nextcloud instance? Did you clear the browser cache?

@sualko Do the following messages from the log file at the beginning ring a bell?

State changed to SUSPEND  jsxc.js:183:10
[WARN] Unable to create user prefix jsxc.js:183:10
State changed to ESTABLISHING  jsxc.js:183:10
New connection  jsxc.js:183:10
CONNECTING: null  jsxc.js:183:10
madelynseal commented 7 years ago

I have destroyed the test nextcloud instance, I will recreate it for you and send you the logs Is a shared link through nextcloud good enough? Makes it easier for me

madelynseal commented 7 years ago

So I recreated the instance, same issues as before. Here are the logs:

apache-access.log.txt apache-error.log.txt

prosody.log.txt

MarcelWaldvogel commented 6 years ago

There is nothing unusual in the logs. Closing due to inactivy. Please reopen if desired (and include xcauth.log/xcauth.err