You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "Padmabishek (via GitHub)" <gi...@apache.org> on 2023/09/11 07:29:45 UTC

[GitHub] [apisix] Padmabishek opened a new issue, #10188: Apisix route configuration and behavior when there is a conflicting regex match path routes

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

   ### Description
   
   I am having two apisix routes defined with match paths URI "test/*" and "test/receiver" in the system , but always apisix matches the first route event for "test/receiver" is this expected behavior ? How to make apisix to match the route "test/receiver" , always when url  "test/receiver" is accessed?
   
   ### Environment
   
   - APISIX version 3.4.1:
   - Operating system : 172-Ubuntu SMP Fri Jul 7 16:10:02 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
   - OpenResty / Nginx version : openresty/1.21.4.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.apache.org

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


Re: [I] Apisix route configuration and behavior when there is a conflicting regex match path routes [apisix]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #10188: Apisix route configuration and behavior when there is a conflicting regex match path routes
URL: https://github.com/apache/apisix/issues/10188


-- 
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] Padmabishek commented on issue #10188: Apisix route configuration and behavior when there is a conflicting regex match path routes

Posted by "Padmabishek (via GitHub)" <gi...@apache.org>.
Padmabishek commented on issue #10188:
URL: https://github.com/apache/apisix/issues/10188#issuecomment-1715066913

   relevant route config from admin API
   
   		{
   			"key": "/apisix/routes/8b04adff",
   			"createdIndex": 19,
   			"modifiedIndex": 13214,
   			"value": {
   				"desc": "Created by apisix-ingress-controller, DO NOT modify it manually",
   				"plugins": {
   					"proxy-rewrite": {
   						"regex_uri": [
   							"/snow/(.*)",
   							"/$1"
   						],
   						"use_real_request_uri_unsafe": false
   					},
   					"cors": {
   						"max_age": 5,
   						"allow_headers": "Cache-Control,Content-Language,Content-Length,Content-Type,Expires,Last-Modified,Pragma,Authorization,GeoParams",
   						"allow_origins": "*",
   						"allow_origins_by_regex": [
   							".*\\.radisys.com"
   						],
   						"expose_headers": "Authorization,GeoParams",
   						"allow_credential": false,
   						"allow_methods": "GET,POST,PUT,DELETE,PATCH,HEAD,OPTIONS,CONNECT,TRACE"
   					},
   					"region-zone-auth": {
   						"rejected_msg": "Unauthorized!",
   						"redis_database": 0,
   						"redis_timeout": 1000,
   						"rejected_code": 401,
   						"redis_port": 6379,
   						"redis_host": "redis-headless.redis"
   					},
   					"authz-keycloak": {
   						"permissions": {},
   						"client_id": "apisix",
   						"keepalive_pool": 5,
   						"keepalive": true,
   						"token_endpoint": "https://keycloak.keycloak:8443/auth/realms/snow/protocol/openid-connect/token",
   						"client_secret": "U25vd0FwaXNpeENsaWVudEAxMjM0",
   						"grant_type": "urn:ietf:params:oauth:grant-type:uma-ticket",
   						"timeout": 3000,
   						"ssl_verify": false,
   						"keepalive_timeout": 60000,
   						"lazy_load_paths": false,
   						"http_method_as_scope": false,
   						"cache_ttl_seconds": 86400,
   						"policy_enforcement_mode": "PERMISSIVE",
   						"access_token_expires_in": 300,
   						"access_token_expires_leeway": 0,
   						"refresh_token_expires_in": 3600,
   						"refresh_token_expires_leeway": 0
   					},
   					"limit-req": {
   						"rejected_msg": "Too many requests!",
   						"key_type": "var",
   						"allow_degradation": false,
   						"rate": 500,
   						"burst": 500,
   						"nodelay": false,
   						"key": "",
   						"rejected_code": 300
   					},
   					"request-id": {
   						"header_name": "X-Request-Id",
   						"include_in_response": true,
   						"algorithm": "uuid"
   					}
   				},
   				"status": 1,
   				"labels": {
   					"managed-by": "apisix-ingress-controller"
   				},
   				"uris": [
   					"/snow/*"
   				],
   				"create_time": 1693992627,
   				"hosts": [
   					"blacklink.radisys.com"
   				],
   				"id": "8b04adff",
   				"priority": 0,
   				"update_time": 1694425826,
   				"name": "snow-web-bff_bff-route_snow-routing-rule-for-bff",
   				"upstream_id": "c0623a40"
   			}
   		},
   		{
   			"key": "/apisix/routes/8bf3c836",
   			"createdIndex": 21,
   			"modifiedIndex": 13217,
   			"value": {
   				"desc": "Created by apisix-ingress-controller, DO NOT modify it manually",
   				"plugins": {
   					"cors": {
   						"max_age": 5,
   						"allow_headers": "Cache-Control,Content-Language,Content-Length,Content-Type,Expires,Last-Modified,Pragma,Authorization,GeoParams",
   						"allow_origins": "*",
   						"allow_origins_by_regex": [
   							".*\\.radisys.com"
   						],
   						"expose_headers": "Authorization,GeoParams",
   						"allow_credential": false,
   						"allow_methods": "GET,POST,PUT,DELETE,PATCH,HEAD,OPTIONS,CONNECT,TRACE"
   					},
   					"proxy-rewrite": {
   						"regex_uri": [
   							"/snow/(.*)",
   							"/$1"
   						],
   						"use_real_request_uri_unsafe": false
   					},
   					"limit-req": {
   						"rejected_msg": "Too many requests!",
   						"key_type": "var",
   						"allow_degradation": false,
   						"rate": 500,
   						"burst": 500,
   						"nodelay": false,
   						"key": "",
   						"rejected_code": 300
   					},
   					"request-id": {
   						"header_name": "X-Request-Id",
   						"include_in_response": true,
   						"algorithm": "uuid"
   					}
   				},
   				"status": 1,
   				"labels": {
   					"managed-by": "apisix-ingress-controller"
   				},
   				"uris": [
   					"/snow/static/*",
   					"/snow/help-center/*",
   					"/snow/favicon.ico",
   					"/snow/",
   					"/snow/api/*"
   				],
   				"create_time": 1693992627,
   				"hosts": [
   					"blacklink.radisys.com"
   				],
   				"id": "8bf3c836",
   				"priority": 1,
   				"update_time": 1694425826,
   				"name": "snow-web-bff_bff-route-static_snow-routing-rule-for-bff",
   				"upstream_id": "c0623a40"
   			}
   		},
   		{
   			"key": "/apisix/routes/c90c2483",
   			"createdIndex": 12569,
   			"modifiedIndex": 13222,
   			"value": {
   				"desc": "Created by apisix-ingress-controller, DO NOT modify it manually",
   				"plugins": {
   					"proxy-rewrite": {
   						"regex_uri": [
   							"/snow/ves/(.*)",
   							"/$1"
   						],
   						"use_real_request_uri_unsafe": false
   					},
   					"limit-req": {
   						"rejected_msg": "Too many requests!",
   						"key_type": "var",
   						"allow_degradation": false,
   						"rate": 500,
   						"burst": 500,
   						"nodelay": false,
   						"key": "",
   						"rejected_code": 300
   					},
   					"request-id": {
   						"header_name": "X-Request-Id",
   						"include_in_response": true,
   						"algorithm": "uuid"
   					}
   				},
   				"status": 1,
   				"labels": {
   					"managed-by": "apisix-ingress-controller"
   				},
   				"uris": [
   					"/snow/ves/eventListener",
   					"/snow/ves/actuator/health"
   				],
   				"create_time": 1694411130,
   				"priority": 10,
   				"id": "c90c2483",
   				"update_time": 1694425827,
   				"name": "snow-rest-ves_rest-ves-route_rest-ves-routing-rule",
   				"upstream_id": "8b4ee006"
   			}
   		}


