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

rasterio driver - authentication #46

Open
fabricebrito opened this issue May 14, 2020 · 1 comment
Open

rasterio driver - authentication #46

fabricebrito opened this issue May 14, 2020 · 1 comment
Labels
discussion enhancement New feature or request

Comments

@fabricebrito
Copy link

I really like intake-stac and together with xpublish it becomes a very powerful solution :-)

  1. Open Assets

The example shown in the notebook using Landsat data @aws is great. The assets are freely available and thus rasterio simply accesses those resources using the href

  1. Assets requiring authentication

I've got a use-case where the assets require a simple authentication mechanism. With such cases, I usually update the href for rasterio with:

def get_vsi_url(enclosure, username, api_key):
    
   
    parsed_url = urlparse(enclosure)

    url = '/vsicurl/%s://%s:%s@%s/api%s' % (list(parsed_url)[0],
                                            username, 
                                            api_key, 
                                            list(parsed_url)[1],
                                            list(parsed_url)[2])
    
    return url 

Would such an approach be possible with intake-stac ?

@jhamman
Copy link
Collaborator

jhamman commented May 14, 2020

We should definitely be able to make this happen. How would you access one of these assets using rasterio directly. The call stack in intake-stac goes like this: intake-stac -> intake-xarray -> xarray -> rasterio. We'll just need to make sure we can pass the required authentication parameters all the way through that stack.

@scottyhq scottyhq added discussion enhancement New feature or request labels Oct 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants