summaryrefslogtreecommitdiff
path: root/ext/rack
AgeCommit message (Collapse)AuthorFilesLines
2014-07-03(PUP-2177) Change Crypto Spec in accordance to bettercrypto.orgAaron Zauner1-2/+2
We provide an Apache vhost configuration for users that want to run a Puppet master using Apache and Passenger. The configuration was added in d85d73c (five years ago, roughly) and set the SSLProtocol and SSLCipherSuite directives using the assumptions about cryptography at the time. As part of PUP-2582 commit 05af20b70 updated the SSL cipher suite and protocol settings to remove some of the most vulnerable ciphers, but still contained some relaxed settings to ensure compatibility with as many platforms as possible. -- Summary This commit updates the SSLProtocol and SSLCipherSuite directives to ensure we only use secure ciphers while continuing to function on all supported platforms. The most notable difference is that this change switches the cipher selection from a blacklist where all ciphers are added and then selectively removed, to a whitelist where only known safe ciphers are allowed. The cipher suite has been selected using the guidelines laid out by the Applied Crypto Hardening paper[0]. -- Overall cipher selection This cipher suite was chosen by selecting for the following criteria: * TLS 1.0, 1.1, 1.2 * Perfect forward secrecy/ephemeral Diffie Hellman where possible * Preferring strong MACs (SHA-2) where possible * GCM as the authenticated encryption scheme where possible * Always falling back to reasonably acceptable schemes for maximum platform compatibility The resulting cipher suite has the following implications: TLSv1.2 is preferred over TLSv1.0, but is still provides reasonable ciphers with TLSv1.0. -- Key exchange Ephemeral Diffie Hellman and Ephemeral Elliptic Curve Diffie Hellman are used for key exchange. EDH is preferred over EECDH due to ongoing concerns with potential weaknesses in elliptic curve cryptography, but EECDH is still included due to the performance benefits of EECDH over EDH.[1] Non-ephemeral Diffie Hellman is not used to ensure perfect forward secrecy. If EDH or EECDH are not available, key exchange will be done using RSA for compatibility with legacy SSL libraries. -- Authentication RSA is used for authentication as it works in most of today's setups and modern implementations are resistant to attack for the foreseeable future. -- Encryption AES256 and CAMELLIA256 count as very strong ciphers at the moment, but if these algorithms are not available then AES128 or CAMELLIA128 will be used as fallbacks since they are still reasonably strong. CAMELLIA is preferred over AES due to the decision by NSS to prefer CAMELLIA, with the following rationale: National ciphers such as Camellia are listed before international ciphers such as AES and RC4 to allow servers that prefer Camellia to be able to negotiate Camellia without having to disable AES and RC4, which are needed for interoperability with clients that don't yet implement Camellia.[2] -- Message Authentication (MAC) Message authentication prefers AEAD with GCM, and then falls back to SHA256. If ECDHE is used SHA384 will be used when available. If no better option is available SHA1 will be used. -- Fallback When no better cipher is available, CAMELLIA128-SHA and then AES128-SHA (with RSA for authentication) will be used, for cases such as OpenSSL 0.9.8 which does not provide support for ECC and TLSv1.1 or above. -- Blacklisted algorithms On top of the algorithms blacklisted in 05af20b7, ECDSA has been disabled due to outstanding concerns about weaknesses to cache timing attacks.[3] [0] "Applied Crypto Hardening": https://bettercrypto.org/static/applied-crypto-hardening.pdf [1] "A Note on Elliptic Curve Cryptography" "Applied Crypto Hardening section 3.7" [2] "Document the policy for the order of cipher suites in SSL_ImplementedCiphers.": https://bugzilla.mozilla.org/show_bug.cgi?id=430875 [3] "How to design an elliptic-curve signature system" http://blog.cr.yp.to/20140323-ecdsa.html Thanks to Aaron Zauner <azet@azet.org> and bettercrypto.org for generating and submitting the updated cipher suite. Commit message amended by Adrien Thebo <adrien@puppetlabs.com>
2014-05-27(PUP-2533) Apache 2.4 requires explicit CRL configurationAdrien Thebo1-0/+4
In Apache 2.2, if either the SSLCARevocationFile or SSLCARevocationPath directives were specified then the specified file(s) would be checked when establishing an SSL connection. Apache 2.4+ the SSLCARevocationCheck directive was added to control how CRLs were checked when verifying a connection and had a default value of none. This means that Apache defaults to ignoring CRLs even if paths are specified to CRL files. This commit updates the debian postinst script for the puppetmaster-passenger package to set SSLCARevocationCheck directive to 'chain' when Apache 2.4 is installed. This ensures that the the puppetmaster-passenger vhost respects CRL files in the same way that Apache 2.2 does by default. Apache 2.2
2014-05-15(PUP-2582) Update apache vhost SSL settingsMatthaus Owens1-2/+3
Previously the apache vhost defined an SSLCipherSuite which included several weak ciphers. This commit disables the following algorithms: aNULL, eNULL, DES, 3DES, IDEA, SEED, DSS, PSK, RC4, MD5 Second, previously LOW, SSLv2, and EXP were removed, but not killed from the list, which meant that they could be added again in subsequent declarations. Third, ALL:!ADH meant that AECDH was enabled. This commit uses !aNULL to disable all anonymous authentication algorithms. It also explicitly specifies !eNULL (anonymous encryption algorithms). Fourth, we were only enabling SSLv3 and TLSv1, but not TLSv1.1 or TLSv1.2. TLSv1.2 protects against attacks known to work against SSLv3 and TLSv1.0. Finally, SSLHonorCipherOrder is set to on, because certain clients do not send ciphers in the correct preferred order, and this setting will help mitigate that problem. Thanks to Aaron Zauner <azet@azet.org> for bringing this to our attention.
2013-11-01(maint) Remove stale files from ext/rackNick Fagerlund4-117/+6
The ext/rack directory had an outdated README file and an ancient manifest.pp file, and the useful files (config.ru and the example vhost) were buried in a subdirectory. This commit removes the old files, moves the good files up a level, and adds a comment to the vhost pointing to the maintained passenger documentation.
2012-10-11(Maint) Update config.ru to fix issue with vardirJeff McCune1-2/+4
Without this patch the config.ru example only contains the --confdir argument. This is a problem because when Puppet starts from config.ru, it will automatically be switched by Passenger to the EUID of the owner of the file. Puppet will still try to write to the default vardir of ~/.puppet/ in this situation which may be a problem because $HOME might be ~root. This patch fixes the problem by adding the --vardir option to the example with the default value of /var/lib/puppet
2012-10-08(#16801) Remove mongrel referencesJosh Cooper1-15/+0
Remove references to mongrel setups, which are no longer supported.
2012-09-06(#7962) Added certificate expiration checks.Steven Lindberg1-1/+2
Warnings are logged both when receiving a request and issuing a request so that both the master and agent logs contain warnings. This increases visibilty since the master logs are looked at more frequently, but also ensures that the warnings make it into agent reports. The new `Puppet::Network::Authentication` module contains the logic for logging the expiration warnings (certificates are part of the authentication process, hence the name). It uses a rate-limited logger so that identical warnings as a result of multiple requests in the same run are not logged. The minimum time between log messages is set to the `runinterval` setting, since it is a good tradeoff between ensuring visibility and noisiness.
2012-08-05(#15337) Do not merge user and system puppet.confJeff McCune1-0/+3
Puppet 3.x reads settings from both ~/.puppet/puppet.conf and the system puppet.conf without this patch applied. This is a problem because it makes it difficult to determine where to load plugins and extensions from at runtime. Merging the configuration file also makes it more difficult to explain where a particular setting is taking effect. This patch makes the intended `puppet.conf` reading behavior the following: 1: If provided, use explicit puppet.conf in `--confdir` 2: If root, use system puppet.conf 3: Otherwise, use ~/.puppet/puppet.conf This patch also changes the behavior of rack puppet master applications. We now intended for the rack configuration file, `config.ru` to explicitly set `--confdir` to avoid reading from `~/.puppet/puppet.conf`. Please see the example in `ext/rack/files/config.ru` for an up to date rack configuration.
2012-08-05(Maint) Use $LOAD_PATH instead of $:Jeff McCune1-1/+1
This is just slightly more readable.
2012-05-22(#14609) Fix master initialization when running under Passengercprice1-2/+17
There is some initialization that happens in CommandLine.rb (such as parsing the puppet config file) which was being bypassed when launching puppetmaster as a Rack/Passenger app. This commit tweaks the rack config to call into CommandLine directly, which is unfortunate but works for now.
2012-03-28(#12466) unset X-Forwarded-For headerMoses Mendoza1-0/+3
Without this patch the handling of X-Forwarded-For headers is insecure in a default apache conf supplied with puppet. This patch ensures X-Forwarded-For headers are dropped. Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
2011-11-11Added missing RequestHeader entries to ext/rack/files/apache2.confEli Klein1-0/+4
2010-08-13Fixed #4527 correctly for 2.6.1James Turnbull1-1/+0
2010-08-13Updated config.ru example for 2.6.1James Turnbull1-1/+1
2010-07-21Fixed example config.ruJames Turnbull1-3/+2
2009-11-18rack: SSL Env vars can only be in Request.envChristian Hofstaedtler1-2/+2
This reverts commit c702f76b271515e9c42dcb923d379fbfac4c83cd and turns it into a documentation only fix. As it turns out, ENV should have never been used at all, as the Rack docs say nothing about it *and* Passenger's behaviour in 2.2.3 + 2.2.4 was completely broken and still is half-way broken in 2.2.5 (but is OK with the Rack specs).
2009-08-03rack: SSL Env vars can be in Request.env or ENVChristian Hofstaedtler1-4/+7
Fix #2386, by checking either Request.env or ENV for the SSL environment variables. This is necessary as Passenger 2.2.3 changed the location of these vars, even though the Rack spec says nothing about ENV or these variables.
2009-07-30Fix #2467 - rack: suggest putting puppet/lib at beginning of RUBYLIB search pathMarc Fournier1-1/+1
If you happen to already have puppet code somewhere in your ruby path, you might get unexpected behaviour when trying to run puppetmaster with passenger. Suggesting that the path to puppet/lib gets prepended instead of appended to RUBYLIB could save time to some. Signed-off-by: Marc Fournier <marc.fournier@camptocamp.com>
2009-07-23Fixes #2430 - Stock apache2.conf for passenger incorrectJames Turnbull1-9/+11
2009-06-06Removed extra whitespace from end of linesIan Taylor2-7/+7
2009-05-02puppetmasterd can now run as a standard Rack application (config.ru-style)Christian Hofstaedtler4-0/+183