#2124 Incorrect perms on hub/web config
Closed: Fixed by tkopecek. Opened by mikem.

In our koji.spec, we install hub.conf and web.conf with default permissions, which works out to 0644 root:root. I.e. world readable.

However, these files can contain secrets, and in fact our example configs include commented examples of sensitive options in both of these files.

In hub.conf:

##  Basic options  ##
DBName = koji
DBUser = koji
#DBHost = db.example.com
#DBPort = 5432
#DBPass = example_password
KojiDir = /mnt/koji

In web.conf:

# This must be changed and uncommented before deployment
# Secret = CHANGE_ME

We should default to encouraging better security. Probably the simplest thing is to change these files to be 0640 root:apache. They should be readable (but not writable) by apache and not world-readable.

Alternately, we could package a separate secrets.conf under conf.d for both services.

We should also improve some docs related to this:

  • emphasize the need for stricter permissions next to the sensitive options in our example configs
  • include a note about these permissions in the docs
  • document the use of conf.d directories

Metadata Update from @mikem:
- Custom field Size adjusted to None
- Issue set to the milestone: 1.23 (was: 1.22)

Metadata Update from @tkopecek:
- Issue set to the milestone: 1.22.1 (was: 1.23)

Metadata Update from @tkopecek:
- Issue private status set to: False (was: True)

PR #2474

Commit 75e46256 fixes this issue

Commit e72a7be0 fixes this issue

This issue has been migrated to Fedora Forge:
https://forge.fedoraproject.org/koji/koji/issues/2124

Please continue any further discussion there.

Metadata
Related Pull Requests