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 2022/12/21 05:56:27 UTC

[GitHub] [apisix] bluewaystar opened a new issue, #8547: help request: Errors are reported by different consumers pointing to different published routes

bluewaystar opened a new issue, #8547:
URL: https://github.com/apache/apisix/issues/8547

   ### Description
   
   ----------Errors are reported by different consumers pointing to different published routes -------EN
   1. Two routes R1 and R2 and two consumers C1 and C2 are established respectively
   
   2. Consumer C1 points to route R1, and consumer C2 points to route R2
   
   3. Publish a route and offline another route. At this time, the route of request publishing is OK.
   
   4. However, if two routes are published at the same time, an error is reported when requesting a route:
    {"message": "The consumer_name is forbidden."}
   
   
   ---------- 不同消费者指向不同发布的路由报错 CN----------------------------
   1.分别建立了两个路由R1、R2和两个消费者C1、C2.
   2.消费者C1指向路由R1,消费者C2指向路由R2.
   3.发布一个路由,下线另外一个路由。这时候请求发布的路由是没问题的。
   4.但是如果同时发布两个路由,那么其中请求一个路由的时候报错:{"message":"The consumer_name is forbidden."}
   
   ### Environment
   
   - APISIX version (run `apisix version`):
   - Operating system (run `uname -a`):
   - OpenResty / Nginx version (run `openresty -V` or `nginx -V`):
   - etcd version, if relevant (run `curl http://127.0.0.1:9090/v1/server_info`):
   - APISIX Dashboard version, if relevant:
   - Plugin runner version, for issues related to plugin runners:
   - LuaRocks version, for installation issues (run `luarocks --version`):
   


-- 
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.apache.org

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


[GitHub] [apisix] spacewander commented on issue #8547: help request: Errors are reported by different consumers pointing to different published routes

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #8547:
URL: https://github.com/apache/apisix/issues/8547#issuecomment-1360907866

   How do you create the consumer C1 & C2?


-- 
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] spacewander commented on issue #8547: help request: Errors are reported by different consumers pointing to different published routes

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #8547:
URL: https://github.com/apache/apisix/issues/8547#issuecomment-1367672805

   Consider solved. Feel free to reopen it if needed.


-- 
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] An-DJ commented on issue #8547: help request: Errors are reported by different consumers pointing to different published routes

Posted by GitBox <gi...@apache.org>.
An-DJ commented on issue #8547:
URL: https://github.com/apache/apisix/issues/8547#issuecomment-1363480313

   > @An-DJ Would you help me to look up this issue? Thanks!
   
   plz assign to me : )


-- 
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] bluewaystar commented on issue #8547: help request: Errors are reported by different consumers pointing to different published routes

Posted by GitBox <gi...@apache.org>.
bluewaystar commented on issue #8547:
URL: https://github.com/apache/apisix/issues/8547#issuecomment-1367228106

   > @bluewaystar Notice that u use the same uri but different rules with plugin `consumer-restriction`.
   > 
   > The http requests with 2 different kinds of jwt-token are C1 and C2, but they are corresponding to the same uri "/". That is, C2's request might be routed to R2, so that the C2's request may be forbidden because it's not in R2's whitelist.
   > 
   > If you want to restrict the `Consumer` to a specific `Route`, you can add more different rules in it to distinguish the two `Route` with the same uri, such as `host` and `remote_addr`.
   
   thanks.i try it,is success.


-- 
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] bluewaystar commented on issue #8547: help request: Errors are reported by different consumers pointing to different published routes

Posted by GitBox <gi...@apache.org>.
bluewaystar commented on issue #8547:
URL: https://github.com/apache/apisix/issues/8547#issuecomment-1364821622

   can you help me?


-- 
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] An-DJ commented on issue #8547: help request: Errors are reported by different consumers pointing to different published routes

Posted by GitBox <gi...@apache.org>.
An-DJ commented on issue #8547:
URL: https://github.com/apache/apisix/issues/8547#issuecomment-1366508811

   @bluewaystar Notice that u use the same uri but different rules with plugin `consumer-restriction`. 
   
   The http requests with 2 different kinds of jwt-token are C1 and C2, but they are corresponding to the same uri "/". 
   That is, C2's request might be routed to R2, so that the C2's request may be forbidden because it's not in R2's whitelist.
   
   If you want to restrict the `Consumer` to a specific `Route`, you can add more different rules in it to distinguish the two `Route` with the same uri, such as `host` and `remote_addr`.


-- 
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] bluewaystar commented on issue #8547: help request: Errors are reported by different consumers pointing to different published routes

Posted by GitBox <gi...@apache.org>.
bluewaystar commented on issue #8547:
URL: https://github.com/apache/apisix/issues/8547#issuecomment-1360916536

   > How do you create the consumer C1 & C2?
   
   {
       "username": "C1",
       "plugins": {
           "jwt-auth": {
               "key": "C1-key",
               "secret": "C1-secret"
           }
       }
   }


-- 
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] spacewander closed issue #8547: help request: Errors are reported by different consumers pointing to different published routes

Posted by GitBox <gi...@apache.org>.
spacewander closed issue #8547: help request: Errors are reported by different consumers pointing to different published routes 
URL: https://github.com/apache/apisix/issues/8547


-- 
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] bluewaystar commented on issue #8547: help request: Errors are reported by different consumers pointing to different published routes

Posted by GitBox <gi...@apache.org>.
bluewaystar commented on issue #8547:
URL: https://github.com/apache/apisix/issues/8547#issuecomment-1364781088

   @spacewander @An-DJ  Has this problem been solved?


-- 
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] bluewaystar commented on issue #8547: help request: Errors are reported by different consumers pointing to different published routes

Posted by GitBox <gi...@apache.org>.
bluewaystar commented on issue #8547:
URL: https://github.com/apache/apisix/issues/8547#issuecomment-1364999522

   > > can you help me?
   > 
   > @bluewaystar I'm working on it. Plz waitting a few days : )
   
   thanks.


-- 
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] spacewander commented on issue #8547: help request: Errors are reported by different consumers pointing to different published routes

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #8547:
URL: https://github.com/apache/apisix/issues/8547#issuecomment-1363474664

   @An-DJ 
   Would you help me to look up this issue? Thanks!


-- 
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] An-DJ commented on issue #8547: help request: Errors are reported by different consumers pointing to different published routes

Posted by GitBox <gi...@apache.org>.
An-DJ commented on issue #8547:
URL: https://github.com/apache/apisix/issues/8547#issuecomment-1364832008

   > can you help me?
   
   @bluewaystar I'm working on it. Plz waitting a few days : )


-- 
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] bluewaystar commented on issue #8547: help request: Errors are reported by different consumers pointing to different published routes

Posted by GitBox <gi...@apache.org>.
bluewaystar commented on issue #8547:
URL: https://github.com/apache/apisix/issues/8547#issuecomment-1360894833

   Create route R1 and R2:
   {
       "uri": ["/*"],
       "methods": ["GET","POST"],
       "priority": 0,
       "name": "R1",
       "plugins": {"jwt-auth": {"disable": false},"consumer-restriction": {
               "whitelist": [
                   "C1"
               ]
           }, "proxy-rewrite": {
               "regex_uri": ["^/xy/(.*)","/$1"]
           }},
       "desc": "R1 DESC",
       "upstream_id": "00000000000000000430"
   }
   
   {
       "uris": ["/*"],
       "methods": ["GET","POST"],
       "priority": 0,
       "name": "R2",
       "plugins": {"jwt-auth": {"disable": false},"consumer-restriction": {
               "whitelist": [
                   "C2"
               ]
           }, "proxy-rewrite": {
               "regex_uri": ["^/mn/(.*)","/$1"]
           }},
       "desc": "R2 DESC",
       "upstream_id": "00000000000000000432"
   }


-- 
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