aws / aws/amazon-redshift-python-driver

RS Connector requiring a valid aws identity to connect to Redshift, when that shouldn't be required

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

Beschreibung

## Driver version
2.0.0

## Redshift version
PostgreSQL 8.0.2 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.4.2 20041017 (Red Hat 3.4.2-6.fc3), Redshift 1.0.76832

## Client Operating System
macos ventura 13.6 (22G120)

## Python version
Python 3.12.4

## Table schema
n/a

## Problem description
redshift_connector is trying to grab a valid aws identity when just doing a simple connect to Redshift. This is causing issues for us as we have users that do not have a valid aws identity, that need to connect to Redshift. Importantly, they are able to connect to Redshift using various SQL clients, the same behavior should be expected with Redshift connector.

## Python Driver trace logs
would prefer to not post this

## Reproduction code
def get_redshift_connection_robotic():
try:
conn = redshift_connector.connect(
iam=True,
ssl=True,
host='',
port=5439,
database='',
cluster_identifier='',
region='us-east-1',
partner_sp_id='',
idp_host='',
credentials_provider='PingCredentialsProvider',
user='',
password=''
)
conn.autocommit = True
cursor = conn.cursor()
cursor.execute('SELECT 1;')
print(cursor.fetchall())
except Exception as error:
logging.error("Error connecting to Redshift:", exc_info=True)

if __name__ == "__main__":
get_redshift_connection_robotic()

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne mit der Reproduktion von get_redshift_connection_robotic und verfolge den IAM- und PingCredentialsProvider-Verbindungspfad. Vergleiche die Identitätsanforderung des Connectors mit dem gemeldeten SQL-client-Verhalten; als abgeschlossen gilt die Aufgabe, wenn ein Benutzer ohne eine gültige AWS-Identität mit der gezeigten Konfiguration eine Verbindung zu Redshift herstellen kann und SELECT 1 erfolgreich ausgeführt wird.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
aws, python
Bereich
databases
Issue-Typ
Bug
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.