Skip to content
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

Pin requests due to bug with connecting to DVLA #4114

Merged
merged 1 commit into from
Jun 18, 2024

Conversation

idavidmcdonald
Copy link
Contributor

We updated requests in #4108 but we saw errors in production connecting to DVLA as per psf/requests#6730.

It looks like moving back to 2.32.2 should be unaffected, at least according to the github issue above.

Once a new version is released that fixes it, we can drop this pin. If it doesn't get fixed we could look at an alternative approach like #4113

We updated requests in #4108
but we saw errors in production connecting to DVLA as per
psf/requests#6730.

It looks like moving back to 2.32.2 should be unaffected, at least
according to the github issue above.

Once a new version is released that fixes it, we can drop this
pin. If it doesn't get fixed we could look at an alternative approach
like #4113
@leohemsted
Copy link
Contributor

have we been able to test this locally to confirm it's a solution?

i assume we should be able to test this by just setting up the SSL settings the same as we do in api and making a request to https://driver-vehicle-licensing.api.gov.uk/thirdparty-access/v1/authenticate and making sure it doesn't error

@idavidmcdonald
Copy link
Contributor Author

Good point.

Verified it using the following script with versions 2.32.2 and 2.32.3 of requests. I replicate the error in 2.32.3 and get no exception in 2.32.2

from requests.adapters import HTTPAdapter
from app.clients.letter.dvla import _SpecifiedCiphersAdapter
import requests

ciphers = "TLS_AES_128_GCM_SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256"

session = requests.Session()
session.mount("https://driver-vehicle-licensing.api.gov.uk", _SpecifiedCiphersAdapter(ciphers=ciphers))
response = session.get("https://driver-vehicle-licensing.api.gov.uk/thirdparty-access/v1/authenticate")
print(response)

@idavidmcdonald idavidmcdonald merged commit 1e9b25a into main Jun 18, 2024
3 checks passed
@idavidmcdonald idavidmcdonald deleted the pin-requirements branch June 18, 2024 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants