question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature Request: IAM Authentication to RDS

See original GitHub issue

Currently, AWS RDS allows users to connect with IAM credentials, so that you can centrally manage permissions. However, this occurs using temporary tokens which only last 15 min.

I have not found a single GUI app which can support IAM tokens, so this could also be a big value add for RDS.

Here’s an example bash script which I use to open a database connection using the mysql terminal tool:

#!/bin/bash

username="HERE"
hostname="INSTANCE-NAME.INSTANCE-ID.us-east-2.rds.amazonaws.com"
port="3306"
rootCerts="https://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem"
rootCertLocalPath="/tmp/rdscerts.pem"

echo "Getting token";
token=$(aws rds generate-db-auth-token  --hostname $hostname --port $port --region us-east-2  --username $username)


if [ ! -f "$rootCertLocalPath" ]; then
    echo "Getting certs"
    curl "$rootCerts" > "$rootCertLocalPath"
fi

echo "Connecting with token..."

mysql --host="$hostname" --port="$port" --ssl-ca="$rootCertLocalPath" --enable-cleartext-plugin --user="$username" --password="$token"

This, of course, uses the two pieces of an IAM credential behind the scenes: key id and secret key.

It would be amazing if this functionality would be implemented directly into dbeaver, ether reading the aws keys from env vars (as most tools do), or even allow them to be specified. This would allow me to push our company to use more secure DB extensions, and also to use dbeaver!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:55
  • Comments:23 (5 by maintainers)

github_iconTop GitHub Comments

15reactions
gjunqueiracommented, Nov 12, 2019

The proposed feature would be a great addition to DBeaver!

We are enforcing our security policies in our startup and the developers are very found of DBeaver, but it will mandatory for us to use RDS IAM authentication, so I won’t have to ditch DBeaver if this comes in effect.

Please, please, please implement this! 😃

5reactions
alexpetraliacommented, May 22, 2020

Thanks for adding this feature! Quick question - does this permit only the [default] profile in ~/.aws/credentials? Is there any possibility to specify local/dev/prod profiles? Thanks Serge.

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

IAM database authentication for MariaDB, MySQL, and ...
An authentication token is a unique string of characters that Amazon RDS generates on request. Authentication tokens are generated using AWS Signature ...
Read more >
IAM Database Authentication for RDS - Trend Micro
An authentication token is a unique string of characters with a lifetime of 15 minutes that AWS RDS generates on your request. IAM...
Read more >
feature request: RDS IAM Authentication · Issue #6480
We need this feature to be implemented, in order to enable the token based authentication mechanism against an RDS. ‍ Implementation....
Read more >
Secure database authentication using AWS IAM - SkildOps
A thorough guide on using temporary and short-lived credentials generated using IAM database authentication feature to avoid exposing ...
Read more >
How to perform AWS IAM database authentication - nClouds
You should create an individual IAM user for each person in your organization who manages Amazon RDS resources. An IAM user can sign...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found