-- 
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] Revolyssup commented on issue #10188: Apisix route configuration and behavior when there is a conflicting regex match path routes

Posted by "Revolyssup (via GitHub)" <gi...@apache.org>.
Revolyssup commented on issue #10188:
URL: https://github.com/apache/apisix/issues/10188#issuecomment-1726078690

   @Padmabishek Can you paste the full Route configuration of both `/snow/*` and `/snow/ves/actuator/health` along with the output of curl command when you send request? Because I could not reproduce this in master as well as 3.4. The route matching is fine. 


-- 
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] Revolyssup commented on issue #10188: Apisix route configuration and behavior when there is a conflicting regex match path routes

Posted by "Revolyssup (via GitHub)" <gi...@apache.org>.
Revolyssup commented on issue #10188:
URL: https://github.com/apache/apisix/issues/10188#issuecomment-1714918003

   Can you provide both of your route configuration after confirming that both are present? 


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


Re: [I] Apisix route configuration and behavior when there is a conflicting regex match path routes [apisix]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #10188:
URL: https://github.com/apache/apisix/issues/10188#issuecomment-1761251210

   This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.


-- 
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] Padmabishek commented on issue #10188: Apisix route configuration and behavior when there is a conflicting regex match path routes

Posted by "Padmabishek (via GitHub)" <gi...@apache.org>.
Padmabishek commented on issue #10188:
URL: https://github.com/apache/apisix/issues/10188#issuecomment-1715052058

   ![tempsnip](https://github.com/apache/apisix/assets/6745530/79b9618a-64b4-4972-bab1-1857f0ee2f99)
   Here I have routes with different plugins enabled and for the routes with paths snow/ves/* we dont have any authorization plugins enabled,but its enable for the other routes with the path /snow/* , but still I get {"message":"Missing JWT token in request"} error from the plugin in the other route when I access "/snow/ves/eventListener" . Also the request was getting redirected to the backend in the snow/* route


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


Re: [I] Apisix route configuration and behavior when there is a conflicting regex match path routes [apisix]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #10188:
URL: https://github.com/apache/apisix/issues/10188#issuecomment-1752710050

   Due to lack of the reporter's response this issue has been labeled with "no response". It will be close in 3 days if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the dev@apisix.apache.org list. Thank you for your contributions.


-- 
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] Padmabishek commented on issue #10188: Apisix route configuration and behavior when there is a conflicting regex match path routes

Posted by "Padmabishek (via GitHub)" <gi...@apache.org>.
Padmabishek commented on issue #10188:
URL: https://github.com/apache/apisix/issues/10188#issuecomment-1725796673

   @Revolyssup This issue was not seen when I downgraded to 3.2.2 LTS 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

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