Re:Tailscale state file encryption no longer enabled by default
by cyberax on Wednesday January 07, 2026 @09:02PM
(#46536188)
You don't need Swift to use the Keychain API. It's doable from pure C.
Re:Tailscale state file encryption no longer enabled by default
by johncolanduoni on Wednesday January 07, 2026 @09:24PM
(#46536384)
In fact, SecurityFramework doesn’t have a real Swift/Obj-C API. The relevant functions are all direct bindings to C ABIs (just with wrappers around the CoreFoundation types).
Re:Tailscale state file encryption no longer enabled by default
by lloeki on Thursday January 08, 2026 @02:48AM
(#46538432)
> The third one is just the open-source tailscaled binary that you have to compile yourself, and it doesn't talk to the Keychain.
I use this one (via nix-darwin) because it has the nice property of starting as a systemwide daemon outside of any user context, which in turn means that it has no (user) keychain to access (there are some conundrums between accessing such keychains and "GUI" i.e user login being needed, irrespective of C vs Swift or whatever).
Maybe it _could_ store things in the system keychain? But I'm not entirely sure what the gain would be when the intent is to have tailscale access through fully unattended reboots.
Re:Tailscale state file encryption no longer enabled by default
by cronos on Thursday January 08, 2026 @10:21AM
(#46542052)
Good to know, my understanding of the macOS system APIs is fairly limited.
I'm sure it's doable, with some elbow grease and CGO. We just haven't prioritized that variant of the client due to relatively low usage.
Re:Tailscale state file encryption no longer enabled by default
by cyberax on Thursday January 08, 2026 @01:01PM
(#46544222)
If you want to avoid Cgo, you can use https://github.com/ebitengine/purego or Goffi to call the native functions. It's a bit cursed, but works.
Re:Tailscale state file encryption no longer enabled by default
by reader9274 on Wednesday January 07, 2026 @11:20PM
(#46537152)
Only one of the ways uses Keychain per that page.
The third one is just the open-source tailscaled binary that you have to complete yourself, and it doesn't talk to the Keychain. It stores a plaintext file on disk like the Linux variant without state encryption. Unlike the GUI variants, this one is not a Swift program that can easily talk to the Keychain API.