[google-auth] Feat: ECP and hardware-backed cert support for X.509 workloads
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Determine this is the right repository
- I determined this is the correct repository in which to report this feature request.
Summary of the feature request
I would like to use my hardware-backed (TPM, Secure Enclave, HSM, etc) certificates with a X.509 Workload Identity Provider.
Today google-auth X.509 provider assumes it will be given the private key of the certificate and hard fails if it doesn't:
packages/google-auth/google/auth/external_account.py line 480:
# Inject client certificate into request.
if self._mtls_required():
request = functools.partial(
request, cert=self._get_mtls_cert_and_key_paths()
)
this limits the implementation to only private keys stored directly on the filesystem.
Allowing hardware-backed certificates provides iron-clad security for service account authentication. The library will be able to authenticate as a WIF Identity / Service account using a private key that was generated on the TPM / Secure Enclave and cannot be exported.
Desired code experience
from google.auth import default
from google.auth.transport.requests import AuthorizedSession
# certificate_config.json has ECP libs + macos_keychain (hardware-backed key)
# but NO "workload" section (no private key file on disk)
creds, _ = default(scopes=["https://www.googleapis.com/auth/cloud-platform"])
session = AuthorizedSession(creds)
session.configure_mtls_channel() # ECP handles mTLS via hardware signing
response = session.get("https://cloudresourcemanager.googleapis.com/v1/projects/my-project")
Expected results
_get_cert_bytes() should fall back to the ECP signer library (GetCertPemForPython) to retrieve the certificate from the OS keystore when no workload file path exists. _perform_refresh_token() should skip injecting cert=(cert_path, key_path) when paths are (None, None), letting the session's ECP adapter (via configure_mtls_channel()) handle mTLS. Currently it crashes with TypeError (None path) or SSLError: [SSL] PEM libs (placeholder path).
API client name and version
google-auth 2.56.2
Use case
This feature would be useful in allowing non-GCP service account / WIF authenticating while never needing to expose a private key for export and theft.
Additional context
I'm glad to discuss further internally next week. go/teams/jayhlee.
- Ngôn ngữ chính
- Python
- Star
- 5.4k
- Fork
- 1.8k
- Merge trung bình
- 2 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 136
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của googleapis/google-cloud-python
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
googleapis/google-cloud-python#18532 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
auth: call_client_cert_callback() discards passphrase for encrypted keysCó thể đã có người làm @kwy404 đã nhận 3 ngày trước. Đang mở
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 92/100
googleapis/google-cloud-python#18467 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
auth: `impersonated_credentials` loses `subject` on copy, so `with_scopes()` and `with_quota_project()` turn off domain wide delegationCó thể đã có người làm @Om-singhaI đã nhận 14 ngày trước. Đang mởauth priority: p2 type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
googleapis/google-cloud-python#18428 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
priority: p2 type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
googleapis/google-cloud-python#18375 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ci: enable --strict flag in presubmit twine_checkCó thể đã có người làm @ohmayr đã nhận 3 ngày trước. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 76/100
googleapis/google-cloud-python#18339 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của googleapis/google-cloud-python
Issue tương tự
-
Action calls retired claude-3-5-haiku-20241022, generating failing API requests for every userĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 91/100
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 92/100
-
enhancement P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Toloka/tolokaforge#1776 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
TencentCloud/Octop#1622 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[arch] gate_sync.sh: stale remote tmp files on install failure; overlapping cron runs unguardedĐang mởarch area:fleet priority:p3 severity:low track:hosted-product
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày