redsolution / xabber-server

Xabber Server: an advanced XMPP server, with reliable message delivery, message editing and retraction, group chats, active session management and fast client synchronization
https://www.xabber.com/server/
Other
25 stars 12 forks source link

Not working oAuth #5

Closed Gloome closed 4 years ago

Gloome commented 4 years ago

Code from config:

api_permissions: "console commands": from:

  • ejabberd_ctl who:
  • access:

    • allow:
      • ip: "127.0.0.1/8" what: "*"

    "admin access": from:

  • mod_http_api who:
  • admin
  • oauth: scope: "ejabberd:admin" access: allow: acl: admin what:
  • "*"
  • "!stop"
  • "!start"

And from log file:

2019-10-01 22:39:05.948 [info] <0.324.0>@ejabberd_listener:accept:302 (<0.530.0>) Accepted connection ::1:36984 -> ::1:5280 2019-10-01 22:39:05.948 [debug] <0.530.0>@ejabberd_http:init:145 S: [{[<<"ws">>],ejabberd_http_ws},{[<<"bosh">>],mod_bosh},{[<<"upload">>],mod_http_upload},{[<<"api">>],mod_http_api},{[<<"captcha">>],ejabberd_captcha},{[<<"admin">>],ejabberd_web_admin},{[<<"http-bind">>],mod_bosh}] 2019-10-01 22:39:05.948 [debug] <0.530.0>@ejabberd_http:process_header:277 (#Port<0.14116>) http query: 'POST' <<"/api/register">> 2019-10-01 22:39:05.949 [debug] <0.530.0>@ejabberd_http:extract_path_query:408 client data: <<"{\"host\":\"dom.ru\",\"user\":\"newuser\",\"password\":\"ddd\"}">> 2019-10-01 22:39:05.949 [debug] <0.530.0>@ejabberd_http:process:364 [<<"api">>,<<"register">>] matches [<<"api">>] 2019-10-01 22:39:05.949 [info] <0.530.0>@mod_http_api:log:542 API call register [{<<"host">>,<<"dom.ru">>},{<<"user">>,<<"newuser">>},{<<"password">>,<<"ddd">>}] from ::1:36984 2019-10-01 22:39:05.951 [debug] <0.301.0>@ejabberd_access_permissions:handle_call:150 Command 'register' execution denied (CallerInfo=#{caller_module => mod_http_api,ip => {0,0,0,0,0,0,0,1}})

Sternstein commented 4 years ago

Which type of installation did you use?

Gloome commented 4 years ago

Which type of installation did you use?

Advanced

Sternstein commented 4 years ago

Could you provide more information about this problem? How did you get this error? Did you use our admin-panel?

Your config looks not like typical.

Gloome commented 4 years ago

Did you use our admin-panel?

How to use your admin-panel?

How did you get this error?

This error from log file: /opt/xabberserver/xabberserver/var/log/ejabberd/ejabberd.log

2019-10-01 22:39:05.949 [info] <0.530.0>@mod_http_api:log:542 API call register [{<<"host">>,<<"dom.ru">>},{<<"user">>,<<"newuser">>},{<<"password">>,<<"ddd">>}] from ::1:36984 2019-10-01 22:39:05.951 [debug] <0.301.0>@ejabberd_access_permissions:handle_call:150 Command 'register' execution denied (CallerInfo=#{caller_module => mod_http_api,ip => {0,0,0,0,0,0,0,1}})

Sternstein commented 4 years ago

It should be available on http://your-ip-here:8000/admin/

Gloome commented 4 years ago

It should be available on http://your-ip-here:8000/admin/ At admin-panel havn't info about API and oAuth And users list is empty 🙁

oxoWrk commented 4 years ago

It looks like you did not install the server correctly. The server is installed in 2 stages:

  1. run the binary installer
  2. subsequent installation steps are done via a web console, located at http://yourdomain.com:8000 or http://your_server_ip:8000 address.

You did only the first stage

Gloome commented 4 years ago

You did only the first stage

No, I did the second stage

The server is running. Xabber is working. Everything is fine, only with the RestAPI oAuth authorization of the problem

andrewnenakhov commented 4 years ago

Looks like the issue is a result of an incorrect configuration. Please, repeat the installation according to instruction in the wiki.

This issue tracker is for bugs/feature suggestions., not for tech support. Hope you understand.