Bug 1661339

Summary: krb5 pkinit_anchors should default to FILE:/etc/pki/tls/certs/ca-bundle.crt
Product: Red Hat Enterprise Linux 8 Reporter: Robbie Harwood <rharwood>
Component: krb5Assignee: Robbie Harwood <rharwood>
Status: CLOSED ERRATA QA Contact: Patrik Kis <pkis>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.1CC: dpal, fedoraproject, ksf, pkis, ralston
Target Milestone: rc   
Target Release: 8.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: krb5-1.17-7.el8 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: 1661338 Environment:
Last Closed: 2019-11-05 21:29:55 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1682282    
Bug Blocks:    

Description Robbie Harwood 2018-12-20 21:44:17 UTC
+++ This bug was initially created as a clone of Bug #1661338 +++

krb5 pkinit_anchors should default to FILE:/etc/pki/tls/certs/ca-bundle.crt

When setting up a system for pkinit, it seems odd that the trusted anchors doesn't default to the system provided trust anchors.  This can lead to extra configuration work on the users to set a system expected value.

krb5 should default kinit_anchors to the official ca-bundle packaged with the distribution.

Comment 10 Robbie Harwood 2019-10-02 16:25:10 UTC
*** Bug 1757506 has been marked as a duplicate of this bug. ***

Comment 11 James Ralston 2019-10-02 22:12:35 UTC
Please do not do this.

Unless krb5 was updated between 1.15.1-37.el7_7.2 and 1.16.1-22.el8, the behavior of pkinit.so is to include *every* CA certificate discovered by the pkinit_anchors setting in the AS-REQ request.

ca-bundle.crt currently has around 138 certificates. For a large site, setting pkinit_anchors to FILE:/etc/pki/tls/certs/ca-bundle.crt is effectively a DoS amplification attack against the KDC.

As long as pkinit.so sends every CA certificate it can find in the AS-REQ request, pkinit_anchors should only be set by the local administrator, to contain only the CA certificates that need to be present for the particular smartcard in use. It should not be set globally.

Additionally, note that when the parser encounters the syntactically incorrect "pkinit_anchors = /etc/pki/tls/certs/ca-bundle.crt" setting, it silently aborts the PKINIT attempt, which is fiendishly difficult to debug.

For more details, see BZ#1757506.

Comment 12 Robbie Harwood 2019-10-03 17:48:06 UTC
You've provided the same comment on multiple bugs, but I'm going to keep replies here.  Please note that *this is the bug for the issue you filed* - it doesn't help to point out that it's an issue.  I already know that :)

If pkinit is to be used, one of two things must be true: either the certificates are anchored into the default trust, or they aren't.  If they are, then this speeds up configuration.  But if they're not, the admin would have had to perform additional configuration anyway - the defaults didn't work for them before, and they don't work now.

Do you actually observe slowdown in a case where the default configuration would work for you?  cacert processing should be very fast on modern machines.

Comment 14 errata-xmlrpc 2019-11-05 21:29:55 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:3516