Skip to content

Commit

Permalink
removed auth
Browse files Browse the repository at this point in the history
  • Loading branch information
gecBurton committed Oct 22, 2024
1 parent 4c46b18 commit ee9b83a
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions redbox-core/redbox/models/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from pydantic import BaseModel
from pydantic_settings import BaseSettings, SettingsConfigDict
from opensearchpy import OpenSearch, RequestsHttpConnection
from requests_aws4auth import AWS4Auth
from redbox.models.chain import ChatLLMBackend


Expand Down Expand Up @@ -143,17 +142,17 @@ def elasticsearch_client(self) -> Elasticsearch:
)

elif isinstance(self.elastic, OpenSearchSettings):
credentials = boto3.Session().get_credentials()
auth = AWS4Auth(
credentials.access_key,
credentials.secret_key,
self.aws_region,
"aoss",
session_token=credentials.token,
)
# credentials = boto3.Session().get_credentials()
# auth = AWS4Auth(
# credentials.access_key,
# credentials.secret_key,
# self.aws_region,
# "aoss",
# session_token=credentials.token,
# )
client = OpenSearch(
hosts=[{"host": self.collection_enpdoint, "port": 443}],
http_auth=auth,
# http_auth=auth,
use_ssl=True,
verify_certs=True,
connection_class=RequestsHttpConnection,
Expand Down

0 comments on commit ee9b83a

Please sign in to comment.