aws / aws/amazon-redshift-python-driver

Support inline role_arn for IAM Role authentication

Offen
#225 3 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
enhancement
Vorherrschende Sprache
Python
Sterne
220
Forks
86
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

See this issue for context : https://github.com/dbt-labs/dbt-redshift/issues/842

The connector need to be able to support IAM Role via inline parameters in addition to via an AWS profile, the same way it does for IAM Users.

If I open a connection with `role_arn`, `source_access_key_id`, and `source_secret_access_key`, currently it ignores `role_arn` and uses the access key to open an IAM user connection.
What I need instead is to leverage the access key to assume the role - see [boto3 credentials](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html#assume-role-provider), we're in the [assume role provider chapter](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html#assume-role-provider), particularly:
> If MFA authentication is not enabled then you only need to specify a role_arn and a source_profile.

What I need is to pass all the parameters inline, not a `source_profile`.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Lies zunächst die Behandlung von Inline-IAM-Anmeldedaten und die Auswahl des AWS-Profils durch den Connector und vergleiche dann das gewünschte Verhalten mit der verlinkten boto3 assume-role provider-Dokumentation und dem dbt-redshift-Kontext-Issue. Erledigt ist es, wenn role_arn zusammen mit source_access_key_id und source_secret_access_key berücksichtigt wird, um die Rolle zu übernehmen, statt eine Verbindung als IAM-Benutzer zu öffnen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
aws, python
Bereich
authentication, cloud, database
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.