Establishing openeo connection in restrictive network environment

Hello,

I recently heard about openeo and wanted to test it out for accessing cloud-based satellite data. In the past I have used other options (e.g., stackstac) but wanted to try this one.

One complication is that I work on a government network. With stackstac, I was able to access imagery and by running my compute within a rasterio environment that allowed unsafe SSLs:

  with rasterio.Env(GDAL_HTTP_UNSAFESSL = 'YES') as env:
      data = aoi.compute()

In other cases (e.g., leafmap), there are function parameters I can apply to avoid SSL issues:

satellite = leafmap.download_file(url1, "landsat7.tif", verify = False)

With openeo I run into issues right away in the basic Python tutorial:

connection = openeo.connect("https://earthengine.openeo.org")

This gives me an SSLCertVerificationError. Accessing cloud imagery with stackstac/leafmap had previously given the same errors before my workarounds. However, I have not yet found a workaround for connecting with openeo. Running this line within a rasterio env like stackstac did not help and I did not find any parameters that helped in the openeo.connect API.

If anyone has any tips for me, thanks!

in openeo.connect() you can provide a custom session, which allows you to override some defaults.
Something like this might work for you (I haven’t tried it myself):

import requests

session = requests.Session()
session.verify = False
connection = openeo.connect("...", session=session)
1 Like

That worked for me, thanks!