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

[Test-Proxy] TLS validation cert setup not working in Python with Docker #3819

Closed
mccoyp opened this issue Aug 2, 2022 · 1 comment · Fixed by #3882
Closed

[Test-Proxy] TLS validation cert setup not working in Python with Docker #3819

mccoyp opened this issue Aug 2, 2022 · 1 comment · Fixed by #3882
Assignees
Labels
Python Test-Proxy Anything relating to test-proxy requests or issues.

Comments

@mccoyp
Copy link
Member

mccoyp commented Aug 2, 2022

When using the test proxy's recording options API, requests coming from Python aren't able to set a TLS validation certificate when using the test proxy via Docker. This issue was raised by Confidential Ledger, which has a test that tries to set a certificate that's fetched from the service: test code.

The same error is raised when using a PEM certificate that's used for test proxy tests, though this certificate is known to be problematic on Linux.

An example of error response (which is raised when certificate newlines are removed or not):

'Unable to instantiate a valid cert from the value provided in Transport settings key "TLSValidationCert".
Value: "-----BEGIN CERTIFICATE-----MIIBe[redacted]MZFq+9-----END CERTIFICATE-----".
Message: "ASN1 corrupted data.".'

When the "-----BEGIN/END CERTIFICATE-----" delimiters are removed, the error's Message is "No PEM encoded data found." instead.

This has been observed when using the Docker test proxy tool on WSL Ubuntu and Windows 11.

@mccoyp mccoyp added Python Test-Proxy Anything relating to test-proxy requests or issues. labels Aug 2, 2022
@scbedd
Copy link
Member

scbedd commented Aug 3, 2022

Thank you for filing the issue! You're the first folks to try these features against docker. I'm certain that if JS had been the first they would have also encountered this.

When debugging locally on a windows machine, the recording option sets just fine. Anecdotally, these operations also succeed in CI for azure-sdk-for net, which absolutely runs on a linux machine.

This makes me think the failure is specific to the docker image, but I will be digging into this today.

@scbedd scbedd moved this from 🤔Triage to 🐝 Dev in Azure SDK EngSys 🚢🎉 Aug 3, 2022
@scbedd scbedd moved this to 🤔Triage in Azure SDK EngSys 🚢🎉 Aug 3, 2022
Repository owner moved this from 🐝 Dev to 🎊Closed in Azure SDK EngSys 🚢🎉 Aug 8, 2022
@scbedd scbedd moved this from 🎊Closed to 🔬Dev in PR in Azure SDK EngSys 🚢🎉 Aug 8, 2022
@kurtzeborn kurtzeborn moved this from 🔬Dev in PR to 🎊Closed in Azure SDK EngSys 🚢🎉 Aug 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Python Test-Proxy Anything relating to test-proxy requests or issues.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants