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

fix: Adding checks to prevent disallowed hosts from connecting via Elasticsearch plugin #15834

Merged
merged 2 commits into from
Aug 8, 2022

Conversation

mohanarpit
Copy link
Member

@mohanarpit mohanarpit commented Aug 8, 2022

Description

This PR fixes an issue where a potentially malicious user can connect to disallowed hosts from the Elasticsearch plugin within Appsmith. This is because Elasticsearch client SDK is a HTTP interface underneath the hood.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • Junits for the following:
    • create datasource with disallowed host
    • validate datasource with disallowed host
    • test datasource with disallowed host

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

@vercel
Copy link

vercel bot commented Aug 8, 2022

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

Name Status Preview Updated
appsmith ✅ Ready (Inspect) Visit Preview Aug 8, 2022 at 3:11PM (UTC)

@github-actions github-actions bot added the Bug Something isn't working label Aug 8, 2022
Copy link
Contributor

@sondermanish sondermanish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: Do we require test cases for validatingDatasource as well?

sondermanish
sondermanish previously approved these changes Aug 8, 2022
@mohanarpit mohanarpit added the Test Plan Approved Manual/Cypress tests covers changes made on the PR. Else, add skip-testPlan label if not applicable label Aug 8, 2022
@trishaanand
Copy link
Contributor

Approving this with a note that disallowed hosts should be at a common place instead of a per-plugin level. Request you to raise an issue for this so that this doesn't get missed. Thanks!

@mohanarpit mohanarpit merged commit c1dbca6 into release Aug 8, 2022
@mohanarpit mohanarpit deleted the chore/fix-elasticsearch-metadata branch August 8, 2022 15:37
sharat87 added a commit that referenced this pull request Aug 8, 2022
…asticsearch plugin (#15834)

## Description

This PR fixes an issue where a potentially malicious user can connect to disallowed hosts from the Elasticsearch plugin within Appsmith. This is because Elasticsearch client SDK is a HTTP interface underneath the hood.

## Type of change

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

## How Has This Been Tested?

- Junits for the following:
  - create datasource with disallowed host
  - validate datasource with disallowed host
  - test datasource with disallowed host

## Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my feature works
- [x] New and existing unit tests pass locally with my changes

(cherry picked from commit c1dbca6)
Signed-off-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
Vijetha-Kaja pushed a commit that referenced this pull request Dec 20, 2022
…asticsearch plugin (#15834)

This PR fixes an issue where a potentially malicious user can connect to disallowed hosts from the Elasticsearch plugin within Appsmith. This is because Elasticsearch client SDK is a HTTP interface underneath the hood.

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

- Junits for the following:
  - create datasource with disallowed host
  - validate datasource with disallowed host
  - test datasource with disallowed host

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my feature works
- [x] New and existing unit tests pass locally with my changes

(cherry picked from commit c1dbca6)
Signed-off-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Test Plan Approved Manual/Cypress tests covers changes made on the PR. Else, add skip-testPlan label if not applicable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants