It was found that the private key for the agent certificate was contained in a world-readable file. A local user could possibly use this flaw to gain access to the private key information in the file.
It was reported that certificate that identifies agent is written to etc/pki/pulp/consumer/consumer-cert.pem with 644 permissions and contains also the private key, making it world-readable.
Created attachment 1146527[details]
Proposed patch
This fixes the issue where new certificates and keys are written with 644 permissions, but it doesn't do anything for all the keys and certificates that already exist.
From a security perspective, the current proposed patch seems OK, but I believe this code needs to be able to work in Python 2.4 (RHEL 5) which does not have the with statement available.