-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Problems connecting to AWS RDS Instance using new IAM Authentication Feature #1715
Comments
Hi @brucemack it is not currently supported. We could possibly build in support for the auth protocol that the instance is requesting, but I don't know it off hand. Probably (1) someone can make a PR with the implementation or (2) perhaps direct me to the wire-level documentation for how to implement it and ideally provide a server to test against and I can try to implement. |
Hi Doug, thanks for the quick reply. I just wanted to make sure I wasn't missing something obvious. Let me learn more about the protocol in question and I'll get back with some more information and/or a PR. Thanks! |
I'm going to close this as a duplicate of #1396 to consolidate these issues. |
For anyone else who lands here, Switching to mysql2 and applying @angiolep's fix in sidorares/node-mysql2#438 (comment) worked for me. |
I believe there are two issues here, which I have fixed. The first is that the mysqljs driver reads - but does nothing with - the extended server capabilities that get sent to the client after the first connection (HandshakeInitializationPacket's serverCapabilities2). This means the client never returns the CLIENT_PLUGIN_AUTH capability to the server, which means mysql_clear_password is never requested which breaks the PAM/IAM pluggable auth. The second is that the AuthSwitchRequestPacket doesn't handle the requirement for a mysql_clear_password type of authentication. My fix was to:
Unfortunately, the organisation I work for does not allow me to contribute to GitHub, so I will try and produce a clean-room implementation today, |
@davewthompson , the fix 1 of CLIENT_PLUGIN_AUTH is been down on #1776 , and I can implement a mysql_clear_password on it. But @dougwilson , if possible, we can add a |
For me it worked after specifying |
Has anyone been able to connect successfully to an AWS RDS instance using the new IAM authentication feature? I am able to generate the ephemeral authentication token with no problem, but when I pass it as a password when connecting to database I get this error:
I am using version 2.13 of the driver.
AWS Documentation:
Thanks
The text was updated successfully, but these errors were encountered: