Sample use case #27
Replies: 4 comments 2 replies
-
Makes sense. Thanks for explaining your use case. So you're using a helper tool installed with
Sadly you're correct. Apple's sample code has known security vulnerabilities. I find it quite irresponsible of them.
XPC is quite limited on iOS (and actually the C API used under the hood by SecureXPC is unavailable on iOS). Apple doesn't allow any 3rd party code to run as root on iOS nor can arbitrary apps communicate with one another. See this Developer Forums discussion for a short explanation. |
Beta Was this translation helpful? Give feedback.
-
Yeah, the helper is installed with As mentioned, my code is all working, but my overarching sense from building my privileged helper is that whilst it's perfectly solid, the communication channel also sometimes feels brittle and was (and is) hard to debug. Actually, on that topic I am eager to try the "anonymous XPC connection" method mentioned in #22 — would you consider exposing that in some form as a developer-facing feature of SecureXPC? |
Beta Was this translation helpful? Give feedback.
-
What would you want to use an anonymous connection for? |
Beta Was this translation helpful? Give feedback.
-
@jeff-h v0.3.0 was released a few hours ago and added support for anonymous connections. The documentation for |
Beta Was this translation helpful? Give feedback.
-
Continuing on from #22 (comment) ...
My macOS app needs a helper tool to run a bunch of stuff as root — fairly typical stuff I would imagine. I really like your client/server design metaphor particularly the idea of defining routes. I also started to view things this way but only after having written most of my XPC communication code, so it was too late to really integrate the idea.
One area of significant trepidation for me was security — I read lots about this and it was a steep learning curve. It really felt like Apple should be improving their frameworks around all this, or at the very least providing a good solid demo app. As you would know their sample code in this area is ancient and actually insecure (I believe). And given that the accepted wisdom is to never write your own security implementation, there's another reason a package like this, with many more eyes on it, is invaluable.
SO, I was pretty excited when I found your project — in addition to the good work shared by others I believe this will provide a really solid and secure foundation for developers who need it. Actually I don't think it's hyperbolic to say this is likely to measurably increase the quality/security of mac apps (I don't do much iOS right now so I don't really know if it's useful there).
Beta Was this translation helpful? Give feedback.
All reactions