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

Add AWS auth for OpenSearchDB http_auth initialization #2376

Conversation

mauricioalarcon
Copy link
Contributor

@mauricioalarcon mauricioalarcon commented Mar 13, 2025

This commit introduces a new test validating the initialization of OpenSearchDB with AWSV4SignerAuth for HTTP authentication. Additionally, it updates the poetry.lock file to reflect dependencies changes with Poetry 2.1.1.

Related to #2375

Description

The current OpenSearch configuration requires username and password for authentication, which is not compliant with security policies in many enterprises that enforce AWS IAM-based authentication (e.g., AWS SigV4 via SAML or IAM roles).

This feature request proposes adding support for AWS authentication methods such as AWSV4SignerAuth or AWS4Auth, which are already supported by the opensearch-py library. This would enable seamless authentication via AWS IAM roles, improving security, compliance, and ease of integration with AWS-hosted OpenSearch domains.

Fixes # issue

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (does not change functionality, e.g. code style improvements, linting)
  • Documentation update

How Has This Been Tested?

Augmented the current test to also exercise the new http_auth arg

  • Unit Test
  • Test Script (please provide)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

Maintainer Checklist

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Made sure Checks passed

This commit introduces a new test validating the initialization of `OpenSearchDB` with `AWSV4SignerAuth` for HTTP authentication. Additionally, it updates the `poetry.lock` file to reflect dependencies changes with Poetry 2.1.1.

Related to mem0ai#2375
Copy link

vercel bot commented Mar 13, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
multimodal-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 13, 2025 6:31pm

@CLAassistant
Copy link

CLAassistant commented Mar 13, 2025

CLA assistant check
All committers have signed the CLA.

@mauricioalarcon mauricioalarcon changed the title Add test for OpenSearchDB http_auth initialization Add AWS auth for OpenSearchDB http_auth initialization Mar 13, 2025
@mauricioalarcon
Copy link
Contributor Author

Closing this in favor of 2399 -- that one contains these changes and the fix for an opensearch mapping.

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

Successfully merging this pull request may close these issues.

2 participants