Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

Implement proxy v2 architecture, in Rust #127

Closed
wants to merge 12 commits into from
Closed

Implement proxy v2 architecture, in Rust #127

wants to merge 12 commits into from

Conversation

legoktm
Copy link
Member

@legoktm legoktm commented Dec 11, 2023

Placeholder, details TK.

Refs freedomofpress/securedrop-client#1678.

cfm and others added 12 commits November 16, 2023 16:43
We care about the preservation of the entire configured origin tuple
(scheme, host, port), not just the hostname.[1]  However, there is a
tension in considering whether this check is valuable:

1. On the one hand, as @legoktm has pointed out, if Url::parse() is
   compromised, why should we trust the result of Url::Url.origin()?

2. On the other hand, as Daniel Stenberg has documented, "mixing parsers
   is considered a security risk".[2]

[1]: https://url.spec.whatwg.org/#origin

[2]: https://daniel.haxx.se/blog/2022/01/10/dont-mix-url-parsers/
`process::exit()` immediately terminates with the given exit code,
meaning that no destructors are run. For our purposes it shouldn't
matter much, but let's exit the graceful way.
Rewrite the existing tests to be integration tests against a compiled
Rust binary. We use the httpbin library to start up a Python webserver
and instruct the proxy to connect to it. This allows to test connection
properties that aren't recordable in the VCR format, like timeouts or
streamed responses.

The tests are reorganized to be split into proxy handling and error
handling.
And remove the Python CI. We still need to set up cargo-audit and
cargo-vet jobs.
@cfm
Copy link
Member

cfm commented Dec 12, 2023

dca4722^...61305c will need revising based on freedomofpress/securedrop-engineering#82. I'll be happy to do that once that's approved and this is stable.

@legoktm
Copy link
Member Author

legoktm commented Dec 13, 2023

I've migrated this to freedomofpress/securedrop-client#1718.

@legoktm legoktm closed this Dec 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants