sslmode does not support allow, prefer, require, disable
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 42/100
Rechercherichtung
Lokalisieren Sie die Validierung von sslmode und den Verbindungsaufbau in redshift_connector, vergleichen Sie anschließend das aktuelle Verhalten mit der PostgreSQL-Dokumentation zu sslmode und der Verhaltenstabelle in diesem Issue. Fügen Sie Abdeckung für die sechs aufgeführten Werte hinzu und verifizieren Sie, dass jeder Modus das dokumentierte Verbindungsverhalten erzeugt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Driver version
2.0.910
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.49780
Client Operating System
macos monterey 12.6.2
Python version
3.11
Table schema
Does not apply
Problem description
-
Expected behaviour:
In postgreSQL, these 5 parameters are allowed values for sslmode. However, redshift_connector only allows for verify-ca, and verify-full for this parameter. Redshift_connector also has ssl as a parameter. -
Actual behaviour:
There are a few problems with this difference between postgreSQL and redshift_connector:
a. To disable ssl, users using redshift_connector has to set ssl = False. Simply setting sslmode = disable will not set ssl to false. Since disable is not a recognizable value of sslmode in redshift_connector, redshift_connector will use the default of 'verify-ca' to make the connection.
b. According to the PostgreSQL doc, the accepted values of sslmode behave as below:
disable
only try a non-SSL connection
allow
first try a non-SSL connection; if that fails, try an SSL connection
prefer (default)
first try an SSL connection; if that fails, try a non-SSL connection
require
only try an SSL connection. If a root CA file is present, verify the certificate in the same way as if verify-ca was specified
verify-ca
only try an SSL connection, and verify that the server certificate is issued by a trusted certificate authority (CA)
verify-full
only try an SSL connection, verify that the server certificate is issued by a trusted CA and that the requested server host name matches that in the certificate
Redshift_connector should also increase the values accepted by sslmode to align with PostgreSQL docs
After some investigation, here is a detailed table on the behavior of sslmode of redshift_connector and psycopg2:
| sslmode | behavior in redshift connector (ssl, sslmode) | behavior in psycopg2 connector (sslmode) |
|---|---|---|
| disable | ssl=defaulted to true, sslmode=verify-ca (sslmode of disable is not recognized by redshift_connector, therefore falling back to default of verify-ca) | sslmode=disable |
| allow | ssl=defaulted to true, sslmode=verify-ca | first try with sslmode=disable, if fails, try with sslmode=verify-ca |
| prefer | ssl=defaulted to true, sslmode=verify-ca | first try with sslmode=verify-ca, if fails, try with sslmode=disable |
| require | ssl=defaulted to true, sslmode=verify-ca | ssl=true, sslmode=verify-ca |
| verify-ca | ssl=defaulted to true, sslmode=verify-ca | ssl=true, sslmode=verify-ca |
| verify-full | ssl=defaulted to true, sslmode=verify-full | ssl=true, sslmode=verify-full |
- Vorherrschende Sprache
- Python
- Sterne
- 220
- Forks
- 86
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus aws/amazon-redshift-python-driver
-
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 74/100
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 30/100
aws/amazon-redshift-python-driver#268 · 2 Reaktionen ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
aws/amazon-redshift-python-driver#265 · 1 Kommentar · 4 Reaktionen ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 45/100
Alle Issues in aws/amazon-redshift-python-driver
Ähnliche Issues
-
good first issue
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
vllm-project/vllm-metal#822 ·
Maintainer antworten meist innerhalb von 1 Tag
-
vector-store
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 90/100
mem0ai/mem0#7461 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
[Bug]: chunk_span_bounds and _validated_chunk_spans reject Pydantic models ChunkSpan and AudioFileOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
BasedHardware/omi#19047 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
Maintainer antworten meist innerhalb von 1 Tag