Skip to content

fix(services/azfile): load credentials from the process environment - #8423

Open
YuangGao wants to merge 1 commit into
apache:mainfrom
YuangGao:fix/azfile-os-env-credentials
Open

YuangGao wants to merge 1 commit into
apache:mainfrom
YuangGao:fix/azfile-os-env-credentials

Conversation

@YuangGao

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Follow-up to #8395.

Rationale for this change

azfile handed reqsign a StaticEnv built only from config values, so credentials in the process environment never reached the default chain, although its docs say OpenDAL loads them from the env. azblob (#7589) and azdls (#8395) already sign with OsEnv.

What changes are included in this PR?

  • Sign with OsEnv instead of a synthetic StaticEnv. Config account_key and sas_token still take precedence.

Verified against a real Azure Files share with one credential source per run: env shared key and env SAS token fail on main with failed to load signing credential; here env shared key passes all 116 behavior tests, and env SAS token passes all but the 4 rename tests, which fail the same way with a config SAS on main. Config account key passes on both.

Are there any user-facing changes?

azfile now loads credentials from the process environment, as its docs already describe. OAuth credentials still don't work, since azfile doesn't send the x-ms-file-request-intent header Azure Files requires for OAuth.

Breaking changes

AI Usage Statement

AI-assisted implementation.

@YuangGao
YuangGao requested a review from Xuanwo as a code owner October 22, 2026 03:46
@github-actions github-actions Bot added releases-note/fix The PR fixes a bug or has a title that begins with "fix" services/azfile size:S This PR changes 10-29 lines, ignoring generated files. labels Oct 22, 2026
@YuangGao
YuangGao force-pushed the fix/azfile-os-env-credentials branch from c5c6def to f8c25f9 Compare October 29, 2026 02:10

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

releases-note/fix The PR fixes a bug or has a title that begins with "fix" services/azfile size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant