Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

- Updated the pip_docker example to use stac-fastapi.elasticsearch 2.1.0 and the elasticsearch 8.11.0 docker image. [#216](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/216)
- Updated the Data Loader CLI tool to accept a base_url, a data directory, a custom collection id, and an option to use bulk insert. [#218](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/218)
- Changed the default `ca_certs` value to use `certifi.where()` to find the installed certificate authority. [#222](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/222)

### Fixed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import ssl
from typing import Any, Dict, Set

import certifi

from elasticsearch import AsyncElasticsearch, Elasticsearch # type: ignore
from stac_fastapi.types.config import ApiSettings

Expand Down Expand Up @@ -31,9 +33,7 @@ def _es_config() -> Dict[str, Any]:

# Include CA Certificates if verifying certs
if config["verify_certs"]:
config["ca_certs"] = os.getenv(
"CURL_CA_BUNDLE", "/etc/ssl/certs/ca-certificates.crt"
)
config["ca_certs"] = os.getenv("CURL_CA_BUNDLE", certifi.where())

# Handle authentication
if (u := os.getenv("ES_USER")) and (p := os.getenv("ES_PASS")):
Expand Down
5 changes: 2 additions & 3 deletions stac_fastapi/opensearch/stac_fastapi/opensearch/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import ssl
from typing import Any, Dict, Set

import certifi
from opensearchpy import AsyncOpenSearch, OpenSearch

from stac_fastapi.types.config import ApiSettings
Expand Down Expand Up @@ -32,9 +33,7 @@ def _es_config() -> Dict[str, Any]:

# Include CA Certificates if verifying certs
if config["verify_certs"]:
config["ca_certs"] = os.getenv(
"CURL_CA_BUNDLE", "/etc/ssl/certs/ca-certificates.crt"
)
config["ca_certs"] = os.getenv("CURL_CA_BUNDLE", certifi.where())

# Handle authentication
if (u := os.getenv("ES_USER")) and (p := os.getenv("ES_PASS")):
Expand Down