HNHacker News
TopNewBestAskShowJobs

jamilbk

731 karma · joined April 28, 2011

A packet for you, a packet for you, everybody gets a packet!

https://www.github.com/firezone/firezone

Reach me: jamil AT firezone.dev

[ my public key: https://keybase.io/jamilbk; my proof: https://keybase.io/jamilbk/sigs/er-2zgQKQlBJEqbqmSFS2pxF01P8Hw5icoZ9WtUWxcE ]

submissionscomments
jamilbk··on We replaced Redis with MySQL for inventory reservations and it scaled
I came here to make a similar comment. It seems like TigerBeetle was built for exactly the type of transactional processing this post is about?
jamilbk··on Diátaxis
We just invested a good amount of time restructuring our docs for Diátaxis. It was helpful, but I wouldn't take it as gospel. The important thing to remember is that each piece of content should be one of the four types.

If you're embarking upon a refactoring / rewriting journey for your docs, the only advice I'd share is to actually read the website beginning to end before starting. Especially this page: https://diataxis.fr/complex-hierarchies/. The guide is (unsurprisingly) very well written, and it's easy to internalize the concepts because they're repeated often.

jamilbk··on Talking to strangers at the gym
Yeah, the weight floor can be hit or miss with regards to striking convos with strangers. Many of the people there want to make friends too, but many just want to focus on their workout.

Two related contexts that I've found to be much more friendly for this:

1. Climbing gyms, for reasons mentioned previously

2. The sauna! Actually very ideal for convos with strangers. Max overlap time is ~15 minutes, people are generally relaxed, no phones to distract and if it doesn't go well either party can always leave.

jamilbk··on Can I disable all data collection from my vehicle?
I remember yanking out the onstar unit in my 2015 silverado to physically disconnect the cell antenna. This was (is?) the only practical way to disable cellular in that vehicle.

Kudos to Rivian for making this a supported user privacy feature.

jamilbk··on The challenges of soft delete
At Firezone we started with soft-deletes thinking it might be useful for an audit / compliance log and quickly ran into each of the problems described in this article. The real issue for us was migrations - having to maintain structure of deleted data alongside live data just didn't make sense, and undermined the point of an immutable audit trail.

We've switched to CDC using Postgres which emits into another (non-replicated) write-optimized table. The replication connection maintains a 'subject' variable to provide audit context for each INSERT/UPDATE/DELETE. So far, CDC has worked very well for us in this manner (Elixir / Postgrex).

I do think soft-deletes have their place in this world, maybe for user-facing "restore deleted" features. I don't think compliance or audit trails are the right place for them however.

jamilbk··on Self-hosting is being enshittified
I don't fully understand the complaints about enshittification of open source permissively licensed software.

If the source code is available for you to fork, modify, and maintain as you see fit, what's the complaining really about?

jamilbk··on How NAT Traversal Works (2020)
Yes, the established standard here is known collectively as Interactive Connectivity Establishment (ICE) [1] which WebRTC relies on -- there are a few good libraries out there that implement it and/or various elements of it [2] [3].

libp2p [4] may be what you're after if you want something geared more towards general purpose connectivity.

[1] https://datatracker.ietf.org/doc/html/rfc8445

[2] https://github.com/pion/webrtc

[3] https://github.com/algesten/str0m

[4] https://libp2p.io

jamilbk··on Show HN: Test your WireGuard connectivity and see global stats, no client needed
PRs welcome! We may not have much bandwidth to help, but happy to review anything that comes along. We can discuss further perhaps on a GitHub issue so the rest of the Firezone team can offer input: https://github.com/firezone/probe/issues/new.
jamilbk··on Show HN: Test your WireGuard connectivity and see global stats, no client needed
I've exposed `Android` as a support OS. Give it a shot now.
jamilbk··on Show HN: Test your WireGuard connectivity and see global stats, no client needed
Noted! I'll update it to use the Unix instructions in that case. Thanks for the feedback!
jamilbk··on Show HN: Test your WireGuard connectivity and see global stats, no client needed
Unfortunately the app wasn't designed to intake test results from runs that didn't originate from itself. We wanted to make it harder to submit fake results, and didn't want to add a lot of friction around user auth and such.
jamilbk··on Show HN: Test your WireGuard connectivity and see global stats, no client needed
Great! Did the test report the block accurately for you?
jamilbk··on Launch HN: Firezone (YC W22) – Zero-trust access platform built on WireGuard
We have a few intrepid users self-hosting the entire Firezone stack, but we don't have documentation to support it (yet), and wouldn't recommend it for production. It's something we'd like to write and maintain eventually, even if only for smaller / hobby deployments.

We do have a self-hosted community support channel on Discord if you are feeling adventurous: https://discord.gg/DY8gxpSgep

I would recommend starting here with a local development cluster:

https://github.com/firezone/firezone/blob/main/docs/CONTRIBU...

jamilbk··on Launch HN: Firezone (YC W22) – Zero-trust access platform built on WireGuard
You can read more about how we came up with the current implementation here:

https://github.com/firezone/firezone/issues/3553

We didn't invent these techniques. Host candidates are part of standard ICE:

https://datatracker.ietf.org/doc/html/rfc8445#section-5.1.1....

jamilbk··on Launch HN: Firezone (YC W22) – Zero-trust access platform built on WireGuard
Firezone's DNS-based routing is able to manage access to multiple services independently, even if they share the same IP address. So you could for example allow access to gitlab.company.com but not jira.company.com even if they were on the same webserver / loadbalancer.

It took a couple iterations to get it right - lots of fun edge cases involved. We ended up having to build automatic NAT64 and 46 for DNS resources to handle some of them. We wrote a post on how this works: https://www.firezone.dev/blog/how-dns-works-in-firezone

In terms of attributes for allowing access, we currently support time-based, country/region-based, auth method, and IP-based, with more planned: https://www.firezone.dev/kb/deploy/policies#conditional-acce...

jamilbk··on Launch HN: Firezone (YC W22) – Zero-trust access platform built on WireGuard
We don't support full-tunnel yet, but it's just around the corner. Track this issue if you're interested in its progress: https://github.com/firezone/firezone/issues/2667
jamilbk··on Launch HN: Firezone (YC W22) – Zero-trust access platform built on WireGuard
Thanks!

Erlang/OTP has so far been an excellent platform to build on for a product like Firezone. We chose it specifically for its reputation for powering soft realtime systems. Phoenix Channels are an added bonus that allow us to push all updates where they need to go, in just a few hundred lines of code.

We couldn't be happier with the stack choice.

jamilbk··on Launch HN: Firezone (YC W22) – Zero-trust access platform built on WireGuard
Are you referring to the macOS client app? It's built in Swift with an FFI bridge to the Rust-powered connectivity layer. Source is here: https://github.com/firezone/firezone/tree/main/swift/apple
jamilbk··on Launch HN: Firezone (YC W22) – Zero-trust access platform built on WireGuard
Appreciate the feedback! Will certainly plan to take the product demos up a notch going forward.
jamilbk··on Launch HN: Firezone (YC W22) – Zero-trust access platform built on WireGuard
Thanks for the support!
jamilbk··on Launch HN: Firezone (YC W22) – Zero-trust access platform built on WireGuard
This is a fairly common scenario and one that we had in mind when building the NAT traversal implementation. The short answer is that you wouldn't need to sign out of Firezone when in the office -- the connection should hairpin off the nearest common router and go directly to the SMB share in this case.
jamilbk··on Launch HN: Firezone (YC W22) – Zero-trust access platform built on WireGuard
Ah yes, don't get me started on all the fun edge cases involved in supporting cross platform network stacks and all their subtle tunnel API differences :-)

We're trying to stay focused on keeping policies easy to define and manage so that access management is... manageable as you scale. That and the fact data doesn't go through the cloud / intermediary have been a couple of the reasons customers say they prefer us.

Definitely an exciting space to be building in!

jamilbk··on Launch HN: Firezone (YC W22) – Zero-trust access platform built on WireGuard
I may not be fully understanding the question, but I think you may be referring to DNS-based resources? Those will allow you to manage access to an app or service by its DNS name (wildcards supported). You can also use IP or CIDR resources as well of course.

In terms of scalability, are you referring to throughput or simply the complexity of policy management as the number of resources grows?

jamilbk··on Launch HN: Firezone (YC W22) – Zero-trust access platform built on WireGuard
For simple access needs, in Firezone you would likely configure a CIDR resource and grant the Everyone group access to it, which mimics the setup of a traditional VPN. It is a couple extra clicks, though.
jamilbk··on Launch HN: Firezone (YC W22) – Zero-trust access platform built on WireGuard
Thanks! We're similar to Twingate in how we model resources, but our policy system has optional conditions you can apply to restrict access further, which works a bit differently. We expect to continue building in that area over time. We also use WireGuard as a transport while I believe Twingate operates over QUIC.
jamilbk··on Launch HN: Firezone (YC W22) – Zero-trust access platform built on WireGuard
Good question! The main difference is how access is managed. Instead of configuring ACLs, you define policies which are a 1:1 mapping between a user group (manually created or synced from your IdP) and the resource you want to allow access for. Another difference is how our load balancing / failover system works - it's automatic across all the Gateways in a particular Site.
jamilbk··on RegreSSHion: RCE in OpenSSH's server, on glibc-based Linux systems
From the diff introducing the bug [1], the issue according to the analysis is that the function was refactored from this:

  void
  sigdie(const char *fmt,...)
  {
  #ifdef DO_LOG_SAFE_IN_SIGHAND
   va_list args;
  
   va_start(args, fmt);
   do_log(SYSLOG_LEVEL_FATAL, fmt, args);
   va_end(args);
  #endif
   _exit(1);
  }
to this:

  void
  sshsigdie(const char *file, const char *func, int line, const char *fmt, ...)
  {
   va_list args;
  
   va_start(args, fmt);
   sshlogv(file, func, line, 0, SYSLOG_LEVEL_FATAL, fmt, args);
   va_end(args);
   _exit(1);
  }
which lacks the #ifdef.

What could have prevented this? More eyes on the pull request? It's wild that software nearly the entire world relies on for secure access is maintained by seemingly just two people [2].

[1] https://github.com/openssh/openssh-portable/commit/752250caa...

[2] https://github.com/openssh/openssh-portable/graphs/contribut...

jamilbk··on Crossing the impossible FFI boundary, and my gradual descent into madness
The article provides a very detailed exploration of all of the fun challenges you can face designing FFIs with Rust, but there's a good chance you can "get away" with simpler approaches if you think ahead a bit.

In our case, we call into Rust from Kotlin using JNI [0] and Swift using swift-bridge [1]. Thankfully our use case for the FFI [2] is for non-performance-critical calls and the data structures are fairly simple, so we just serialize objects with JSON.

No major issues so far.

One thing I am surprised hasn't been mentioned so far is Mozilla's UniFFI [3] which seems to solve some of the issues brought up in the article. We plan to switch to that once our FFI requirements become more complex.

[0] https://docs.rs/jni/latest/jni/

[1] https://github.com/chinedufn/swift-bridge

[2] https://www.firezone.dev/kb/architecture/tech-stack#client-a...

[3] https://github.com/mozilla/uniffi-rs

jamilbk··on macOS Sequoia to Allow iCloud Logins in Virtual Machines on ARM Macs
I hope this will allow running NetworkExtensions in VMs as well. As it stands today, it's only possible to run NetworkExtensions on physical Apple hardware, making it a pain to apply any modern CI-based workflow to them.
jamilbk··on String Comparison Timing Attacks
The author's conclusion to question of "are timing attacks viable?" seems to be... it depends on the nature of the language or library. Are most devs going to understand these nuances though?

In the time it takes to research the timing behavior of your runtime, you could have reached for a constant-time comparison instead.

Similarly, in the time it takes you to reach the conclusion the comparison you're using isn't vulnerable, you could have reached for a secure compare instead.

I'm not convinced this post makes a compelling case against the best practice of always using a secure compare for secret strings.

Page 1 of 3Next →