aws / amazon-documentdb-jdbc-driver

Amazon DocumentDB JDBC driver to connect from BI tools and execute SQL Queries
Apache License 2.0
14 stars 14 forks source link

[BUG] Tableau connector does not URI encode username and password - special characters in valid password result in error #365

Open JesseKirschner opened 2 years ago

JesseKirschner commented 2 years ago

Environment


Problem Description

  1. Steps to reproduce: (within ec2 instance in VPC!!) Download jdbc and taco. Place files in designated folders. Open up tableau. Fill in wizard. Try to connect.

  2. Expected behaviour: A successful connection with documentDB

  3. Actual behaviour: No successful connection with documentDB

  4. Error message/stack trace: Invalid username or password. Error Code: 28911C50 Invalid username or password or user is not authorized on database 'paydayService'. Please check your settings. Authorization failed for user 'masterUser' on database 'admin' with mechanism 'SCRAM-SHA-1'. Please check username, password, database and authorization for the user. Invalid username or password. Connector Class: documentdbjdbc, Version: 1.14.0.0

  5. Any other details that can be helpful: Tried to connect by using studio 3T. Was successful.


Screenshots


JDBC log

JesseKirschner commented 2 years ago

Solution was removing special characters in the password.

birschick-bq commented 2 years ago

Hi @JesseKirschner

Thanks for reporting this issue.

Just for clarity, can you give an example of a character that is problematic?

JesseKirschner commented 2 years ago

Hi @birschick-bq,

I'm not quite sure which character created the problem, but I can list all special characters that were part of the password:

;.):`>;~}

birschick-bq commented 2 years ago

@JesseKirschner Normally, we expect the connection string to have the user and password encoded before we get the connection string.

But in the case of using Tableau, it is reasonable for the user to expect that the connector will encode the user name and password from the raw format entered in the connection dialog.

We will investigate a solution to encode the special characters in the Tableau connector (TACO) so that users don't have to encode the user name and password on the connection dialog.

dani171217 commented 4 months ago

Hello,

I am experiencing the same error when connecting to Document DB. However, due to security policies in the organization, I cannot exclude special characters.

Is there any other solution you can recommend? Have you managed to identify the special characters that affect the connection?

I appreciate your help in advance.

Greetings.