You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "YuangGao (via GitHub)" <gi...@apache.org> on 2026/05/22 04:51:20 UTC

[PR] refactor(services/azblob): use OsEnv instead of StaticEnv hack [opendal]

YuangGao opened a new pull request, #7589:
URL: https://github.com/apache/opendal/pull/7589

   ## Which issue does this PR close?
   
   - Related to apache/opendal-reqsign#756 and #7224.
   
   ## Rationale for this change
   
   `azblob`'s builder was injecting user-supplied `account_name` / `account_key` / `sas_token` into reqsign by translating them into fake env vars stuffed into a `StaticEnv`. The same values were also pushed into the credential chain via `StaticCredentialProvider::new_shared_key` / `new_sas_token` (see lines 393-406 in the old code), so the fake-env path was redundant — only `push_front` actually fired, because it has higher priority in the chain.
   
   The `StaticEnv` hack also previously masked OS env vars (see #7224 root cause for azdls); the same anti-pattern in azblob has no functional benefit.
   
   ## What changes are included in this PR?
   
   Switch to the s3 pattern:
   
   - `.with_env(StaticEnv { ... })` -> `.with_env(OsEnv)`.
   - Drop the `envs.insert("AZBLOB_ACCOUNT_NAME", ...)` / `AZBLOB_ACCOUNT_KEY` / `AZURE_STORAGE_SAS_TOKEN` translation block.
   - Keep the existing `StaticCredentialProvider::new_shared_key` / `new_sas_token` push_front chain (already the correct API).
   - Keep the base64 validation for `account_key`.
   - Drop now-unused `reqsign_core::Env` / `StaticEnv` imports.
   
   ## Are there any user-facing changes?
   
   No behavior change for users who set credentials via opendal config


-- 
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: commits-unsubscribe@opendal.apache.org

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


Re: [PR] refactor(services/azblob): use OsEnv instead of StaticEnv hack [opendal]

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo merged PR #7589:
URL: https://github.com/apache/opendal/pull/7589


-- 
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: commits-unsubscribe@opendal.apache.org

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