Skip to content

feat(indexd): add check-download verification of registered objects - #6

Merged
JoshuaHarris391 merged 1 commit into
mainfrom
feat/check-download
Aug 5, 2026
Merged

feat(indexd): add check-download verification of registered objects#6
JoshuaHarris391 merged 1 commit into
mainfrom
feat/check-download

Conversation

@JoshuaHarris391

Copy link
Copy Markdown
Collaborator

Supersedes #3 (auto-closed when its stacked base merged). Now that #1 is in main, the diff is just this PR's own commit.

Walks Indexd → storage URLs → DRS object → access methods → Fence signed URL for sampled (or explicit) GUIDs and exits non-zero on any failure, so it can gate a deployment step. Catches the two failure modes invisible to every other check: a record with no storage URL, and a record Fence refuses to sign — the production incident where the API key's user held create but not read-storage, so every registered object 401'd at the signed-URL step. Sampling is scoped by indexd_endpoint so a prod check can never sample staging registrations. README gains the 404/empty-urls/401/500 interpretation table.

324 tests pass.

Registration alone does not prove a file can be downloaded. Two failure
modes stay invisible until a user clicks the file in the portal: an
Indexd record with no storage URL, which can never download, and a
record Fence refuses to sign a URL for — in one prod incident the API
key's user held create but not read-storage on the record's authz
resource, so every signed-URL request returned 401 while everything
else looked healthy.

check-download walks the exact chain the portal hits (Indexd record ->
storage URLs -> DRS object -> access methods -> Fence signed URL) and
reports PASS/FAIL per object. It exits non-zero on any failure, so it
can gate deployment steps. The env selects the API key secret and the
key's JWT selects the commons, so no URL is passed and Gen3Auth is
constructed without an endpoint — avoiding the WTS fallback that
surfaces as a misleading 502. With no GUIDs given, the newest objects
are sampled from the indexd registry (latest revision per baseid,
scoped to the commons via indexd_endpoint).
@JoshuaHarris391
JoshuaHarris391 merged commit 03d9711 into main Aug 5, 2026
2 checks passed
@JoshuaHarris391
JoshuaHarris391 deleted the feat/check-download branch August 5, 2026 02:49
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.

1 participant