opendal icon indicating copy to clipboard operation
opendal copied to clipboard

Tracking issues of presign options support across all backends

Open geruh opened this issue 6 months ago • 2 comments

Summary

While implementing presign_xxx_options support in #6273, we discovered that several backends either ignore or only partially support key presign options such as cache_control, if_modified_since, and others. This issue will track an investigation into each presign-capable backend to determine:

  • Whether these options are supported by the underlying service.
  • Whether the current implementation forwards them correctly.
  • Whether headers can be overridden and respected as expected.

Status

Note: This investigation below is not complete and may be lacking information/context across each service.

  • [ ] S3

    • Known Issues:
      • Write options aren't passed to put operations
  • [ ] Azure (azblob)

    • Known Issues:
      • Options ignored
      • Azure requires headers embedded during SAS token generation, but reqsign lacks support for custom headers during SAS signing
  • [ ] B2

    • Known Issues:
      • Options not passed to presign operations
      • Some headers (e.g. Content-Type: b2/x-auto) are hardcoded, overriding input.
      • Requires investigation into whether B2 accepts override headers and how to pass them.
  • [ ] COS

    • Known Issues:
      • Limited write option support, Need to determine if these headers are supported and how to correctly inject them.
  • [ ] OBS

    • Known Issues:
      • Limited write option support, Need to determine if these headers are supported and how to correctly inject them.
  • [ ] OSS

    • Known Issues:
      • Partial support—some headers are hardcoded and not customizable.
      • Needs review to identify which options are respected and how to enforce them.

Testing Strategy

For each backend, we will investigate their presigning documentation to understand the workflow for leveraging each option in the respective operations (GET, PUT, HEAD) and ensure the options are respected. Since there are no existing tests for presign write or presign stat with any options, we can leverage a local unit test that won't be committed until this work is done. Similar to the ones in this commit which helps validate that each option behaves as expected under different scenarios.

geruh avatar Jun 09 '25 19:06 geruh

Options such as if_modified_since and if_unmodified_since are managed by the read_with_if_unmodified_since capability. It is acceptable if the service does not support this feature.

Xuanwo avatar Jun 10 '25 04:06 Xuanwo

Okay I'll fix!

geruh avatar Jun 10 '25 06:06 geruh