Why the complex `apt-key` command in the repository instructions?

I was wondering why the DEB repository instructions contain the following:

curl https://downloads.plex.tv/plex-keys/PlexSign.key | sudo apt-key add -

One of the key reasons to sign packages is to ensure nothing nefarious is happening by virtue of an as-yet-unknown third party. Using the signing key’s ID rather than a URL hosted within the Plex infrastructure helps ensure that people can detect tampering since the key ID should (ideally) never change.

As apt-key is already in use, why not use it fully?

sudo apt-key adv --keyserver hkps://keyserver.ubuntu.com --recv 97203C7B3ADCA79D

Doing so would make other distributions and NAS vendors dependent on Ubuntu.

The key is hosted at Plex, the way it is, to be vendor agnostic.

Ubuntu isn’t the only keyserver available; theirs just tends to be the most responsive. Your key is mirrored across all of them, it appears.

In a future version of apt-key, the keyserver won’t need to be specified any longer, as it will handle HKPS properly without needing to use the adv option.

But if the goal is to not appear Ubuntu-specific, you could reference the full OpenPGP keyserver pool:

apt-key adv --keyserver hkp://pool.sks-keyservers.net --recv 97203C7B3ADCA79D

I’m aware that’s it a pretty worst-case scenario that your key and package will both be compromised, but that’s pretty much the case that signing is meant to prevent in the first place. :confused:

Also, since I have your ear: the instructions say to write to /etc/apt/sources.list.d/plexmediaserver.list. However, the package also provides a configuration file for that location, and that file has the repo’s source disabled/commented by default. This might be a surprising situation for some, as it is not documented on the page that the repo may disable itself upon package installation.

1 Like

Plex’s Engineering department decided to keep all keys related to Plex on the same download site as the packages.

When the keys are stored at the source, you know they’re authentic.

Trying to move this point forward will likely be like moving a mountain.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.