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

ODBC SSL Compliance Fix #653

Merged

Conversation

forestmvey
Copy link
Collaborator

Description

Fixed ODBC Driver Issues:

  • Driver ignores the UseSSL flag
  • SQL plugin query fails if opensearch instance has SSL enabled, and host url doesn't use https:// prefix
  • UI allows for mismatch between UseSSL flag, and specified protocol in host url
  • Driver defaults to OpenDistro sql endpoint in event of error with SQL plugin query

Issues Resolved

Issue: 280

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

forestmvey and others added 11 commits June 8, 2022 16:25
…oint bug when using SSL without protocol specified in url

Signed-off-by: forestmvey <[email protected]>
… url and/or incompatible with server url

Signed-off-by: forestmvey <[email protected]>
…ut server url generation into own function. Minor logic revisions.

Signed-off-by: forestmvey <[email protected]>
…ausing an unusable UI state for windows users.

Signed-off-by: forestmvey <[email protected]>
…failure to establish connection with url

Signed-off-by: forestmvey <[email protected]>
…g valid server URL's with string_view usage.

Signed-off-by: forestmvey <[email protected]>
@forestmvey forestmvey requested a review from a team as a code owner June 22, 2022 22:51
@codecov-commenter
Copy link

codecov-commenter commented Jun 22, 2022

Codecov Report

Merging #653 (61e9a7b) into main (26058b8) will increase coverage by 0.06%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##               main     opensearch-project/sql#653      +/-   ##
============================================
+ Coverage     94.57%   94.63%   +0.06%     
- Complexity     2743     2777      +34     
============================================
  Files           278      279       +1     
  Lines          7430     7517      +87     
  Branches        554      556       +2     
============================================
+ Hits           7027     7114      +87     
  Misses          349      349              
  Partials         54       54              
Flag Coverage Δ
query-workbench 62.76% <ø> (ø)
sql-engine 97.69% <ø> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...c/main/java/org/opensearch/sql/expression/DSL.java 100.00% <0.00%> (ø)
...rg/opensearch/sql/analysis/ExpressionAnalyzer.java 100.00% <0.00%> (ø)
...pensearch/sql/ppl/parser/AstExpressionBuilder.java 100.00% <0.00%> (ø)
...pensearch/sql/sql/parser/AstExpressionBuilder.java 100.00% <0.00%> (ø)
...ensearch/sql/expression/ExpressionNodeVisitor.java 100.00% <0.00%> (ø)
...h/sql/expression/function/BuiltinFunctionName.java 100.00% <0.00%> (ø)
...h/sql/expression/function/OpenSearchFunctions.java 100.00% <0.00%> (ø)
...arch/storage/script/filter/FilterQueryBuilder.java 100.00% <0.00%> (ø)
...ilter/lucene/relevance/SimpleQueryStringQuery.java 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 26058b8...61e9a7b. Read the comment docs.

@@ -120,7 +120,7 @@ extern "C" {
#define DEFAULT_BOOLSASCHAR 0
#define DEFAULT_UNIQUEINDEX 1 /* dont recognize */
#define DEFAULT_LOGLEVEL OPENSEARCH_WARNING
#define DEFAULT_USE_SSL 0
#define DEFAULT_USE_SSL 1
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there any doc should be change accordingly?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I could not find any reference to a default value for the use of SSL. We will make a ticket to update this page with at least a reference to download the driver.
https://opensearch.org/docs/latest/search-plugins/sql/odbc/

Copy link
Collaborator

Choose a reason for hiding this comment

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

And also to note the defaults for the ODBC driver.

Copy link
Collaborator

@penghuo penghuo left a comment

Choose a reason for hiding this comment

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

Thanks for the change!

@forestmvey
Copy link
Collaborator Author

Demo video for this fix: Issue-280

@joshuali925 joshuali925 merged commit 8523ad8 into opensearch-project:main Jun 27, 2022
@MaxKsyunz MaxKsyunz deleted the integ-odbc_ssl_compliance_fix branch April 27, 2023 05:43
andy-k-improving pushed a commit to Bit-Quill/opensearch-project-sql that referenced this pull request Nov 16, 2024
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.

5 participants