Skip to content

feat: Expose proxy and custom-CA client options - #724

Merged
kylebarron merged 7 commits into
developmentseed:mainfrom
louisnow:expose-proxy-ca-client-options
Jun 25, 2026
Merged

feat: Expose proxy and custom-CA client options#724
kylebarron merged 7 commits into
developmentseed:mainfrom
louisnow:expose-proxy-ca-client-options

Conversation

@louisnow

@louisnow louisnow commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Fixes #428

My use case is that there's an internal corp proxy which has a custom certificate which then connects to an s3 compatible API service.

@ds-release-bot ds-release-bot Bot added the feat label Jun 16, 2026

@kylebarron kylebarron left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! This is a good start

Comment thread pyo3-object_store/src/client.rs Outdated
Comment thread pyo3-object_store/src/client.rs Outdated
Comment thread pyo3-object_store/src/client.rs Outdated
Comment thread pyo3-object_store/src/client.rs Outdated
Comment on lines +9 to +28
CERT_1 = b"""-----BEGIN CERTIFICATE-----
MIIDGzCCAgOgAwIBAgIUBqLgQSw4wiW06IhiKHNN5NyztG8wDQYJKoZIhvcNAQEL
BQAwHDEaMBgGA1UEAwwRb2JzdG9yZS10ZXN0LWNhLTEwIBcNMjYwNjE2MTQxMjEz
WhgPMjEyNjA1MjMxNDEyMTNaMBwxGjAYBgNVBAMMEW9ic3RvcmUtdGVzdC1jYS0x
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxw/NGsR0jwDKOSyXsfeT
WvniRh+bozmvQuyxW/qZwuNrgrkPdZbSM3j3eaqFOa9iqSds17u3bTYnC08SGyjo
hecOuja2KP5lYUJ31Vfad4KlkYVuNBjQ3FZb71jbwXuwKnhcrYlMUM8Vt/Oay/q+
uKDG0kMXTdjXButCFE+s8oTk0dlGEjQ6IuI3/0l5cv631iMIaIW13CDG1mMJwu9Q
yco8/J6aK6ZQFa0T9TRm2v3Y/3qiX+WryQakX72IY9DbRtxwjh0Lm81M46DChsE3
FyZB69aaKPdSkWUmNAWBa3H8cQziUv2SLz6DAG7r5cJZ0xkbqgiaQR8P1ud8yeL+
LwIDAQABo1MwUTAdBgNVHQ4EFgQUJGhd1ORfcw1Ov3/fljWfEoUJSx8wHwYDVR0j
BBgwFoAUJGhd1ORfcw1Ov3/fljWfEoUJSx8wDwYDVR0TAQH/BAUwAwEB/zANBgkq
hkiG9w0BAQsFAAOCAQEAurAH4Gvomh4QffpZf6s3/TPXHGM2wuuuOKB7QD7sfp8V
nlFthbcpEd0SRaH2T4fIeVDuHcMx/F7GYBaVOjXqRq9N6+zeutpPvu7YAoE4zbLz
Wnrn2fZG5uAO+HW26QXOsZU2zJHpHzZWZ3G1dV/C97k8hmSjkH7OOZSlZ/qIN4+p
5t5qBUJek66luxnEyfOdFitiJe9Ri6sj2ffT0aXejZCu2boO+3Szm6boLu3kCC7l
Latj8uDxEm6HsD4gxn61zMmmSjitTJYJt+lW8+3tlSf17tXd1TLG/cF/0gD28OhL
UmOHI1HSNtVKwotBkpOrlby1hWOX7IMtqPRmEJzz6Q==
-----END CERTIFICATE-----
"""

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for my knowledge, how were these test cases defined? Is this random input?

@louisnow louisnow Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I generated them using openssl, I've added the command as a comment now

openssl req -x509 -newkey rsa:2048 -nodes -days 36500 -subj /CN=obstore-test-ca-N

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, thanks. I've never touched custom certificates myself

Comment thread tests/store/test_client_options.py

@kylebarron kylebarron left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Just a few more comments

Comment on lines +16 to +17
/// The original PEM is retained so the value round-trips through
/// [`IntoPyObject`]; parsing happens once, on extraction.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 I see, it looks like there's no method on Certificate to go back to a PEM.

Comment thread pyo3-object_store/src/client.rs Outdated
Comment thread pyo3-object_store/src/client.rs Outdated
Comment thread pyo3-object_store/src/client.rs
Comment thread tests/store/test_client_options.py
@kylebarron
kylebarron enabled auto-merge (squash) June 25, 2026 14:47
@kylebarron
kylebarron merged commit 732c6d3 into developmentseed:main Jun 25, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support custom root certificates

2 participants