Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-5735

Remove usage of win32-security gem

    XMLWordPrintable

Details

    • Task
    • Status: Closed
    • High
    • Resolution: Fixed
    • None
    • PUP 4.4.0, PUP 7.0.0
    • None
    • 2
    • Windows 2016-02-24 (Burn FF), Windows 2016-03-09
    • Bug Fix
    • Hide
      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.
      Show
      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.

    Description

      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

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ethan Ethan Brown
              Ryan Gard Ryan Gard
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support