[google-auth] Feat: ECP and hardware-backed cert support for X.509 workloads
Los mantenedores suelen responder en 1 día
Evaluación
Este issue todavía no se ha evaluado.
Descripción
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.
- Lenguaje dominante
- Python
- Estrellas
- 5.4k
- Forks
- 1.8k
- Merge medio
- 2 d 9 h
- PR fusionados (30 d)
- 136
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de googleapis/google-cloud-python
-
api: spanner type: feature request
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
googleapis/google-cloud-python#18584 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
googleapis/google-cloud-python#18532 ·
Los mantenedores suelen responder en 1 día
-
auth: call_client_cert_callback() discards passphrase for encrypted keysPosiblemente ocupada @kwy404 la tomó hace 6 días. Abierto
Dificultad 1/5 1-3 horas Aptitud para principiantes 92/100
googleapis/google-cloud-python#18467 ·
Los mantenedores suelen responder en 1 día
-
auth: `impersonated_credentials` loses `subject` on copy, so `with_scopes()` and `with_quota_project()` turn off domain wide delegationPosiblemente ocupada @Om-singhaI la tomó hace 17 días. Abiertoauth priority: p2 type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
googleapis/google-cloud-python#18428 ·
Los mantenedores suelen responder en 1 día
-
priority: p2 type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
googleapis/google-cloud-python#18375 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de googleapis/google-cloud-python
Issues similares
-
changelog investigate
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
ramnes/notion-sdk-py#409 ·
-
good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
lindicaphxag-tech/kaggle#28 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
BSData/horus-heresy-3rd-edition#3211 ·
Los mantenedores suelen responder en 1 día
-
bug needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
bug tests
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día