fleet icon indicating copy to clipboard operation
fleet copied to clipboard

Orbit should not use `os.TempDir` for storing the Proxy certificate when using `--insecure` mode

Open lucasmrod opened this issue 2 years ago • 0 comments

Fleet version: main

Orbit uses os.TempDir to store the proxy certificate for the --insecure mode: https://github.com/fleetdm/fleet/blob/e92ea532b6d56a75e24f79013a906009a1c0f235/orbit/cmd/orbit/orbit.go#L398

We've heard reports from users that using a temp directory is unstable:

  • On Ubuntu we've seen this issue with root accessing /tmp (permission denied errors).
  • On Windows, stuff in C:\Windows\TEMP\ gets often cleaned up (see #6464).

We should instead store such certificate on filepath.Join(c.String("root-dir"), "proxy", "fleet.crt").

lucasmrod avatar Jul 01 '22 20:07 lucasmrod