aws / amazon-redshift-jdbc-driver

Redshift JDBC Driver. It supports JDBC 4.2 specification.
Apache License 2.0
63 stars 31 forks source link

Allow assuming chained roles for IAM-based authentication #122

Open heroldus opened 3 months ago

heroldus commented 3 months ago

Description

The change introduces a new plugin called AssumeChainedRolesCredentialsProvider to allow to assume another AWS IAM role or a chain of roles to login into Redshift via IAM-based auth. This is important to enabled IAM-based auth in multi-account setups.

Motivation and Context

The change solves the problem that you currently can't use IAM-based authentication to login from e.g. an EC2 instance into a Redshift cluster in another AWS account.

Testing

Use an EC2 instance with instance profile and AWS IAM role assigned. This IAM role A can assume another IAM role B in another AWS account via STS and a trust policy. The IAM role B has the permission to login into a Redshift cluster in this account. With the new plugin the EC2 instance can connect to the Redshift cluster via IAM-based auth.

Screenshots (if appropriate)

Types of changes

Checklist

License