Skip to content

feat: Azure Blob Storage channel support - #1

Open
tenzinplatter wants to merge 117 commits into
mainfrom
feat/azure-blob-channel
Open

feat: Azure Blob Storage channel support#1
tenzinplatter wants to merge 117 commits into
mainfrom
feat/azure-blob-channel

Conversation

@tenzinplatter

Copy link
Copy Markdown
Collaborator

Summary

Adds Azure Blob Storage as a conda channel backend, mirroring the existing S3 support. Everything is gated behind a new azure cargo feature in each crate (rattler_config, rattler_networking, rattler_index, rattler_upload, rattler-bin).

  • Fetch repodata/packages directly from az://{container}/{path} via a new AzureMiddleware that rewrites az:// → HTTPS and signs with reqsign's Azure Signer.
  • Upload + reindex without an azcopy round-trip: OpenDAL azblob Operator built with only account + endpoint (no account_key/sas_token), so reqsign's DefaultCredentialProvider chain resolves credentials ambiently (env → az login → managed identity → workload identity → IMDS).
  • Config: [azure-options.<container>] (account + optional endpoint-url), keyed by container name, analogous to [s3-options.<bucket>].
  • CLI: rattler-index azure and rattler-upload azure subcommands with --account / --endpoint-url flags.

Authentication needs no stored secrets: az login for local dev, managed/workload identity or SP env vars in CI.

Notable design points

  • No credentials on the write path is the core invariant — AzblobConfig sets only container/root/account_name/endpoint. A unit test asserts account_key/sas_token stay None.
  • The generic index_with_channel_metadata is unchanged (storage-agnostic).

Known scope limitation (intentional)

rattler-bin registers AzureMiddleware with an empty config map and the index/upload subcommands take account/endpoint_url as explicit CLI flags. Wiring [azure-options.<container>] from a config file into the middleware/index at runtime is the pixi integration follow-up (separate spec) — the rattler CLI layer has no config file. Containers fetched via rattler-bin directly must therefore use the default {account}.blob.core.windows.net endpoint.

Test Plan

  • Unit tests: config (48), upload incl. azure_opt_tests (34), index lib incl. azblob_config (2), networking azure_middleware rewrite/passthrough (4)
  • cargo build for each crate with --features azure; whole workspace builds with azure off (gating confirmed)
  • cargo clippy --features azure -- -D warnings clean for networking/index/upload
  • Azurite integration test (azure_azurite.rs, #[ignore]) compiles; run with a local Azurite + AZURE_STORAGE_ACCOUNT_KEY to exercise the write/list/read path

tenzinplatter and others added 30 commits June 12, 2026 09:35
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants