You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/08/04 03:38:56 UTC

[GitHub] [apisix-dashboard] zhfish opened a new issue #2032: login: failed to check token: missing apikey

zhfish opened a new issue #2032:
URL: https://github.com/apache/apisix-dashboard/issues/2032


   ## Issue description
   ```
   version: "2"
   
   services:
     apisix-dashboard:
       image: apache/apisix-dashboard:2.7
       restart: always
       volumes:
       - /opt/apisix/dashboard.yaml:/usr/local/apisix-dashboard/conf/conf.yaml
       ports:
       - "9000:80"
       depends_on:
         - apisix
   
     apisix:
       image: apache/apisix:2.8-alpine
       restart: always
       volumes:
         - /data/apisix/log:/usr/local/apisix/logs
         - /opt/apisix/apisix.yaml:/usr/local/apisix/conf/config.yaml:ro
       depends_on:
         - etcd
       #network_mode: host
       ports:
         - "9080:80/tcp"
         - "9443:443/tcp"
   
     etcd:
       image: bitnami/etcd:3.5.0
       user: root
       restart: always
       volumes:
         - /data/apisix/etcd:/bitnami/etcd
       environment:
         ETCD_ENABLE_V2: "true"
         ALLOW_NONE_AUTHENTICATION: "yes"
         ETCD_ADVERTISE_CLIENT_URLS: "http://0.0.0.0:2379"
         ETCD_LISTEN_CLIENT_URLS: "http://0.0.0.0:2379"
   ```
   http://127.0.0.1:9000 login is ok
   http://gw.my.com login is 401
   ```
   2021/08/04 03:29:28 [warn] 46#46: *181149 [lua] init.lua:125: handler(): failed to check token: missing apikey, client: 1.2.3.232, server: _, request: "POST /apisix/admin/user/login HTTP/1.1", host: "gw.my.com"
   ```
   
   
   ## Environment
   
   * apisix version (cmd: `apisix version`): 2.8
   * apisix-dashboard version, if have: 2.7
   
   ## Additional context
   <!-- Do you want to solve this issue? or add any other context about the problem here. -->


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] zhfish commented on issue #2032: login: failed to check token: missing apikey

Posted by GitBox <gi...@apache.org>.
zhfish commented on issue #2032:
URL: https://github.com/apache/apisix-dashboard/issues/2032#issuecomment-892442215


   ```
   curl --request POST \
     --url http://127.0.0.1:9000/apisix/admin/user/login \
     --header 'Accept: application/json' \
     --header 'Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6' \
     --header 'Content-Type: application/json;charset=UTF-8' \
     --header 'Proxy-Connection: keep-alive' \
     --header 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36 Edg/92.0.902.62' \
     --data '{
   	"username": "admin",
   	"password": "admin"
   }'
   ```
   
   ```
   curl --request POST \
     --url http://gw.my.com/apisix/admin/user/login \
     --header 'Accept: application/json' \
     --header 'Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6' \
     --header 'Content-Type: application/json;charset=UTF-8' \
     --header 'Proxy-Connection: keep-alive' \
     --header 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36 Edg/92.0.902.62' \
     --data '{
   	"username": "admin",
   	"password": "admin"
   }'
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] zhfish closed issue #2032: login: failed to check token: missing apikey

Posted by GitBox <gi...@apache.org>.
zhfish closed issue #2032:
URL: https://github.com/apache/apisix-dashboard/issues/2032


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] nic-chen commented on issue #2032: login: failed to check token: missing apikey

Posted by GitBox <gi...@apache.org>.
nic-chen commented on issue #2032:
URL: https://github.com/apache/apisix-dashboard/issues/2032#issuecomment-892679620


   hi @zhfish
   what's `gw.my.com`?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] nic-chen commented on issue #2032: login: failed to check token: missing apikey

Posted by GitBox <gi...@apache.org>.
nic-chen commented on issue #2032:
URL: https://github.com/apache/apisix-dashboard/issues/2032#issuecomment-894010721


   @zhfish 
   
   Use the APISIX to proxy dashboard, need to confirm that the Admin API has been disabled. Because the prefix of Admin API and Manager API is the same, without disable Admin API, the apis with the prefix `/apisix/admin` will be accessed to Admin API, not Manager API


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] zhfish commented on issue #2032: login: failed to check token: missing apikey

Posted by GitBox <gi...@apache.org>.
zhfish commented on issue #2032:
URL: https://github.com/apache/apisix-dashboard/issues/2032#issuecomment-893606900


   upstream
   ```
   {
     "nodes": [
       {
         "host": "apisix-dashboard",
         "port": 80,
         "weight": 1
       }
     ],
     "timeout": {
       "connect": 76400,
       "read": 76400,
       "send": 76400
     },
     "type": "roundrobin",
     "scheme": "http",
     "pass_host": "pass",
     "name": "apisix-dashboard"
   }
   ```
   
   route
   ```
   {
     "uris": [
       "/*"
     ],
     "name": "apisix",
     "priority": 15,
     "methods": [
       "GET",
       "POST",
       "PUT",
       "DELETE",
       "PATCH",
       "HEAD",
       "OPTIONS",
       "CONNECT",
       "TRACE"
     ],
     "hosts": [
       "gw.my.com"
     ],
     "plugins": {
       "proxy-rewrite": {
         "scheme": "http"
       }
     },
     "upstream_id": "366606806119613132",
     "labels": {
       "API_VERSION": "v1"
     },
     "enable_websocket": true,
     "status": 1
   }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] zhfish commented on issue #2032: login: failed to check token: missing apikey

Posted by GitBox <gi...@apache.org>.
zhfish commented on issue #2032:
URL: https://github.com/apache/apisix-dashboard/issues/2032#issuecomment-894103928


   i change the admin's port, it's ok,
   建议更改默认端口号,省的还需要在文档里做出这种匪夷所思的说明。。
   产品不错,谢谢。


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] zhfish commented on issue #2032: login: failed to check token: missing apikey

Posted by GitBox <gi...@apache.org>.
zhfish commented on issue #2032:
URL: https://github.com/apache/apisix-dashboard/issues/2032#issuecomment-892779669


   > hi @zhfish
   > what's `gw.my.com`?
   
    I use apisix to proxy apisix-dashboard.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] nic-chen commented on issue #2032: login: failed to check token: missing apikey

Posted by GitBox <gi...@apache.org>.
nic-chen commented on issue #2032:
URL: https://github.com/apache/apisix-dashboard/issues/2032#issuecomment-894130841


   @zhfish 
   
   Good idea. 
   
   Thanks for sharing.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] nic-chen commented on issue #2032: login: failed to check token: missing apikey

Posted by GitBox <gi...@apache.org>.
nic-chen commented on issue #2032:
URL: https://github.com/apache/apisix-dashboard/issues/2032#issuecomment-892679620


   hi @zhfish
   what's `gw.my.com`?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] zhfish commented on issue #2032: login: failed to check token: missing apikey

Posted by GitBox <gi...@apache.org>.
zhfish commented on issue #2032:
URL: https://github.com/apache/apisix-dashboard/issues/2032#issuecomment-892779669


   > hi @zhfish
   > what's `gw.my.com`?
   
    I use apisix to proxy apisix-dashboard.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org