RFE: Add configurable signature checking policies

Bug #637224 reported by Jeff Johnson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
RPM
In Progress
High
Jeff Johnson
CentOS
New
Unknown
Fedora
Won't Fix
Medium

Bug Description

tracker

Tags: rpm.org sign
Revision history for this message
In , Aleksey (aleksey-redhat-bugs) wrote :

It would be nice to be able to add something to a config file that would make
the "require a valid signature" a *local* default.

IMHO, this might be implemented as a configuration/macro variable that specifies
how much attention should be payed to signatures. The values should probably be:

- ignore (do not check the signatures unless explicitly requested - e.g.
pre-4.1 behavior).
- warn (current Limbo behavior)
- error (abort if signature is present, but can not be checked or fails)
- require (same as "error", but also abort if no signature present).

( According to Jeff Johnson, lib/package.c already contains a comment:
  /** @todo Implement disable/enable/warn/error/anal policy. */ )

It should be possible to specify the value of this macro both in a config file
(which would ship with "warn" by default) and on command line (with command line
taking precedence)...

This way for people who do not care that much it would look identical to how it
looks right now, but people who care more, can always replace "warn" with
"error" or "require" in their config files (and still be able to override it on
command line when desired).

Revision history for this message
In , Jeff (jeff-redhat-bugs) wrote :

rpm-4.1-0.53 now has more mechanism (not policy, yet)
to configure checking headers retrieved when 1st encountered.

Revision history for this message
In , Jeff (jeff-redhat-bugs) wrote :

Created attachment 66845
hdrchk configuration and simple benchmark

Revision history for this message
In , Jeff (jeff-redhat-bugs) wrote :

OK, the hdrchk mechanism has been simplified/generalized
so that headers are signature checked on all import pathways,
and on database export pathways, all per-mode configurable.

Wiring the policy of what ignore/warn/error/require action
to take with OK/UNTRUSTED/NOKEY/BAD events is gonna take
a bit more time to implement, particularly since rpm has
not a clue ATM about UNTRUSTED.

The other major problem is drilling the policy up through
applications (very few ATM) that use rpm-4.1. That's gonna
take some time and patience and porting as well.

Deferred until rpm-4.2.

Revision history for this message
In , Aleksey (aleksey-redhat-bugs) wrote :

> Deferred until rpm-4.2.

Rawhide has 4.2-0.5 now, reopening.

Revision history for this message
In , Bastien (bastien-redhat-bugs) wrote :

Moving to the Enterprise version.

Revision history for this message
In , Jeff (jeff-redhat-bugs) wrote :

--signature is not the reverse of --nosignature, as it implies
mandatory failure on certain conditions; rpm default behavior
already verifies signatures as present.

The option, if attempted, also needs to be peristently configurable.
My original thoughts were to set up bit masks for each of the
failure modes for each of the modes of rpm for each of the 4
signatures/digests so that the user could, say, permit query
with a warning, but prevent install independently.

Most of this mechanism is already implemented, what remains is to
design the error return path ways for FAILNOW, exit(1) within rpmlib
is not good enough, nor is a secret side effect like skipping
a package. That is basically my comment cited above
      disable/enable/warn/error/anal
where the "error/anal" behaviors are not yet implemented.

The inertia to change comes from the plethora of applications
that are using rpm, where each and every application is attempting
a different form of key ring management, and hence has a different
meaning for TRUSTED.

Revision history for this message
In , Jeff (jeff-redhat-bugs) wrote :

rpmlib does exit(1) only for OOM, been that way for long time now.

OTOH, immediate exit is essentially what the "anal" level is about,
where an instant and immediate full stop may be appropriate.

"error" returns an error code from rpmlib. The rate limiting steps are that
the rpmlib API is not adequate to return well-defined error codes
on well-known pathways. The other impediment is that new error
returns must be taught to all applications that use rpmlib.

Revision history for this message
In , Robert (robert-redhat-bugs-1) wrote :

This feature is not far enough along for U4. Because the deadline is today,
moving to RHEL3 U5 as a candidate.

Revision history for this message
In , Robert (robert-redhat-bugs-1) wrote :

Closing because of lack of customer/partner demand.

Revision history for this message
In , Robert (robert-redhat-bugs-1) wrote :

Reopening and moving to Fedora at request of originator.

Revision history for this message
In , Red (red-redhat-bugs) wrote :

REOPENED status has been deprecated. ASSIGNED with keyword of Reopened is preferred.

Revision history for this message
In , Red (red-redhat-bugs) wrote :

User <email address hidden>'s account has been closed

Revision history for this message
In , Panu (panu-redhat-bugs) wrote :

Reassigning to owner after bugzilla made a mess, sorry about the noise...

Revision history for this message
In , Panu (panu-redhat-bugs) wrote :

Fixing summary to something more sensible..

Revision history for this message
In , Panu (panu-redhat-bugs) wrote :

Moved to upstream tracking: http://rpm.org/ticket/29

Jeff Johnson (n3npq)
tags: added: rpm.org sign
Changed in centos:
status: Unknown → New
Jeff Johnson (n3npq)
Changed in rpm:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Jeff Johnson (n3npq)
Changed in fedora:
importance: Unknown → Medium
status: Unknown → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.