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

Cannot query non-SSL catalogs #88

Closed
jisantuc opened this issue Aug 11, 2021 · 6 comments
Closed

Cannot query non-SSL catalogs #88

jisantuc opened this issue Aug 11, 2021 · 6 comments

Comments

@jisantuc
Copy link

The default Client.open method uses a StacIO implementation based on requests, which by default gets real mad about servers without SSL. This makes it difficult to use tools that depend on pystac-client's Client.open in CI, e.g. stac-utils/stac-api-validator#34

There's a workaround here, which is calling from_file directly, but it might be easier if open just took an optional StacIO as well and forwarded it to its own call to from_file

@gadomski
Copy link
Member

Looking at stac-utils/stac-api-validator#34, isn't this an issue with franklin's SSL configuration? I'm not sure passing through a custom StacIO is necessarily the answer, as there's some useful work performed by pystac_client.stac_api_io.StacApiIO that would take some effort to recreate without requests.

I tried to stand up a local franklin instance w/ the latest examples in the stac-spec and got some ingestion errors. If there were a publicly-available franklin instance that I could use to reproduce the error that would be helpful; I'd like to explore the motivating issue to learn more about this use case.

@jisantuc
Copy link
Author

Franklin itself doesn't have an SSL configuration -- that's on the end user. I opened the previous issue to validate a local Franklin running via a docker-compose file.

there's some useful work performed by pystac_client.stac_api_io.StacApiIO

that's fine -- the custom StacIO could inherit from StacApiIO and override the request method or something.

If there were a publicly-available franklin instance that I could use to reproduce the error that would be helpful

The issue doesn't exist on deployed services with SSL. It only exists on non-SSL instances. You can import a small catalog like this https://github.com/jisantuc/purescript-stac/blob/main/.github/workflows/ci.yml#L21-L28 (your compose file might be different or you can just borrow the compose file from purescript-stac)

@gadomski
Copy link
Member

It only exists on non-SSL instances.

But it looks like you're making an https request in the example posted?

@jisantuc
Copy link
Author

It uh turns out I input the command incorrectly and left an s in my url after trying against a deployed Franklin. I correctly put the url in without an s, and everything is actually fine.

I got confused because requests used to require an arg for insecure requests. thanks for your patience / 👋🏻

@jisantuc
Copy link
Author

(verified with python stac_api_validator/validate.py --root http://localhost:9090)

@gadomski
Copy link
Member

No problem! Glad it's an easy fix! :-D

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