Commit Graph

14 Commits

Author SHA1 Message Date
233790ff54 Support multiple callerids in policy files
This patch adds support for multiple callerids in the policy files, just
as the other fields (actions, facts, classes) can. Updated poliicy files
look like this:
```
policy default deny
allow	uid=500 uid=600	*	*		*
```

This is useful because it allows bulk granting of permissions when using
mcollective::actionpolicy::rule from puppetlabs-mcollective:
```
    $admin_users = ['foo','bar']
    mcollective::actionpolicy {
        'default':
            default => 'deny';
        'nrpe':
            default => 'deny';
    }
     mcollective::actionpolicy::rule {
        'admins-allow-all':
            agent    => 'default',
            callerid => join(prefix($admin_users, 'cert='), ' ');
        'admins-allow-all-nrpe':
            agent    => 'nrpe',
            callerid => join(prefix($admin_users, 'cert='), ' ');
        'nrpe-nagios':
            agent    => 'nrpe',
            callerid => 'cert=nagios';
    }
```

This is especially helpful when there are large numbers of admin users being
managed by puppet (say ~10) since any `mcollective::actionpolicy::rule` added
for an agent prevents the default policy being used and so the admins have to
be explicitly re-added for each agent, rapidly bloating the size of the
manifest and causing massive duplication of code.

Backward compatibility change:
* Certificates with spaces in the filename (if even supported) would be
    broken by this change.

This commit also includes tests that verify both positive and negative lookups
in a policy file with multiple callerids.
2014-11-09 13:26:20 +00:00
Richard Clamp
8ea8ed0162 Merge pull request #5 from clantant/MCOP-271/master/saucy
(MCOP-271) Remove saucy from build defaults
2014-08-26 11:17:47 +01:00
Eric Timmerman
56cd1760e6 (MCOP-271) Remove saucy from build defaults
This commit removes Saucy from build_defaults. It went EOL on July 17,
2014
2014-08-14 10:23:24 -07:00
Pieter Loubser
f449ed6740 Merge pull request #4 from richardc/2_0_1_release
Update ddl and changelog for 2.0.1 release
2.0.1
2014-07-25 13:21:43 +01:00
Richard Clamp
fe1d900e5c MCO-254 update changelog for 2.0.1 2014-07-25 12:10:47 +01:00
Richard Clamp
0dd20908c3 MCOP-251 update version number in source 2014-07-25 12:07:10 +01:00
Pieter Loubser
61c98133a1 Merge pull request #3 from richardc/add_travis
maint - add travis-ci configuration
2014-07-25 11:55:43 +01:00
Richard Clamp
00bf319fdb maint - add travis-ci configuration 2014-07-25 11:50:13 +01:00
Pieter Loubser
19ea7059ce Merge pull request #2 from richardc/MCOP-245_add_packaging
MCOP-245 Add pl:packaging
2014-07-25 11:48:52 +01:00
Richard Clamp
0d88ae0c60 MCOP-245 Add pl:packaging
Add the necessary boilerplate to build packages with the current Puppet Labs
build infrastructure.  Based on the packaging of mcollective-sysctl-data
2014-07-25 11:30:56 +01:00
Nick Fagerlund
1458469122 Update the README with more complete policy format documentation
This rolls in changes from the wiki.
2013-06-24 10:12:28 +01:00
Pieter Loubser
2248e5bcd9 20472 - Update actionpolicy readme
Updated actionpolicy readme to describe the fact that enable_default
takes precedence over allow_unconfigured.
2013-05-01 12:35:40 +01:00
R.I.Pienaar
84ff5d959d 19210 - Publish the actionpolicy simple rpc authorization plugin
Refactored, added tests and updated docs
2013-03-19 16:39:33 +00:00
R.I.Pienaar
77fe7664d7 Initial commit 2013-03-19 06:49:35 -07:00