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

Make driver throw SQLSTATE 28000 for invalid username or password #102

Merged
merged 2 commits into from
Jun 29, 2023

Conversation

GumpacG
Copy link
Collaborator

@GumpacG GumpacG commented Jun 29, 2023

Description

This change throws SQLSTATE 28000 for invalid username or password which is required by Tableau. This only covers 401 responses, responses like 403 from SIGV4 returns a different message.

Before:
Screenshot 2023-06-15 at 11 20 50 AM

After:
Screenshot 2023-06-21 at 3 30 51 PM

Issues Resolved

#95

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • 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.

* Made driver throw SQLSTATE 28000 for invalid username or password

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>

* Made SQLSTATE string a constant and added a separate catch block for HTTPException

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>

* Changed constant name to follow naming convention

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>

* Added 08001 SQLSTATE to catch connection errors

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>

* Reverted 08001 change

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>

---------

Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>
@GumpacG GumpacG force-pushed the integ-auth-sqlstate branch from 1369d12 to 1d1c491 Compare June 29, 2023 21:43
Signed-off-by: Guian Gumpac <guian.gumpac@improving.com>
@GumpacG GumpacG merged commit a8d14dc into opensearch-project:main Jun 29, 2023
@GumpacG GumpacG deleted the integ-auth-sqlstate branch July 10, 2023 22:55
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.

4 participants