The security page said xcatd runs in unconfined_service_t and that
xCAT-selinux defines no type. The module defines xcat_t for xcatd and
the client commands, and xcat_image_t for the image build, and declares
both permissive. The older page placed a service node and a compute node
outside the scope because xCAT does not select their mode, and the branch
ships noderes.selinux and site.selinux.
Both pages now state what the module does: the two permissive domains,
the transitions to tftpd_t and chronyd_t for the services xCAT starts,
the mode a node resolves, and the goal of an enforcing management node.
The scope page also records that a published common or overlay directory
of an image root called rootimg is unlabeled, for the same reason as a
published kernel there.
selinux_docs.t fails 6 of its 18 checks without this change, on rome01.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
The branch changed what a cluster runs and added no documentation, while
the quick start guide still told the operator to write SELINUX=disabled
on the management node before installing xCAT.
docs/source/advanced/security/selinux.rst says which machine gets which
mode, why a stateless node runs with SELinux disabled, how to set
noderes.selinux and site.selinux, and that xcatd, in.tftpd, kea-dhcp4
and goconserver run in unconfined_service_t, so the work is about
running with SELinux enforcing and not about confining xCAT.
It also covers the upgrade: recordselinuxdefault runs on INITIALINSTALL
only, so an upgraded cluster has no site.selinux value, every node keeps
being provisioned with SELinux off, and reprovisioning is what gives a
node the new mode.
The quick start step now says SELinux can stay enabled and links there.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
xcat.conf was installed as an ordinary payload file and then deleted and
recreated from the Apache-version template in %post. rpm therefore held
no record of what was on disk, and an upgrade replaced an edited file
silently, leaving neither .rpmnew nor .rpmsave. A site that had added
Indexes to the /install block lost it on upgrade and directory listings
began returning 403.
Select the Apache 2.2 or 2.4 configuration at build time, using the same
distribution macros the rest of the spec already relies on, and mark
both /etc/httpd/conf.d/xcat.conf and /etc/apache2/conf.d/xcat.conf as
%config(noreplace). rpm then keeps a modified file and installs the new
vendor version alongside it as xcat.conf.rpmnew.
The old payload recorded the 2.2 file while %post wrote the 2.4 one, so
rpm cannot distinguish a stock file from an edited one across the
transition. A migration compares the active file with the templates the
outgoing package saved under conf.orig and removes it only when it is a
regular file still byte-for-byte identical to one of them. A stock
upgrade then completes without an unnecessary .rpmnew, and anything that
differs is left untouched.
That migration runs in %pretrans, not %pre. rpm fixes each config file's
fate before %pre, so removing the active file there can happen after rpm
has already resolved to write only xcat.conf.rpmnew, leaving the system
with no active configuration at all. %pretrans runs before that decision.
It is an embedded Lua scriptlet because a pre-transaction scriptlet
cannot rely on any dependency being unpacked yet, which also means the
comparison needs no external tool.
bc was needed only by the version check the service-node package no
longer performs.
The Apache directives are unchanged. Document a later-loading conf.d
file as the place for site rules, since that survives upgrades without a
merge.
The default xCAT Apache configuration shipped with Options Indexes
enabled for the /install and /tftpboot directories. This allowed
unauthenticated users to browse directory listings, disclosing the
full tree of postscripts, boot files, and (in production deployments)
potentially kickstart files with password hashes, custom scripts with
embedded credentials, and cluster topology details.
Replace Options Indexes with -Indexes in all four shipped Apache config
files (MN and SN, Apache 2.2 and 2.4 variants). Direct file access
by known path continues to work, so all provisioning workflows are
unaffected. Directory browsing for /xcat-doc is preserved as it
contains only public documentation.
Additionally, add an Apache hardening guide documenting recommended
permissions for sensitive directories under /install, network binding
best practices, and IP-based access control options.
Addresses #7450
- categorize into topics without "xCAT" in the heading
since the topics are all related to xCAT
- Alphabetize the topics to make it easier to find
- create sub directories for the topics to contain
the documentation
- broke down some of the docs to multiple files to help
ease of readability