2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-09-04 20:17:55 +00:00
Commit Graph

20 Commits

Author SHA1 Message Date
Vinícius Ferrão 2487faa678 fix(rpm): preserve local xcat.conf changes across upgrades
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.
2026-08-27 01:46:17 -03:00
Vinícius Ferrão ddf4d35194 docs(httpd): align hardening guidance with defaults 2026-07-27 17:19:27 -03:00
Vinícius Ferrão 2915e9be0e Add xCAT TLS policy selection 2026-05-05 23:20:18 -03:00
Vinícius Ferrão 5035697e9b fix: disable Apache directory indexing on /install and /tftpboot
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
2026-05-03 23:01:01 -03:00
besawn 56ec84d294 Fixed typo in readthedocs SSL config page 2023-03-02 15:05:07 -05:00
besawn 074c9bb200 Spelling fixes in advanced/security docs 2022-02-10 10:03:42 -05:00
GONG Jie 18d4af9890 Update document for ssl_config 2019-03-13 17:25:08 +08:00
GONG Jie 1b12c54178 Remove trailing spaces in file docs/source/advanced/security/ssl_config.rst 2017-12-31 23:59:59 +00:00
GONG Jie 04b63284c9 Remove trailing spaces in file docs/source/advanced/security/security.rst 2017-12-31 23:59:59 +00:00
GONG Jie edf5f37751 Remove trailing spaces in file docs/source/advanced/security/certs.rst 2017-12-31 23:59:59 +00:00
robin2008 22c06a9039 secureroot doc 2018-06-22 17:34:46 +08:00
Victor Hu 3ea509cfa2 Add a section into RTD that explains to the users how to configure
xcatsslversion and xcatsslconfig.  Currently the only documentation
is in the security bulletins
2017-11-01 13:41:53 -04:00
Mark Gurevich f78c9320cc Fix links and formatting 2017-03-20 17:33:55 -04:00
immarvin 7b4fd3a4be add description of xCAT certs and their usage in xCAT SSL communication 2017-03-13 03:06:22 -04:00
Mark Gurevich a50f3710f7 Doc spelling and gramma fixes 2016-10-25 15:31:20 -04:00
wangxiaopeng 549b4951e3 Update doc page for security:
Load security page in the index.rst so that the security
  page can be displayed in the RTD.
2016-03-22 06:29:35 -04:00
hu-weihua a98b2cc78a Modify depending on Victor's comment 2016-01-19 21:06:54 -05:00
hu-weihua 372e241110 modify depending on daniceexi's comment 2016-01-14 21:48:37 -05:00
hu-weihua 0a33095fc1 add details for security doc 2016-01-13 23:52:10 -05:00
Victor Hu bb279bd76f Refactor the entire "Advanced" section of the documentation
- 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
2015-10-07 15:29:09 -04:00