New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 3 users
Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment
dpkg: install repository key in /etc/apt/trusted.gpg.d, not using apt-key
Reported by dmcbr...@gmail.com, Dec 10 2014 Back to list
UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36

Steps to reproduce the problem:
0. Provision a new Debian/Ubuntu machine, and add the Google Chrome repository.
1. Install the google-chrome-package package:

# apt-get install google-chrome-stable

2. Purge the google-chrome-stable package.

# apt-get purge google-chrome-stable

3. List the set of trusted APT keys:

# apt-key list

What is the expected behavior?
The Google APT key should have been removed from the system.

What went wrong?
The Google APT GPG key is still installed in /etc/apt/trusted.gpg, even after all Google packages have been uninstalled and purged:

pub   1024D/7FAC5991 2007-03-08
uid                  Google, Inc. Linux Package Signing Key <linux-packages-keymaster@google.com>
sub   2048g/C07CB649 2007-03-08

Did this work before? No 

Chrome version: 39.0.2171.71  Channel: stable
OS Version: Debian Sid
Flash Version: Shockwave Flash 15.0 r0

It should be true that the removal of all Google packages from a system should cause the Google GPG key to be removed from APT's trusted set of keys.  This is currently false.

The mechanism used by the Google Chrome Debian package to add the Google GPG key to the set trusted by APT is to invoke "apt-key".  This causes the Google key to be added to /etc/apt/trusted.gpg if it wasn't already present.

Nothing causes this key to automatically be removed.

This is understandable, as simply removing the key in the postrm script would break any other installed repositories that also depend on that key.  apt-key does not provide any mechanism for reference-counting.

I'd ask that the Google Chrome packaging be modified such that is installs the trusted GPG public-key as a separate file in /etc/apt/trusted.gpg.d, e.g. /etc/apt/trusted.gpg.d/google-chrome-stable.gpg.

This allows each package to maintain it's own set of trusted GPG keys and removes the need for reference-counting.

As a side effect, this also allows the ability to manage trusted APT keys using file-based configuration management tools.

 ~ ~ ~

Background context: we mirror Google repositories locally in an additive-only manner.  We re-sign the resulting repository indexes with our own credentials.

Therefore, we don't _want_ the Google repository to be directly configured on client machines, or have the Google GPG key installed.

(Also, if it is installed, we wish to be able to reverse this process in an unattended fashion.)

We're already using debathena configuration packages to manage configuration overrides.  

However, while undoing the configuration of the sources.list addition is straightforward — we can simply dpkg-divert the relevant file — we cannot use the same technique to disable the GPG key.

(We could manually remove the key using a script attached to the package — but this would be brittle, as the package would silently fail to do the right thing in the event that the upstream GPG key(s) were updated.)
 
Comment 1 by mmoss@chromium.org, Dec 10 2014
Cc: thestig@chromium.org mmoss@chromium.org phajdan.jr@chromium.org
Status: Untriaged
Comment 2 by mmoss@chromium.org, Dec 10 2014
Labels: Cr-Internals-Installer
Status: Available
Seems reasonable.
Comment 4 by binjin@chromium.org, Dec 11 2014
Labels: -Cr-Enterprise
Project Member Comment 5 by sheriffbot@chromium.org, Mar 17 2016
Labels: Hotlist-Recharge-Cold
This issue has been available for more than 365 days, and should be re-evaluated. Hotlist-Recharge-Cold label is added for tracking. Please re-triage this issue.

For more details visit https://sites.google.com/a/chromium.org/dev/issue-tracking/autotriage - Your friendly Sheriffbot
Please do this, we are looking at dropping the gpg dependency from APT which means 'apt-key add' won't work anymore. (The package also does not depend on APT, BTW, despite running APT tools...)
Comment 7 by mmoss@chromium.org, May 2 2016
Cc: -mmoss@chromium.org
Owner: mmoss@chromium.org
Cc: thomasanderson@chromium.org
Components: Infra>Puppet
Owner: ----
Components: -Infra>Puppet
Project Member Comment 11 by sheriffbot@chromium.org, Aug 4
Status: Untriaged
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Cc: mmoss@chromium.org
Labels: -Hotlist-Recharge-Cold
This should really get addressed. The sooner the better.
Sign in to add a comment