You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "lplcc (via GitHub)" <gi...@apache.org> on 2023/10/23 08:12:16 UTC

[I] bug: When the request body is too large, forward-auth returns 403 [apisix]

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

   ### Current Behavior
   
   When the request body is too large, forward-auth returns 403
   
   ### Expected Behavior
   
   Hope to support the upload of more than 10M files
   
   ### Error Logs
   
   send() failed (32: Broken pipe), client: 10.10.103.41, server: _, request: "POST /jljftest/v1/paas/service/meter HTTP/1.1", host: "172.70.2.82:9080"
   [lua] forward-auth.lua:125: phase_func(): failed to process forward auth, err: broken pipe, client: 10.10.103.41, server: _, request: "POST /jljftest/v1/paas/service/meter HTTP/1.1", host: "172.70.2.82:9080"
   
   ### Steps to Reproduce
   
   1,Configuring routes
   2,add forward-auth plugin
   3,Calls the gateway interface to upload a request containing a base64 string
   
   ### Environment
   
   - APISIX version (run `[APISIX/3.6.0]`):
   - Operating system (run `linux`):
   - OpenResty / Nginx version (run `openresty/1.21.4.2` or `nginx -V`):
   - etcd version, if relevant (run `3.5.0`):
   - APISIX Dashboard version, run 3.0.1:
   - Plugin runner version, for issues related to plugin runners: forward-auth 3.6.0
   - LuaRocks version, for installation issues (run `3.8.0`):
   


-- 
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] bug: When the request body is too large, forward-auth returns 403 [apisix]

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

   > Try to increase the [conf.keepalive](https://github.com/apache/apisix/blob/455804771124c15ff909e49ad8dfdd961f0e4a88/apisix/plugins/forward-auth.lua#L113) and the [conf.timeout](https://github.com/apache/apisix/blob/455804771124c15ff909e49ad8dfdd961f0e4a88/apisix/plugins/forward-auth.lua#L119)
   
   Have you tried this?


-- 
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] bug: When the request body is too large, forward-auth returns 403 [apisix]

Posted by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org>.
monkeyDluffy6017 closed issue #10375: bug: When the request body is too large, forward-auth returns 403
URL: https://github.com/apache/apisix/issues/10375


-- 
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] bug: When the request body is too large, forward-auth returns 403 [apisix]

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

   > > When the request body is too large, forward-auth returns 403
   > 
   > Can you describe the use case? Why would an auth request carry a too large body?
   
   Our API is going to upload an attachment, which is done through a base64 string


-- 
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] bug: When the request body is too large, forward-auth returns 403 [apisix]

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

   > Can you give a detailed solution, or how to configure it
   
   You can configure these attributes in the plugin configuration.
   
   <img width="825" alt="image" src="https://github.com/apache/apisix/assets/61597896/44829503-aea1-4326-a770-92ca2e0f3e5b">
   


-- 
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] bug: When the request body is too large, forward-auth returns 403 [apisix]

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

   could you please share your route configuration?


-- 
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] bug: When the request body is too large, forward-auth returns 403 [apisix]

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

   If these configurations can solve your problem, why do you create a completely different PR?


-- 
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] bug: When the request body is too large, forward-auth returns 403 [apisix]

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

   Because I don't know much about lua, am not sure if my solution is perfect, but want to fix the bug


-- 
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] bug: When the request body is too large, forward-auth returns 403 [apisix]

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

   > It's ok to increase the timeout, let's close this issue
   
   it can't work,I was wrong about your question last time.
   
   
   > Yes, our production environment is already in use,You couldn't upload 10MB images before, but now you can
   This is done by modifying the source code, not by increasing the timeout
   


-- 
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] bug: When the request body is too large, forward-auth returns 403 [apisix]

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

   It's ok to increase the timeout, let's close this issue


-- 
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] bug: When the request body is too large, forward-auth returns 403 [apisix]

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

   Yes, our production environment is already in use,You couldn't upload 10MB images before, but now you can


-- 
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] bug: When the request body is too large, forward-auth returns 403 [apisix]

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

   @monkeyDluffy6017, the OP is right, this bug actually exists.


-- 
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] bug: When the request body is too large, forward-auth returns 403 [apisix]

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

   Try to increase the [conf.keepalive](https://github.com/apache/apisix/blob/455804771124c15ff909e49ad8dfdd961f0e4a88/apisix/plugins/forward-auth.lua#L113) and the [conf.timeout](https://github.com/apache/apisix/blob/455804771124c15ff909e49ad8dfdd961f0e4a88/apisix/plugins/forward-auth.lua#L119)


-- 
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] bug: When the request body is too large, forward-auth returns 403 [apisix]

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

   > Try to increase the [conf.keepalive](https://github.com/apache/apisix/blob/455804771124c15ff909e49ad8dfdd961f0e4a88/apisix/plugins/forward-auth.lua#L113) and the [conf.timeout](https://github.com/apache/apisix/blob/455804771124c15ff909e49ad8dfdd961f0e4a88/apisix/plugins/forward-auth.lua#L119)
   ![image](https://github.com/apache/apisix/assets/22811367/73c86720-0bad-4465-b1c8-744cda3beade)
   https://github.com/ledgetech/lua-resty-http#get_client_body_reader
   it can solve the problem,There may be a better solution, but I don't have any other options
   
   
   


-- 
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] bug: When the request body is too large, forward-auth returns 403 [apisix]

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

   @shreemaan-abhishek the related pr failed a lot of test cases, would you like to fix this?


-- 
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] bug: When the request body is too large, forward-auth returns 403 [apisix]

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

   > When the request body is too large, forward-auth returns 403
   
   Can you describe the use case? Why would an auth request carry a too large body?


-- 
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] bug: When the request body is too large, forward-auth returns 403 [apisix]

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

   > It's ok to increase the timeout, let's close this issue
   Can you give a detailed solution, or how to configure it
   


-- 
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] bug: When the request body is too large, forward-auth returns 403 [apisix]

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

   I have tried all these things, but none of them have solved the problem
   `conf.keepalive_timeout = 60000 `
   `conf.timeout = 60000 `
   `conf.keepalive = true`
   


-- 
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] bug: When the request body is too large, forward-auth returns 403 [apisix]

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

   @lplcc Unlike Nginx, APISIX does not limit the body size by default.
   what is the value of `client_max_body_size` in your apisix configuration. You can set it to 0(for infinite)


-- 
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] bug: When the request body is too large, forward-auth returns 403 [apisix]

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

   > It's ok to increase the timeout, let's close this issue
   
   I have tried,but I failed


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