Skip to content

IdP url opened twice #40

@ivica-k

Description

@ivica-k

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.

  1. Expected behaviour:
    IdP login_url is opened once. After successful login and redirect to http://localhost:7890/redshift/, the page shows the same Thank you for using Amazon Redshift! You can now close this window.

  2. Actual behaviour:
    IdP login_url is opened twice. When redirected to http://localhost:7890/redshift/ it shows "This site can't be reached"

  3. Error message/stack trace:
    No errors other than "This site can't be reached" in the browser

  4. Any other details that can be helpful:
    abc

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions