Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

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

未关闭
#244 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
aws, python
领域
databases

调研方向

从复现 get_redshift_connection_robotic 开始,并跟踪 IAM 和 PingCredentialsProvider 的连接路径。将连接器的身份要求与报告的 SQL-client 行为进行比较;完成的标准是,没有有效 AWS 身份的用户可以使用所示配置连接到 Redshift,并且 SELECT 1 执行成功。

由索引模型根据 Issue 内容生成。

描述

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()

主要语言
Python
星标
220
派生
88
PR 合并指标
30 天内没有已合并 PR

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

aws/amazon-redshift-python-driver 的其他 Issue

查看 aws/amazon-redshift-python-driver 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。