Use kludge profiles based on user-agent #147

Open
opened 2023-06-21 08:29:25 +00:00 by alexvanin · 1 comment
Owner

S3 gateway contains a static list of kludges in config file to be compatible with certain clients. There are more kludges to come, see #146. While the list is static, admin should decide beforehand what kludges must be enabled.

Describe the solution you'd like

Use different approach to enable or disable the kludge: set on or off flags based on the user-agent for the request. Define list of kludges in the middleware and store kludge parameters in the context. Reuse it during request processing.

Describe alternatives you've considered

Keep kludges static in config.

Additional context

To do this, we should create some test suits for different application and libraries first, so we can test regression and add more kludges for different clients if needed.

## Is your feature request related to a problem? Please describe. S3 gateway contains a static list of kludges in config file to be compatible with certain clients. There are more kludges to come, see #146. While the list is static, admin should decide beforehand what kludges must be enabled. ## Describe the solution you'd like Use different approach to enable or disable the kludge: set on or off flags based on the user-agent for the request. Define list of kludges in the middleware and store kludge parameters in the context. Reuse it during request processing. ## Describe alternatives you've considered Keep kludges static in config. ## Additional context To do this, we should create some test suits for different application and libraries first, so we can test regression and add more kludges for different clients if needed.
Author
Owner

In this issue I expect to see kludge.profile section in config. This should be a list of objects that contain:

  • user-agent regexp
  • set of kludge parameters
kludge:
  # these values are default
  use_default_xmlns: true
  bypass_content_encoding_check_in_chunks: false
  default_namespaces: [ "", "root" ]
  # new profile section override defaults based on user agent
  profile:
    - user_agent: aws-cli
      use_default_xmlns: false
    - user_agent: aws-sdk-go
      use_default_xmlns: true
      bypass_content_encoding_check_in_chunks: false

During request processing, s3-gateway should check user_agent and override default kludges with the config values.

In this issue I expect to see `kludge.profile` section in config. This should be a list of objects that contain: * user-agent regexp * set of kludge parameters ```yaml kludge: # these values are default use_default_xmlns: true bypass_content_encoding_check_in_chunks: false default_namespaces: [ "", "root" ] # new profile section override defaults based on user agent profile: - user_agent: aws-cli use_default_xmlns: false - user_agent: aws-sdk-go use_default_xmlns: true bypass_content_encoding_check_in_chunks: false ``` During request processing, s3-gateway should check user_agent and override default kludges with the config values.
pogpp was assigned by alexvanin 2024-11-19 08:09:07 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-s3-gw#147
No description provided.