googleapis / googleapis/google-cloud-python

google-auth: gracefully handle leading whitespace in identity pool PEM parsing

オープン 初心者向け
#17,623 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
5.4k
フォーク
1.8k
平均マージ
3日 4時間
マージ済み PR(30日)
122

説明

### Summary of the issue
`_read_trust_chain` currently splits the PEM file on the literal `-----BEGIN CERTIFICATE-----` string.

If a perfectly valid PEM file happens to have some comments or blank lines at the top, that garbage ends up in the first split element. This causes `cryptography` to throw a `ValueError` and crash when it tries to load the chain.

### Proposed fix
Instead of a brittle string split, we should use `cryptography`'s native multi-PEM parser so it handles the noise gracefully.

### Affected Files
* `google/auth/identity_pool.py`

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Start in google/auth/identity_pool.py at _read_trust_chain and inspect how the PEM content is split before cryptography loads the certificates. Done means valid PEM files with leading comments or blank lines are parsed without a ValueError or crash, while the existing certificate chain behavior remains intact.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
authentication
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
静か
明瞭さ
明確に書かれている
初心者へのやさしさ
78/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。