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

Using RDS token returns connection refused #2

Open
KikeMendez opened this issue Mar 15, 2020 · 5 comments
Open

Using RDS token returns connection refused #2

KikeMendez opened this issue Mar 15, 2020 · 5 comments

Comments

@KikeMendez
Copy link

Hi, I'm having issues connecting to and RDS using token authentication

The error reported by the server was: SQLSTATE[HY000] [1045] Access denied for user 'iam_user'@'xx.xxxx.xx.xxx' (using password: YES)

So far my investigation down to:

  • Connect by using user and password (no the generated RDS token ) - works
  • Connect by using user and RDS token - does not works
  • Run a test using php mysqli instead PDO with (user and RDS token) - works

Example of token generated:
myDatabase-dev-cluster.cluster-cwujoxa2wlgn.us-east-1.rds.amazonaws.com:3306/?Action=connect&DBUser=iam_user&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKLIOLRyTos5FYBGXRKLA%2F20200314%2Fus-east-1%2Frds-db%2Faws4_request&X-Amz-Date=20200314T031933Z&X-Amz-SignedHeaders=host&X-Amz-Expires=900&X-Amz-Signature=a7373b21f52361addef02848382yg1232c538c730f1273d35fe84af947a12d2

I am wondering if a PDO issue and if is possible to use RDS Token with datatable somehow

@DataTables
Copy link
Collaborator

Our libraries don't support mysqli unfortunately - they use PDO only. Do you have PHP MySQL PDO drivers installed on your server? You can check using phpinfo().

@KikeMendez
Copy link
Author

Hi, thanks for replying, yes I got PDO enabled,
and DataTables works fines if I use user and password, Like: user: John, pass: mypass

It doesn't work when I use the token generated as password.

The mysqli was a separated test just to confirm if the token was working.

That's why I am wondering is is a PDO issue, maybe doesn't like myDatabase-dev-cluster.cluster-cwujoxa2wlgn.us-east-1.rds.amazonaws.com:3306/? that contains a forward slash in the token ??

@DataTables
Copy link
Collaborator

Are you able to use PDO to connect to your database without the Editor libraries? If not, then you'ld probably be nest asking on bugs.php.net or StackOverflow.

@KikeMendez
Copy link
Author

Yeah I got the same thing by connecting to PDO out of datatable editor.
I've been searching about this for the last two days but I couldn't find anything that guide me to find out what the issue is.
I couldn't find anything related to this in stackoverflow
Do you know if there's any PDO group or slack channel where I can jump in and ask?

@DataTables
Copy link
Collaborator

Sorry - bugs.php.net or StackOverflow as I mentioned are my best suggestions.

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

No branches or pull requests

1 participant