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

ssl authentication error #2311

Closed
joonyeonglim opened this issue Feb 7, 2023 · 1 comment
Closed

ssl authentication error #2311

joonyeonglim opened this issue Feb 7, 2023 · 1 comment
Assignees
Labels
type: bug Indicates an unexpected problem or unintended behavior
Milestone

Comments

@joonyeonglim
Copy link

Describe the bug
ssl authentication error

To Reproduce
Steps to reproduce the behavior:

docker-compose.yml

... 
      environment:
      - ARGILLA_ELASTICSEARCH_CA_PATH=/ssl/server.crt
      - ARGILLA_ELASTICSEARCH=https://elasticsearch:9200/
      - ARGILLA_ELASTICSEARCH_SSL_VERIFY=True
...      

Screenshots
image

Environment (please complete the following information):

  • OS [e.g. iOS]: linux
  • Browser [e.g. chrome, safari]: chrome
  • Argilla Version [e.g. 1.0.0]: 1.2.1
  • ElasticSearch Version [e.g. 7.10.2]: 7.7.0
  • Docker Image (optional) [e.g. argilla:v1.0.0]: argilla:v1.2.1

Additional context

Current Workaround
->
modify "argilla/server/daos/backend/client_adapters/factory.py" file

factory.py

from argilla.server.settings import settings

  def _fetch_cluster_version_info(cls, hosts: str) -> Tuple[str, str]:
      try:
          if settings.elasticsearch_ssl_verify:
              response = httpx.get(hosts, verify=settings.elasticsearch_ca_path)
          else:
              response = httpx.get(hosts)
              
          data = response.json()

          version_info = data["version"]
          version: str = version_info["number"]
          distribution: str = version_info.get("distribution", "elasticsearch")

          return version, distribution
      except Exception as error:
          raise GenericSearchError(error)
@joonyeonglim joonyeonglim added the type: bug Indicates an unexpected problem or unintended behavior label Feb 7, 2023
@davidberenstein1957
Copy link
Member

@Joonyeong97 thanks for reporting this 🦾

@frascuchon frascuchon modified the milestones: v1.5.0, v1.6.0 Mar 20, 2023
@frascuchon frascuchon self-assigned this Mar 21, 2023
frascuchon added a commit that referenced this issue Mar 24, 2023
# Description

The backend version check request is not using the backend configuration
setup from Argilla, so in some security environments, this check may
fail.

Instead of using a standard http request, on this PR we use a widely
compatible `OpenSearch` client to request the version info.

Closes #2311 

**Type of change**

(Please delete options that are not relevant. Remember to title the PR
according to the type of change)

- [x] Bug fix (non-breaking change which fixes an issue)

**How Has This Been Tested**

Manual test in a secured environment

**Checklist**

- [x] I have merged the original branch into my forked branch
- [ ] I added relevant documentation
- [x] follows the style guidelines of this project
- [x] I did a self-review of my code
- [ ] I made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
frascuchon added a commit that referenced this issue Mar 24, 2023
The backend version check request is not using the backend configuration
setup from Argilla, so in some security environments, this check may
fail.

Instead of using a standard http request, on this PR we use a widely
compatible `OpenSearch` client to request the version info.

Closes #2311

**Type of change**

(Please delete options that are not relevant. Remember to title the PR
according to the type of change)

- [x] Bug fix (non-breaking change which fixes an issue)

**How Has This Been Tested**

Manual test in a secured environment

**Checklist**

- [x] I have merged the original branch into my forked branch
- [ ] I added relevant documentation
- [x] follows the style guidelines of this project
- [x] I did a self-review of my code
- [ ] I made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
frascuchon added a commit that referenced this issue Mar 26, 2023
The backend version check request is not using the backend configuration
setup from Argilla, so in some security environments, this check may
fail.

Instead of using a standard http request, on this PR we use a widely
compatible `OpenSearch` client to request the version info.

Closes #2311

**Type of change**

(Please delete options that are not relevant. Remember to title the PR
according to the type of change)

- [x] Bug fix (non-breaking change which fixes an issue)

**How Has This Been Tested**

Manual test in a secured environment

**Checklist**

- [x] I have merged the original branch into my forked branch
- [ ] I added relevant documentation
- [x] follows the style guidelines of this project
- [x] I did a self-review of my code
- [ ] I made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
frascuchon added a commit that referenced this issue Mar 27, 2023
The backend version check request is not using the backend configuration
setup from Argilla, so in some security environments, this check may
fail.

Instead of using a standard http request, on this PR we use a widely
compatible `OpenSearch` client to request the version info.

Closes #2311

**Type of change**

(Please delete options that are not relevant. Remember to title the PR
according to the type of change)

- [x] Bug fix (non-breaking change which fixes an issue)

**How Has This Been Tested**

Manual test in a secured environment

**Checklist**

- [x] I have merged the original branch into my forked branch
- [ ] I added relevant documentation
- [x] follows the style guidelines of this project
- [x] I did a self-review of my code
- [ ] I made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
@frascuchon frascuchon modified the milestones: v1.6.0, v1.5.0 Apr 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

3 participants