Postgres custom root certificates#3395
Open
itowlson wants to merge 3 commits intospinframework:mainfrom
Open
Conversation
lann
reviewed
Feb 12, 2026
lann
reviewed
Feb 12, 2026
lann
reviewed
Feb 12, 2026
| .builders | ||
| .get_mut(self_.rep()) | ||
| .ok_or_else(|| v4::Error::ConnectionFailed("no builder found".into()))?; | ||
| // borrow checker gets pedantic here, so we need to outsmart it |
Collaborator
There was a problem hiding this comment.
Oh right, I forgot how to WIT. I guess the "right" way (what WASI does) would look something like:
resource connection-options {
constructor();
set-root-ca: ...
}
resource connection {
open-with-options: static func(address: string, options: connection-options) -> ...
...
}
...or some variation thereof... that would make it safe to take the resource out of the table when you need it.
I don't have strong feelings here. 🤷
Collaborator
Author
There was a problem hiding this comment.
Is there any reason why connection-options would benefit from being a resource in this case? It feels like it's not doing anything a record couldn't do, and passing a record directly to open-with-options would significantly reduce implementation noise. Is it forward compatibility considerations?
Collaborator
There was a problem hiding this comment.
Yep - records cannot be extended backward-compatibly.
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Take seven. This is part of the "guests have to include their root cert as an asset" genre. Based on Lann's suggestion at #3381 (comment).
This is pretty unergonomic as you can see from the example (in tests/manual - look at the commented out 'for testing with TLS' stuff), but hopefully we can wrapper it in the SDKs, and if not... well... at least folks have an escape hatch eh.