Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

translateGoogleCloudURl modifies & breaks signed URLs #16

Open
neilpoulin opened this issue Apr 13, 2022 · 3 comments
Open

translateGoogleCloudURl modifies & breaks signed URLs #16

neilpoulin opened this issue Apr 13, 2022 · 3 comments
Assignees

Comments

@neilpoulin
Copy link
Contributor

neilpoulin commented Apr 13, 2022

we're using the igv.js package to render IGV plots in our app. Our data is secured in google cloud storage and is accessed by our app generating a signed URL for the files in each track. However, when the igv library fetches data from these files, the URLs are transformed from the original, signed url to a different url schema which breaks the signing, and thus we get an authentication error.

Looking through the code, it appears igv-utils transforms any URL it determines is a google URL into a different format (see translateGoogleCloudURl here):

// igv-util url schema
https://storage.googleapis.com/storage/v1/b/${bucket}/o/${object}${paramString}
// expected schema - should not be modified
https://storage.googleapis.com/my-private-bucket/some/file/path/bigwig/datafile.bigWig?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=some-credential-string&X-Goog-Date=20220413T031210Z&X-Goog-Expires=299&X-Goog-SignedHeaders=host&X-Goog-Signature=SOME_VALID_SIGNATURE_STRING

Is there a workaround to getting signed URLs working with the igv library?

@neilpoulin neilpoulin changed the title translateGoogleCloudURl modifies signed URLs translateGoogleCloudURl modifies & breaks signed URLs Apr 13, 2022
@jrobinso jrobinso self-assigned this Apr 14, 2022
@jrobinso
Copy link
Contributor

I'll have to investigate to determine why this is done, there's no workaround in the meantime. I'll try to get to this next week.

@neilpoulin
Copy link
Contributor Author

Thanks for getting back so quickly, Jim! As a workaround we are looking at using a custom domain for our signed urls. The goal is that using a custom url will cause the transformation to get skipped, since it wont match any of the isGoogleURL checks. I'll report back if it works or not.

Thanks again for a great library.

@jrobinso
Copy link
Contributor

jrobinso commented Apr 14, 2022 via email

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

No branches or pull requests

2 participants