-
Notifications
You must be signed in to change notification settings - Fork 81
Description
Driver version
2.0.882
Redshift version
Not a Redshift problem
Client Operating System
MacOS Big Sur
Python version
3.7.7
Table schema
Not a Redshift problem
Problem description
Connecting to a Redshift cluster with credentials being provided by IdP (Okta in this case) results in Okta login_url
page being opened twice if I have already signed in previously. To make it a bit more confusing, when redirected back to http://localhost:7890/redshift/
the page shows "This site can't be reached". Connection is established after that with no issues and I can execute the query.
I've also setup a connection in DBeaver using the same IdP and the same login_url
. In this case the login_url
page is opened only once and a proper message saying Thank you for using Amazon Redshift! You can now close this window.
is shown.
-
Expected behaviour:
IdPlogin_url
is opened once. After successful login and redirect tohttp://localhost:7890/redshift/
, the page shows the sameThank you for using Amazon Redshift! You can now close this window.
-
Actual behaviour:
IdPlogin_url
is opened twice. When redirected tohttp://localhost:7890/redshift/
it shows "This site can't be reached" -
Error message/stack trace:
No errors other than "This site can't be reached" in the browser
Python Driver trace logs
None
Reproduction code
import redshift_connector
conn = redshift_connector.connect(
iam=True,
ssl=True,
host="REDSHIFT_ENDPOINT",
port=5439,
database="DB_NAME",
db_user="IDP_USERNAME",
region="AWS_REGION",
cluster_identifier="CLUSTER_NAME",
login_url="IDP_LOGIN_URL",
credentials_provider="BrowserSamlCredentialsProvider",
user="",
password=""
)
cursor: redshift_connector.Cursor = conn.cursor()
cursor.execute("select current_user")
result = cursor.fetchone()
print(result)