Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent reading request and response body #273

Open
fredmaggiowski opened this issue Oct 12, 2023 · 1 comment · Fixed by #275
Open

Prevent reading request and response body #273

fredmaggiowski opened this issue Oct 12, 2023 · 1 comment · Fixed by #275
Labels
enhancement New feature or request service

Comments

@fredmaggiowski
Copy link
Member

Is your feature request related to a problem? Please describe

The possibility to run policy over the request/response body is a nice feature, however it's not always useful but still rönd loads the whole body is the content type is supported.

When dealing with large request bodies this may lead to:

  • adding latency
  • memory issues (e.g. we have a pod being killed from time to time for going OOM)

Describe the solution you'd like

I'd like to have some flag in the OAS extension that can let me disable the body reading feature

{
   "x-rond": {
      "requestFlow": {
         "policyName": "policy_to_be_executed_BEFORE_API_invocation",
         "preventRequestBodyLoad": true|false. // disable only for request
       },
        "responseFlow": {
         "policyName": "policy_to_be_executed_AFTER_API_invocation",
         "preventRequestBodyLoad": true|false // disable only for response
       },
       "options": {
         "enableResourcePermissionsMapOptimization": false,
         "ignoreTrailingSlash": false,
         "preventRequestBodyLoad": true|false  // disable for both request and response
      }
   }
}

Describe alternatives you've considered

Increasing memory: no thanks...

Additional context

Rönd version used: 1.10.1
OAS support could be implemented in v2 only (x-rond)

@fredmaggiowski
Copy link
Member Author

Reopening since there still something to discuss about response imho

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request service
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant