PUP-5538
, we reduced our dependency on the win32-security gem. We should fully deprecate its usage. This includes:
Moving all the well-known SID constants that are being used into Puppet::Util::Windows::SID
Audit the modules on the forge, and notify authors up front that there might be breaking changes going forward - look for strings like win32/security, Win32::Security, etc
Removal of the actual gem from the puppet-win32-ruby repository branches so that it's not included in the MSI any longer. The deprecation notice should go in Puppet 4.3.x, and the actual removal should be slated for Puppet 4.4.x
There are a number of other refactorings that should probably be done at the same time, but could be broken out to a different ticket if necessary:
Move the `name_to_sid_object` method off of Puppet::Util::WIndows::SID over to Puppet::Util::Windows::SID::Principal - keep the old method around, but add a deprecation notice.
There are likely other methods that should be refactored similarly.
Potentially move the class Puppet::Util::Windows::SID::Principal to Puppet::Util::Windows::Principal
With PUP-5538, we reduced our dependency on the win32-security gem. We should fully deprecate its usage. This includes:
* (DONE) Moving all the well-known SID constants that are being used into {{Puppet::Util::Windows::SID}} * Audit the modules on the forge, and notify authors up front that there might be breaking changes going forward - look for strings like {{win32/security}}, {{Win32::Security}}, etc * (DONE) Remove the inclusion of {{win32/security}} anywhere that it occurs - for instance - https://github.com/puppetlabs/puppet/blob/ba5cfc392d597d22fa98e6d62b48f730845b6f22/lib/puppet/util/windows/security.rb#L68 * Removal of the actual gem from the {{puppet-win32-ruby}} repository branches so that it's not included in the MSI any longer. The deprecation notice should go in Puppet 4.3.x, and the actual removal should be slated for Puppet 4.4.x
There are a number of other refactorings that should probably be done at the same time, but could be broken out to a different ticket if necessary:
* Move the `name_to_sid_object` method off of {{Puppet::Util::WIndows::SID}} over to {{Puppet::Util::Windows::SID::Principal}} - keep the old method around, but add a deprecation notice. ** There are likely other methods that should be refactored similarly. * Potentially move the class {{Puppet::Util::Windows::SID::Principal}} to {{Puppet::Util::Windows::Principal}}
Ethan Brown What's the rationale behind the refactoring? The remaining functions all seem to be directly related to the SID object and seem to have no other place to go.
With PUP-5538, we reduced our dependency on the win32-security gem. We should fully deprecate its usage. This includes:
* (DONE) Moving all the well-known SID constants that are being used into {{Puppet::Util::Windows::SID}}
* (DONE) Audit the modules on the forge, and notify authors up front that there might be breaking changes going forward - look for strings like {{win32/security}}, {{Win32::Security}}, etc
There are a number of other refactorings that should probably be done at the same time, but could be broken out to a different ticket if necessary:
* Move the `name_to_sid_object` method off of {{Puppet::Util::WIndows::SID}} over to {{Puppet::Util::Windows::SID::Principal}} - keep the old method around, but add a deprecation notice. ** There are likely other methods that should be refactored similarly. * Potentially move the class {{Puppet::Util::Windows::SID::Principal}} to {{Puppet::Util::Windows::Principal}}
The ruby versions are out of step with the Puppet Versions; e.g. Puppet 4.3.x uses Ruby 2.1.7 and 2.1.8. Whereas Ruby 2.1.7 is used in Puppet 4.2.3, 4.3.0 and 4.3.1
With PUP-5538, we reduced our dependency on the win32-security gem. We should fully deprecate its usage. This includes:
* (DONE) Moving all the well-known SID constants that are being used into {{Puppet::Util::Windows::SID}} * (DONE) Audit the modules on the forge, and notify authors up front that there might be breaking changes going forward - look for strings like {{win32/security}}, {{Win32::Security}}, etc * (DONE) Remove the inclusion of {{win32/security}} anywhere that it occurs - for instance - https://github.com/puppetlabs/puppet/blob/ba5cfc392d597d22fa98e6d62b48f730845b6f22/lib/puppet/util/windows/security.rb#L68
* (MUCH LATER) Removal of the actual gem from the {{puppet-win32-ruby}} repository branches so that it's not included in the MSI any longer. The deprecation notice should go in Puppet 4.3.x, and the actual removal should be slated for Puppet 4.4.x
There are a number of other refactorings that should probably be done at the same time, but could be broken out to a different ticket if necessary:
(LATER)
* Move the `name_to_sid_object` method off of {{Puppet::Util::WIndows::SID}} over to {{Puppet::Util::Windows::SID::Principal}} - keep the old method around, but add a deprecation notice. ** There are likely other methods that should be refactored similarly. * Potentially move the class {{Puppet::Util::Windows::SID::Principal}} to {{Puppet::Util::Windows::Principal}}
In an effort to improve Puppet's handling of Unicode user and group names on Windows, much of the code interacting with the Windows API has been rewritten to ensure wide character (UTF-16LE) API variants are called. Previously, Puppet relied on the win32-security gem for some of these interactions, which were implemented as ANSI Windows API calls. As a result, Puppet no longer needs the win32-security gem, and any code based references to the gem have been removed. Any module authors requiring functionality in Win32::Security should be aware that a subsequent release will remove this gem from the MSI package permanently. Though unused by Puppet, the gem currently remains for backward compatibility.
The problem exists in puppet/provider/acl/windows/base.rb, which require 'win32/security'. It gets me an error on my Winows 10: Puppet: Could not autoload puppet/provider/acl/windows: cannot load such file – win32/security Puppet: Could not autoload puppet/type/acl: Could not autoload puppet/provider/acl/windows: cannot load such file – win32/security Puppet: Failed to apply catalog: Could not autoload puppet/type/acl: Could not autoload puppet/provider/acl/windows: cannot load such file – win32/security