summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Fixing #2200 - puppetqd expects Daemon to be a classLuke Kanies2009-05-042-10/+197
| | | | | | | | | | | I *swear* I wrote tests for the daemon, but I can't find them in any of my branches so I rewrote them. In the course of writing them, I also fixed the usage of Daemon. Signed-off-by: Luke Kanies <luke@madstop.com>
* Removing unneeded test stubsLuke Kanies2009-05-031-8/+0
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #2195 - the Server class handles bindaddressLuke Kanies2009-05-033-45/+47
| | | | | | | The Server class has all of the logic now, instead of doing weird things in the defaults. Signed-off-by: Luke Kanies <luke@madstop.com>
* Minor fixes to function RST documentationJames Turnbull2009-05-031-2/+4
|
* Remove the old 0.24.x rack support, which is now useless cruftChristian Hofstaedtler2009-05-024-280/+0
|
* puppetmasterd can now run as a standard Rack application (config.ru-style)Christian Hofstaedtler2009-05-026-5/+241
|
* Add XMLRPC compatibility for RackChristian Hofstaedtler2009-05-024-1/+271
|
* Puppet as a Rack applicationChristian Hofstaedtler2009-05-026-0/+403
| | | | | | | This lays the ground: a wrapper for the REST handler, and an application confirming to the Rack standard. Also includes a base class for Rack handlers, as RackREST will not stay the only one, and there needs to be a central place where client authentication data can be checked.
* Use FileCollection to store the pathname part of filesBrice Figureau2009-05-021-0/+12
| | | | | | | | | | | | | Using the FileCollection to store the path parts allows to represent a common path prefix by an integer. This way the memory used to manage deep hierarchies is reduced. The reduction factor depends on the number of managed files per directories: the more files in a directory, the more they will share the same common prefix, and the better we'll gain. Early tests on a 5 level deep hierarchy containing 100 files per level show about a 50% less memory consumption. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Add an unmunge capability to type parameters and propertiesBrice Figureau2009-05-024-3/+43
| | | | | | | | | | | | | Unmunge is the reverse of munge. While munge allows the type to return a different parameter value or properties should than the one it was created with, unmunge does the reverse. It can be used for instance to store a value in a different representation but still be able to return genuine value to the outside world. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix #2218 - Ruby YAML bug prevents reloading catalog in puppetdBrice Figureau2009-05-025-34/+36
| | | | | | | | | | | | | | | | | | | Because of ruby bug: http://rubyforge.org/tracker/?group_id=426&atid=1698&func=detail&aid=8886 and http://redmine.ruby-lang.org/issues/show/1331 YAML dump of hashes using ruby objects as keys is incorrect leading to an error when deserializing the YAML in puppetd. The error is easy to correct by a post-process fix-up of the generated YAML, which transforms: &id004 !ruby/object:Puppet::Relationship ? to the correct: ? &id004 !ruby/object:Puppet::Relationship Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fixes #2209 - Spec is failing due to a missing requireStéphan Gorget2009-05-021-0/+1
|
* Fix #2207 - type was doing its own tag management leading to subtile bugsBrice Figureau2009-04-293-36/+34
| | | | | | | | | This patch moves Type to use Puppet::Util::Tagging as the other part of Puppet. This brings uniformity and consistency in the way the tags are used and/or compared to each other. Type was storing tags in Symbol format, which produced #2207. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Moved puppetqd binaryJames Turnbull2009-04-281-0/+0
|
* Fixed #2188 - Added set require to simple_graph.rbJames Turnbull2009-04-271-0/+1
|
* Fixed puppetqd require and tweaked stomp library error messageJames Turnbull2009-04-261-5/+5
|
* Fixes #2196 - Add sharedscripts directive to logrotateJames Turnbull2009-04-261-0/+1
|
* Added puppetqd binary to RakefileJames Turnbull2009-04-261-0/+1
|
* Updated version to 0.25.0beta1James Turnbull2009-04-251-1/+1
|
* Updates to CI tasksJames Turnbull2009-04-251-22/+9
|
* Fixing #2183 - checksum buffer size is now 4096bLuke Kanies2009-04-242-2/+3
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #2187 - Puppet::Resource is expected by Rails supportLuke Kanies2009-04-245-14/+104
| | | | | | | | | | | | | We previously used and expected Puppet::Parser::Resource instances, but 0.25 converts them all to Puppet::Resource instances before they're passed out of the compiler, so the Rails integration had to be changed to expect that. There's still some muddling, because the rails resources only generate parser resources, but that works for now because that's what we expect when collecting resources. Signed-off-by: Luke Kanies <luke@madstop.com>
* Adding an 'Exported' attribute to Puppet::ResourceLuke Kanies2009-04-242-1/+12
| | | | | | This is required for Rails support. Signed-off-by: Luke Kanies <luke@madstop.com>
* Removing a non-functional and horrible testLuke Kanies2009-04-241-73/+0
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Making sure the cert name is searched firstLuke Kanies2009-04-242-15/+26
| | | | | | | | | | | The cert name should be searched first in default circumstances, even if it disagrees with the hostname. Brice's change to the way catalogs are searched for didn't quite work when the hostname and certname didn't agree *and* the certname was fully qualified. Signed-off-by: Luke Kanies <luke@madstop.com>
* Removing an "inspect" method that often failed in testingLuke Kanies2009-04-241-4/+0
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Removing deprecated concurrency setting usage in railsLuke Kanies2009-04-242-8/+0
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Always making sure graph edges appear firstLuke Kanies2009-04-242-1/+18
| | | | | | | If we don't do this, there's a chance we'll get hit by the ruby yaml bug again. Signed-off-by: Luke Kanies <luke@madstop.com>
* Reverting part of the switch to sets in SimpleGraphLuke Kanies2009-04-241-3/+3
| | | | | | | | | Unfortunately, again because of a Ruby bug (http://rubyforge.org/tracker/?group_id=426&atid=1698&func=detail&aid=8886) Ruby can't print yaml that it can read, if custom classes are used as keys in hashes, which Sets use internally. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing rails feature testLuke Kanies2009-04-242-6/+8
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Failing to enable storeconfigs if ActiveRecord isn't availableLuke Kanies2009-04-252-0/+8
| | | | | | This is the last step to fixing #2189. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing the Rails feature test to require 2.3.xLuke Kanies2009-04-251-17/+4
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Modifying the Settings#handlearg prototypeLuke Kanies2009-04-252-2/+16
| | | | | | | | I'd made the argument no longer optional because I thought the method was rarely used, but it's used in puppetd a good bit. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixes #2172 - service provider for gentoo fails with ambiguous suffixesJames Turnbull2009-04-241-1/+1
|
* SMF import support working and documentation updateBryan Allen2009-04-241-0/+20
|
* Fixes #2145 and #2146Bryan Allen2009-04-242-37/+60
| | | | | Adds manifest param for service type, defines a command or manifest to set up a service Add service setup (import) support
* Fix configurer to retrieve catalog with client certnameBrice Figureau2009-04-232-4/+4
| | | | | | | | | | | | | | | | | Rationale: Before this change, the catalog was retrived with this uri: /catalog/hostname On the server side, the corresponding node was found by using the request node, then finding if this node also match hostname (which it does of course). But it is not possible to have an ACL matching the hostname part of the uri, because it: * it would be compared to the node name (certname), which obviously is not the same * it is not possible to create a dynamic allow/deny rule on a non-fqdn Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Unify auth/unauthenticated request authorization systemBrice Figureau2009-04-235-97/+110
| | | | | | | | | | | | | Before this change, unauthenticated REST requests where inconditionnaly allowed, as long as they were to the certificate terminus. This could be a security hole, so now the REST requests, authenticated or unauthenticated are all submitted to the REST authorization layer. The default authorizations now contains directives to allow unauthenticated requests to the various certificate terminus to allow new hosts. The conf/auth.conf file has been modified to match such defaults. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Allow REST auth system to restrict an ACL to authenticated or ↵Brice Figureau2009-04-234-12/+116
| | | | | | | | | | | | | unauthenticated request Introduces a new auth.conf directive (auth or authenticated) which takes an argument (on,yes/off,no/all,any). This can be used to restrict an ACL to only some state of authentication of a REST request, or any. If no auth directive is given, the ACL will only trigger for authenticated requests. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fill REST request node with reverse lookup of IP addressBrice Figureau2009-04-236-4/+46
| | | | Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Refactor rest authorization to raise exceptions deeperBrice Figureau2009-04-2315-137/+213
| | | | | | | | | | | | | The idea is to raise an AuthorizationException at the same place we check the authorization instead of in an upper level to be able to spot where the authorization took place in the exception backtrace. Moreover, this changes also makes Rights::allowed? to return the matching acl so that the upper layer can have a chance to report which ACL resulted in the match. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Add environment support in the REST authorization layerBrice Figureau2009-04-237-22/+78
| | | | | | | | | With the help of the new auth.conf directive 'environment', any ACL can now be restricted to a specific environment. Omission of the directive means that the ACL will apply to all the defined environment. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix some indirector failing testsBrice Figureau2009-04-235-5/+19
| | | | | | | The authorization system should stubbed to let all the rest tests to succeed :-) Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix #1875 - Add a REST authorization systemBrice Figureau2009-04-238-1/+406
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces a new configuration file (and configuration setting to set it). Each REST request is checked against this configuration file, and is either allowed or denied. The configuration file has the following format: path /uripath method <methods> allow <ip> or <name> deny <ip> or <name> or path ~ <regex> method <methods> allow <ip> or <name> deny <ip> or <name> where regex is a ruby regex. This last syntax allows deny/allow interpolation from the regex captures: path ~ /files[^/]+/files/([^/]+)/([^/])/ method find allow $2.$1 If you arrange your files/ directory to have files in 'domain.com/host/', then only the referenced host will be able to access their files, other hosts will be denied. For instance: files/reductivelabs.com/dns/... files/reductivelabs.com/www/... then only files in dns can be accessible by dns.reductivelabs.com and so on... If the auth.conf file doesn't exist puppet uses sane defaults that allows clients to check-in and ask for their configurations... Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Enhance authconfig format to support uri paths and regexBrice Figureau2009-04-234-85/+673
| | | | | | | | | | | | | | | | | | | | | This patch introduces a new set of directive to the authconfig parser/file format: path /uripath or patch ~ <regex> This directive declares a new kind of ACL based on the uri path. method save, find This directive which is to be used under path directive restricts a path ACL to only some REST verbs. The ACL path system matches on path prefix possible, or on regex matches (first match wins). If no path are matching, then the authorization is not allowed. The same if no ACL matches for the given REST verb. The old namespace right matching still works as usual. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Add dynamic authorization to authstoreBrice Figureau2009-04-232-2/+88
| | | | | | | | | | | | | | | | | | | | | | The idea is to have allow/deny authorization directives that are dynamic: their evaluation is deferred until we perform the authorization checking in allowed?. This is done to allow replacing backreferences in allow/deny directives by parameters of the match that selected this right. For instance, it is possible to: allow $1.$2 And using Right::interpolate() with the result of a regex match using 2 captures, will evaluate $1.$2 to those captures. For instance, if we captured [host, reductivelabs.com], then the allow directive is replaced by: allow host.reductivelabs.com It is then safe to call allowed?, after which we can reset the interpolation. This interpolation is thread-safe. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com> authconfig regex support
* Add RSpec unit tests for network rightsBrice Figureau2009-04-231-0/+54
| | | | Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Add RSpec unit tests for authconfigBrice Figureau2009-04-231-0/+173
| | | | Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Adding support for specifying a preferred serialization formatLuke Kanies2009-04-224-8/+30
| | | | | | | | | | This isn't that great, but at least it provides basic tuning of the format. Also removing the catalog_format default, since it's no longer used. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing the FormatHandler test to use symbols for format namesLuke Kanies2009-04-221-22/+25
| | | | | | | Formats guarantee that symbols are used, so it makes sense for the tests to do so. Signed-off-by: Luke Kanies <luke@madstop.com>