-
Notifications
You must be signed in to change notification settings - Fork 303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
impersonated_credentials.Credentials.sign_bytes leaks socket #1122
Labels
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Comments
stewartmiles
added a commit
to stewartmiles/google-auth-library-python
that referenced
this issue
Aug 26, 2022
impersonated_credentials.Credentials.sign_bytes() created a session that wasn't closed leaking a socket. This fixes the issue by always closing the requests session after a signing request is complete. Fixes googleapis#1122
stewartmiles
added a commit
to stewartmiles/google-auth-library-python
that referenced
this issue
Aug 26, 2022
impersonated_credentials.Credentials.sign_bytes() created a session that wasn't closed leaking a socket. This fixes the issue by always closing the requests session after a signing request is complete. Fixes googleapis#1122
clundin25
added
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
labels
Aug 26, 2022
clundin25
pushed a commit
that referenced
this issue
Aug 29, 2022
* fix: Fix socket leak in impersonated_credentials impersonated_credentials.Credentials.sign_bytes() created a session that wasn't closed leaking a socket. This fixes the issue by always closing the requests session after a signing request is complete. Fixes #1122
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
_#### Environment details
google-auth
version: 2.11.0Steps to reproduce
SA_EMAIL
.iam.serviceAccountTokenCreator
. i.e:pip install google-auth requests
.It looks like the bug is here
google-auth-library-python/google/auth/impersonated_credentials.py
Line 289 in bb5c979
The requests session object is created but it's never closed. It should eventually be closed by the GC but really since it's no longer required it should be closed in this method.
The text was updated successfully, but these errors were encountered: