Repository navigation
Conversation
open_virtual() now reads `earthaccess:virtual_chunk_credentials` from the repository metadata (written by the vds plugin) and builds a refreshable `Credentials.S3` for each hinted container, so a bare `asset.href` opens without the caller passing provider=/credentials. Precedence: explicit `authorize_virtual_chunk_access` > metadata hints > environment defaults. Also fixes a latent runtime bug: `authorize_virtual_chunk_access` values must be `icechunk.credentials.Credentials` wrappers, so raw `S3Credentials.*` / GCS / Azure values raised TypeError on open (HTTPS stores were unaffected because the sentinels are already Credentials). They are wrapped now. Tests: tests/unit/test_virtual_credentials.py (8 cases) plus the existing VCC tests updated for the wrapper.
betolink
force-pushed
the
feat/vds-credential-hints
branch
from
November 16, 2026 05:44
d074073 to
ab5bc1b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
open_virtual()now reads the credential hints the vds plugin records in theicechunk repository metadata (
earthaccess:virtual_chunk_credentials) and buildsa refreshable
Credentials.S3provider for each hinted container.That closes the "custom store" gap: a store whose chunks live in a NASA S3
bucket can be opened from just its href — no CMR result, no
provider=, nohand-built
authorize_virtual_chunk_access:Precedence: explicit
authorize_virtual_chunk_access=> metadata hints >environment/collection defaults. Hints whose prefix is not a configured
container are ignored.
Also fixes a latent bug
authorize_virtual_chunk_accessvalues must beicechunk.credentials.Credentialswrappers in icechunk 2.3.
_build_vcc_credentialsreturned rawS3Credentials.*/ GCS / Azure values, so any S3-chunk store opened throughearthaccess raised
TypeError(HTTPS stores worked only because theHttpAccesssentinel is already aCredentials). They are wrapped now; thethree existing VCC tests are updated accordingly.
How
_endpoint_credentials(endpoint): module-level, picklable callable thatexchanges the EDL token at the endpoint (falls back to
earthaccess.login(strategy="environment"), so it also works on Dask workersholding
EARTHDATA_TOKEN)._metadata_credential_mapping(metadata, vccs)and_reopen_with_metadata_credentials(repo, mapping, explicit): used by the twohref-based open paths. The collection path keeps its collection credentials.
Tests
tests/unit/test_virtual_credentials.py(8): hint parsing, unknown prefixes,missing endpoint, real reopen authorizes the container, explicit wins, no-hint
stores do not reopen, endpoint token exchange.
Credentialswrapper.pre-commit clean.
Pairs with
earthaccess-dev/earthaccess-plugin-vds#2(merged): the writer that recordsthe hints.
📚 Documentation preview 📚: https://earthaccess--1504.org.readthedocs.build/en/1504/