UniFi Endpoint
==============

UniFi Endpoint provides secure access to UniFi-managed networks, including
VPN connectivity, WiFi authentication, credential management, and SSL
inspection support. It integrates with system networking and credential
storage services.

Most of that integration is scoped to UniFi Endpoint itself. The one
exception - a machine-wide change that affects every program on the host -
is the TLS trust store, documented below.

Trust store handling
---------------------

In one specific case UniFi Endpoint modifies the system-wide TLS trust
store. Because that affects every program on the machine, the behaviour is
documented here up front.

SSL inspection
  When your workspace has SSL inspection enabled, UniFi Endpoint installs the
  workspace's CA certificate into the machine-wide trust store and rebuilds
  the trust bundle. The anchor location and rebuild tool depend on the
  distribution family:

      Debian / Ubuntu
        /usr/local/share/ca-certificates/UniFi-Endpoint-<fingerprint>.crt
        rebuilt with `update-ca-certificates`

      Fedora / RHEL
        /etc/pki/ca-trust/source/anchors/UniFi-Endpoint-<fingerprint>.crt
        rebuilt with `update-ca-trust extract`

      openSUSE / SLE
        /etc/pki/trust/anchors/UniFi-Endpoint-<fingerprint>.crt
        rebuilt with `update-ca-certificates`

  From that point the certificate is trusted for TLS validation by every
  program on the machine, not only by UniFi Endpoint - this is what lets the
  workspace inspect outbound TLS.

  Because this is a machine-wide change, the operation is gated on membership
  of the `unifi-endpoint` system group (created when the package is
  installed). A user who is not in that group cannot install a CA into the
  system trust store.

WiFi enterprise (WPA-Enterprise / 802.1X) authentication
  WiFi does NOT touch the system trust store. The workspace CA is written to
  a per-connection, root-owned file under /etc/pki/unifi-endpoint/nm-ca/ and
  is referenced only by that one NetworkManager connection, so the trust is
  scoped to a single network.

Removal
  CA certificates installed in the system trust store are removed, and the
  trust bundle is rebuilt, at removal time. When that happens depends on the
  packaging format:

      Debian / Ubuntu   on purge only:   sudo apt purge unifi-endpoint
      Fedora / RHEL      on removal:      sudo dnf remove unifi-endpoint
      openSUSE / SLE     on removal:      sudo zypper remove unifi-endpoint

  On Debian/Ubuntu a plain `apt remove` leaves the certificates in place;
  purge to fully revert the trust store. On rpm-based distributions the
  cleanup runs as part of a normal removal.

 -- Ubiquiti Inc. <support@ui.com>
