Skip to content

Add /etc/pki/tls/certs/ directory to file checker#359

Merged
rcritten merged 1 commit intofreeipa:masterfrom
rcritten:issue_358
Jul 7, 2025
Merged

Add /etc/pki/tls/certs/ directory to file checker#359
rcritten merged 1 commit intofreeipa:masterfrom
rcritten:issue_358

Conversation

@rcritten
Copy link
Collaborator

@rcritten rcritten commented Jun 23, 2025

In order to load the CA bundle /etc/pki/tls/certs needs to be world-readable. That or the group needs to change if someone wants to get really restrictive but that's likely to cause further unforseen issues elsewhere. This directory contains only public information.

Restrictive permissions will cause pki-tomcatd to fail to start.

Fixes: #358

Summary by Sourcery

Add the OpenSSL certs directory to the permission checks to ensure /etc/pki/tls/certs is accessible, fixing related startup errors

Bug Fixes:

  • Prevent pki-tomcatd startup failures due to restrictive permissions on the OpenSSL certs directory

Enhancements:

  • Add /etc/pki/tls/certs to the file permission checker with 0755 permissions

In order to load the CA bundle /etc/pki/tls/certs needs to be
world-readable. That or the group needs to change if someone wants
to get really restrictive but that's likely to cause further
unforseen issues elsewhere. This directory contains only public
information.

Restrictive permissions will cause pki-tomcatd to fail to start.

Fixes: freeipa#358

Signed-off-by: Rob Crittenden <rcritten@redhat.com>
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @rcritten - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@flo-renaud
Copy link
Contributor

Hi @rcritten

thanks for the patch, LGTM. Tested on a f42 machine:

# chmod 754 /etc/pki/tls/certs/
# ipa-healthcheck --source ipahealthcheck.ipa.files --check IPAFileCheck
[
  {
    "source": "ipahealthcheck.ipa.files",
    "check": "IPAFileCheck",
    "result": "ERROR",
    "uuid": "e2f15cac-127f-452d-9cb0-ac63803949d9",
    "when": "20250702144613Z",
    "duration": "0.010254",
    "kw": {
      "key": "_etc_pki_tls_certs_mode",
      "path": "/etc/pki/tls/certs",
      "type": "mode",
      "expected": "0755",
      "got": "0754",
      "msg": "Permissions of /etc/pki/tls/certs are too restrictive: 0754 and should be 0755"
    }
  }
]
# chmod 755 /etc/pki/tls/certs/
# ipa-healthcheck --source ipahealthcheck.ipa.files --check IPAFileCheck
[]

@flo-renaud flo-renaud added the ack label Jul 2, 2025
@rcritten rcritten merged commit 0b3151a into freeipa:master Jul 7, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add /etc/pki/tls/certs/ directory to file checker

2 participants