10 Commits

Author SHA1 Message Date
Andrew Lytvynov
cca70ddbfc
cmd/tailscaled: default --encrypt-state to true if TPM is available (#17376)
Whenever running on a platform that has a TPM (and tailscaled can access
it), default to encrypting the state. The user can still explicitly set
this flag to disable encryption.

Updates https://github.com/tailscale/corp/issues/32909

Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
2025-10-01 20:18:58 -07:00
Brad Fitzpatrick
9b997c8f2f feature/tpm: don't log to stderr in tests
Fixes #17336

Change-Id: I7d2be4e8acf59116c57ce26049a6a5baa8f32436
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2025-09-30 10:21:58 -07:00
Andrew Lytvynov
f2b8d37436
feature/tpm: only register HardwareAttestationKey on linux/windows (#17293)
We can only register one key implementation per process. When running on
macOS or Android, trying to register a separate key implementation from
feature/tpm causes a panic.

Updates #15830

Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
2025-09-26 08:39:02 -07:00
Andrew Lytvynov
c49ed5dd5a
feature/tpm: implement key.HardwareAttestationKey (#17256)
Updates #15830

Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
2025-09-25 11:54:41 -07:00
Andrew Lytvynov
0d03a3746a
feature/tpm: log errors on the initial info fetch (#16574)
This function is behind a sync.Once so we should only see errors at
startup. In particular the error from `open` is useful to diagnose why
TPM might not be accessible.

Updates #15830

Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
2025-07-21 10:35:53 -07:00
Andrew Lytvynov
172e26b3e3
tailcfg: report StateEncrypted in Hostinfo (#16434)
Report whether the client is configured with state encryption (which
varies by platform and can be optional on some). Wire it up to
`--encrypt-state` in tailscaled, which is set for Linux/Windows, and set
defaults for other platforms. Macsys will also report this if full
Keychain migration is done.

Updates #15830

Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
2025-07-02 10:52:00 -07:00
Andrew Lytvynov
76b9afb54d
ipn/store: make StateStore.All optional (#16409)
This method is only needed to migrate between store.FileStore and
tpm.tpmStore. We can make a runtime type assertion instead of
implementing an unused method for every platform.

Updates #15830

Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
2025-06-27 15:14:18 -07:00
Andrew Lytvynov
6feb3c35cb
ipn/store: automatically migrate between plaintext and encrypted state (#16318)
Add a new `--encrypt-state` flag to `cmd/tailscaled`. Based on that
flag, migrate the existing state file to/from encrypted format if
needed.

Updates #15830

Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
2025-06-26 17:09:13 -07:00
Andrew Lytvynov
4979ce7a94
feature/tpm: implement ipn.StateStore using TPM sealing (#16030)
Updates #15830

Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
2025-06-18 14:17:12 -07:00
Andrew Lytvynov
3105ecd958
hostinfo,tailcfg: report TPM availability on windows/linux (#15831)
Start collecting fleet data on TPM availability via hostinfo.

Updates #15830

Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
2025-05-02 11:01:13 -07:00