Skip to content

mitmproxy 10.1.1 #145547

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

Closed
wants to merge 2 commits into from
Closed

mitmproxy 10.1.1 #145547

wants to merge 2 commits into from

Conversation

mhils
Copy link
Contributor

@mhils mhils commented Sep 24, 2023

Created with brew bump-formula-pr.

  • resource blocks have been checked for updates.

@github-actions github-actions bot added python Python use is a significant feature of the PR or issue rust Rust use is a significant feature of the PR or issue bump-formula-pr PR was created using `brew bump-formula-pr` autosquash Automatically squash pull request commits according to Homebrew style. labels Sep 24, 2023
@mhils
Copy link
Contributor Author

mhils commented Sep 24, 2023

Hi folks! filing this early to get some feedback on what we should do with https://pypi.org/project/mitmproxy-macos/. In short, mitmproxy-macos is a new dependency that includes a precompiled macOS System Network Extension (written in Swift). Building from source isn't straightforward here because the system extension needs to be signed & notarized by Apple to work. How does that fit with Homebrew?

@chenrui333
Copy link
Member

Hi folks! filing this early to get some feedback on what we should do with https://pypi.org/project/mitmproxy-macos/. In short, mitmproxy-macos is a new dependency that includes a precompiled macOS System Network Extension (written in Swift). Building from source isn't straightforward here because the system extension needs to be signed & notarized by Apple to work. How does that fit with Homebrew?

If there is source code available, we should build from source for it.

@mhils
Copy link
Contributor Author

mhils commented Sep 25, 2023

If there is source code available, we should build from source for it.

There absolutely is:

The tricky part is that the system extension must be signed and notarized with the correct entitlements/provisioning profile, otherwise it will not work. I've tried searching the Homebrew issue tracker for similar cases, but did not find any.

@SMillerDev
Copy link
Member

The tricky part is that the system extension must be signed and notarized with the correct entitlements/provisioning profile, otherwise it will not work.

Then it won't work for anyone using the Homebrew/core version unfortunately. Homebrew applies adhoc signatures when installing on ARM, but unfortunately we can't notarise anything.

@mhils
Copy link
Contributor Author

mhils commented Sep 26, 2023

Thanks @SMillerDev! Is there a path forward for us to get this supported in the Homebrew/core version? We've been suggesting brew install mitmproxy as the main installation method for years, and there are tons of online resources referencing that. It would be fantastic if we could keep it that way. Is a Python source distribution that bundles an open-source CI-built notarized system extension acceptable for Homebrew/core?

@mhils mhils force-pushed the bump-mitmproxy-10.1.0 branch from 2374705 to 407919c Compare September 27, 2023 11:47
@mhils mhils changed the title mitmproxy 10.1.0 mitmproxy 10.1.1 Sep 27, 2023
@github-actions github-actions bot removed the autosquash Automatically squash pull request commits according to Homebrew style. label Sep 27, 2023
@mhils mhils force-pushed the bump-mitmproxy-10.1.0 branch 6 times, most recently from 5a75311 to c24e9c0 Compare September 27, 2023 12:42
@github-actions github-actions bot added the autosquash Automatically squash pull request commits according to Homebrew style. label Sep 27, 2023
@mhils mhils force-pushed the bump-mitmproxy-10.1.0 branch from ef2779d to 75c6677 Compare September 27, 2023 13:56
@mhils mhils force-pushed the bump-mitmproxy-10.1.0 branch 3 times, most recently from d3d16e3 to 74d4144 Compare September 28, 2023 02:55
@mhils mhils force-pushed the bump-mitmproxy-10.1.0 branch from 74d4144 to 1e74a03 Compare September 28, 2023 03:20
@mhils
Copy link
Contributor Author

mhils commented Sep 28, 2023

I've updated this PR as per my last comment - mitmproxy-macos now is a Python "source" distribution that contains the precompiled notarized system extension. Please let me know if that's an acceptable approach. I've considered the following alternatives:

  1. One possible solution would be to move mitmproxy to a custom tap or distribute it as a cask. We'd really like to avoid that because brew install mitmproxy is not only right on mitmproxy.org, but also in tons of external blog posts etc. It'd be a major support headache for us.
  2. Instead of shipping mitmproxy with a precompiled binary, we can of course keep the installation clean and dynamically download the system extension at runtime. I feel this does not really change the outcome for users, but it would adhere to a strict reading of the current Homebrew policies. Right now we do not have any telemetry in mitmproxy at all, so I'd be a bit sad to deviate from that. But from our end we'd still prefer that over 1).
  3. If it would help our case, we'd be happy to also provide SLSA provenance attestation for the binaries and somehow validate that in our formula. SLSA provenance would at least show that the binaries are built straight from our sources in GitHub Actions, and are not modified in any way. It's a bit of work to set up for us, but if that'd help, we'd be happy to implement that.
  4. For completeness, I'd like to mention again that we would be extremely happy to just provide sources and Homebrew signs + notarizes our system extension. I understand that this is not possible right now, but I'd like to re-emphasize that we come with good intentions and this would be our preferred approach.

Thanks y'all for your support with Homebrew! 🍰

@MikeMcQuaid
Copy link
Member

  1. We'd really like to avoid that because brew install mitmproxy is not only right on mitmproxy.org, but also in tons of external blog posts etc. It'd be a major support headache for us.

Note: if mitmproxy turns into a cask and the formula is removed: brew install mitmproxy will still just work.

This feels like it would probably be the best solution to me, at least for macOS.

@MikeMcQuaid
Copy link
Member

@mhils just wanted to specifically call out though: thanks so much for your understanding and kind, measured tone throughout. It's much appreciated (and can sometimes be rare). You rock! ❤️

@mhils
Copy link
Contributor Author

mhils commented Sep 30, 2023

Thank you for the kind words - appreciate y'all. 😊

Not the recommendation I was hoping for, but I understand the reasoning behind it. We'll probably need to a bit of time on our end to come up with a macOS binary distribution, but will go for that. Thanks again for the quick replies! :)

@mhils
Copy link
Contributor Author

mhils commented Nov 3, 2023

Thank y'all for bearing with us. :) I've just opened Homebrew/homebrew-cask#159283 to add the cask.

@github-actions github-actions bot added the outdated PR was locked due to age label Dec 6, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
autosquash Automatically squash pull request commits according to Homebrew style. bump-formula-pr PR was created using `brew bump-formula-pr` outdated PR was locked due to age python Python use is a significant feature of the PR or issue rust Rust use is a significant feature of the PR or issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants