Closed wargreen closed 7 years ago
The url looks wrong. Where does it come from? Which cloud and version do you use?
Oops, i've take the url from https://docs.nextcloud.com/server/11/admin_manual/configuration_user/user_provisioning_api.html and i've tried "v2" after this message :
2017-03-09 14:22:10.218 [error] <0.548.0>@extauth:loop:130 extauth call '[<<"auth">>,<<"wargreen">>,<<"lebib.org">>,<<"**********">>]' didn't receive response
2017-03-09 14:22:10.218 [info] <0.552.0>@ejabberd_c2s:wait_for_feature_request:757 ({socket_state,ejabberd_http_bind,{http_bind,<0.551.0>,{{0,0,0,0,0,0,0,1},51901}},ejabberd_http_bind}) Failed authentication for wargreen@lebib.org from IP ::1
2017-03-09 14:22:40.222 [info] <0.551.0>@ejabberd_http_bind:handle_info:519 Session timeout. Closing the HTTP bind session: <<"944cc0885d7ebcd00fa323c86feea36381971b54">>
Note, the password is in clear text in the log... It's a security issue in my sense.
I use Nextcloud 11.0.2.
This message (with the clear text password) is directly from ejabberd.
Is it working, because it's not clear from your post.
But the login don't work, with the good password. Any idea ?
apparmor? Any log entries in /var/log/ejabberd/extauth.*
?
we run a debian testing, without apparmor. extauth.log :
INFO:root:Receive operation auth
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): cloud.lebib.org
INFO:root:Start external auth script with endpoint: https://cloud.lebib.org/ocs/v1.php/cloud/
INFO:root:Log level: 20
In nextcloud, when we try to login to the tchat server, we got "Connection with the tchat server faild. Verrify your password" (free translate from french). This reponse is slower with a good login than a random login. is the login should be done with "wargreen@lebib.org" or just "wargreen" in the nextcloud side ?
This is the wrong endpoint. Did you update the nextcloud app according to the pull request? You find the correct value in your nc admin settings. It should be similar to localhost/nextcloud/index.php/apps/ojsxc/ajax/externalApi.php
.
After download and extract https://github.com/nextcloud/jsxc.nextcloud/tree/ejabberd-cloud-auth in place of the apps store's ojsxc app, i don't see the endpoint. Same after disable the redis cache.
Updating from github is not that easy (we have to change that in the future). At the moment I recommend to copy only modified files to your current app folder. Sorry for the inconvenience.
Hey, I released a beta version, if you like to try this again. Please reopen the issue if you have trouble.
It's work well for me !
Hello, and thanks for the code !
When i try to log in to the tchat via nextcloud it fail and i got, in extauth.err :
Maybe my ejabberd.yml is wrong ?
extauth_program: "/opt/ejabberd-cloud-auth/external_cloud.py --url=https://cloud.lebib.org/ocs/v2.php/cloud/ --secret=********* "