Resource Type: acl
- Defined in:
- lib/puppet/type/acl.rb
- Providers:
-
windows
Overview
Manages access control lists (ACLs). The ‘acl` type is typically used when you need more complex management of permissions e.g. Windows. ACLs typically contain access control entries (ACEs) that define a trustee (identity) with a set of rights, whether the type is allow or deny, and how inheritance and propagation of those ACEs are applied to the resource target and child types under it. The order that ACEs are listed in is important on Windows as it determines what is applied first.
Order of ACE application on Windows is explicit deny, explicit allow, inherited deny, then inherited allow. You cannot specify inherited ACEs in a manifest, only whether to allow upstream inheritance to flow into the managed target location (known as security descriptor). Please ensure your modeled resources follow this order or Windows will complain. NOTE: ‘acl` type does not enforce or complain about ACE order.
For very specific examples, see the readme and learn about the different features of the ‘acl` type.
Autorequires: If Puppet is managing the user, group or target of an acl resource, the acl type will autorequire them.
Examples:
Minimally expressed sample usage:
At a minimum, you need to provide the target and at least one permission (access control entry or ACE). It will default the other settings to sensible defaults.
“‘
acl { 'c:/tempperms':
permissions => [
{ identity => 'Administrator', rights => ['full'] },
{ identity => 'Users', rights => ['read','execute'] }
],
}
“‘
Fully expressed sample usage:
If you want you can provide a fully expressed ACL. The fully expressed acl in the sample below produces the same settings as the minimal sample above.
“‘
acl { 'c:/tempperms':
target => 'c:/tempperms',
target_type => 'file',
purge => 'false',
permissions => [
{ identity => 'Administrator', rights => ['full'], perm_type=> 'allow', child_types => 'all', affects => 'all' },
{ identity => 'Users', rights => ['read','execute'], perm_type=> 'allow', child_types => 'all', affects => 'all' }
],
owner => 'Administrators', #Creator_Owner specific, doesn't manage unless specified
group => 'Users', #Creator_Group specific, doesn't manage unless specified
inherit_parent_permissions => 'true',
}
“‘
Manage same ACL resource multiple acls sample usage:
You can manage the same target across multiple acl resources with some caveats. The title of the resource needs to be unique. It is suggested that you only do this when you would need to (can get confusing). You should not set purge => ‘true’ on any of the resources that apply to the same target or you will see thrashing in reports as the permissions will be added and removed every catalog application. Use this feature with care.
“‘
acl { 'c:/tempperms':
permissions => [
{ identity => 'Administrator', rights => ['full'] }
],
}
acl { 'tempperms_Users':
target => 'c:/tempperms',
permissions => [
{ identity => 'Users', rights => ['read','execute'] }
],
}
“‘
Removing upstream inheritance with purge sample usage:
“‘
acl { 'c:/tempperms':
purge => 'true',
permissions => [
{ identity => 'Administrators', rights => ['full'] },
{ identity => 'Users', rights => ['full'] }
],
inherit_parent_permissions => 'false',
}
“‘
Warning: While managing ACLs you could lock the user running Puppet completely out of managing resources using ‘purge => ’true’‘ with `inherit_parent_permissions => ’false’‘. If Puppet is locked out of managing the resource, manual intervention on affected nodes will be required.