Jira (PUP-5735) Remove usage of win32-security gem

11 views
Skip to first unread message

Ethan Brown (JIRA)

unread,
Jan 21, 2016, 1:03:04 PM1/21/16
to puppe...@googlegroups.com
Ethan Brown created an issue
 
Puppet / Task PUP-5735
Remove usage of win32-security gem
Issue Type: Task Task
Assignee: Unassigned
Created: 2016/01/21 10:02 AM
Fix Versions: PUP 4.3.3
Priority: Normal Normal
Reporter: Ethan Brown

With

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
  • 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
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc)
Atlassian logo

Ethan Brown (JIRA)

unread,
Jan 25, 2016, 2:38:02 PM1/25/16
to puppe...@googlegroups.com
Ethan Brown updated an issue
Change By: Ethan Brown
Fix Version/s: PUP 4.4.0

Steve Barlow (JIRA)

unread,
Jan 27, 2016, 1:31:36 PM1/27/16
to puppe...@googlegroups.com
Steve Barlow updated an issue
Change By: Steve Barlow
Sprint: Windows 2016-02-10

Steve Barlow (JIRA)

unread,
Feb 8, 2016, 4:18:04 PM2/8/16
to puppe...@googlegroups.com
Steve Barlow updated an issue
Change By: Steve Barlow
Sprint: Windows 2016-02-24 (Burn FF)

Craig Gomes (JIRA)

unread,
Feb 10, 2016, 2:04:04 PM2/10/16
to puppe...@googlegroups.com
Craig Gomes assigned an issue to Glenn Sarti
Change By: Craig Gomes
Assignee: Glenn Sarti

Craig Gomes (JIRA)

unread,
Feb 10, 2016, 2:10:03 PM2/10/16
to puppe...@googlegroups.com

Ryan Gard (JIRA)

unread,
Feb 11, 2016, 1:47:04 PM2/11/16
to puppe...@googlegroups.com
Ryan Gard updated an issue
Change By: Ryan Gard
QA Risk Assessment Reason: Developer thought that risk was low.
QA Risk Assessment: Low
QA Status: Reviewed
QA Contact: Ryan Gard

Glenn Sarti (JIRA)

unread,
Feb 12, 2016, 12:45:02 PM2/12/16
to puppe...@googlegroups.com
Glenn Sarti commented on Task PUP-5735
 
Re: Remove usage of win32-security gem

Facter 2.4.6 has a dependency on win32-security

Glenn Sarti (JIRA)

unread,
Feb 12, 2016, 2:56:04 PM2/12/16
to puppe...@googlegroups.com
Glenn Sarti updated an issue
 
Change By: Glenn Sarti
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}}

Glenn Sarti (JIRA)

unread,
Feb 12, 2016, 3:51:04 PM2/12/16
to puppe...@googlegroups.com
Glenn Sarti commented on Task PUP-5735
 
Re: Remove usage of win32-security gem

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.

Glenn Sarti (JIRA)

unread,
Feb 16, 2016, 12:55:03 PM2/16/16
to puppe...@googlegroups.com
Glenn Sarti commented on Task PUP-5735

Modules depending on win32-security

puppetlabs-acl
https://github.com/puppetlabs/puppetlabs-acl/blob/master/lib/puppet/util/monkey_patches.rb
https://github.com/puppetlabs/puppetlabs-acl/blob/master/lib/puppet/provider/acl/windows/base.rb

reidmv-windows_package (looks like a copy of all the windows utils from Pup 2.7.x)
This module may not be an issue as it's only applicable for Puppet less than 3.0, where as our changes are targetted at Pup 4.x
https://forge.puppetlabs.com/reidmv/windows_package
https://github.com/reidmv/puppet-module-windows_package/blob/master/lib/puppet/util/windows_package/user.rb

Glenn Sarti (JIRA)

unread,
Feb 17, 2016, 12:34:07 PM2/17/16
to puppe...@googlegroups.com
Glenn Sarti updated an issue
Change By: Glenn Sarti
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
* 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}}

Glenn Sarti (JIRA)

unread,
Feb 17, 2016, 12:44:06 PM2/17/16
to puppe...@googlegroups.com
Glenn Sarti commented on Task PUP-5735
 
Re: Remove usage of win32-security gem

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

Glenn Sarti (JIRA)

unread,
Feb 17, 2016, 4:27:23 PM2/17/16
to puppe...@googlegroups.com
Glenn Sarti commented on Task PUP-5735

Created https://github.com/puppetlabs/puppet/pull/4681 for removing the requirement of win32-security from Puppet

Glenn Sarti (JIRA)

unread,
Feb 17, 2016, 5:01:02 PM2/17/16
to puppe...@googlegroups.com
Glenn Sarti commented on Task PUP-5735

Created MODULES-3093 for modifying the ACL module

Glenn Sarti (JIRA)

unread,
Feb 17, 2016, 7:09:03 PM2/17/16
to puppe...@googlegroups.com
Glenn Sarti commented on Task PUP-5735

Created https://github.com/puppetlabs/facter/pull/1271 for removing win32-security from Facter 2.x

Glenn Sarti (JIRA)

unread,
Feb 17, 2016, 7:12:03 PM2/17/16
to puppe...@googlegroups.com
Glenn Sarti updated an issue
Change By: Glenn Sarti
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}}

Glenn Sarti (JIRA)

unread,
Feb 17, 2016, 7:15:03 PM2/17/16
to puppe...@googlegroups.com
Glenn Sarti commented on Task PUP-5735
 
Re: Remove usage of win32-security gem

Need to double check the testing matrix for Facter RE 2003/2008/2012.

Glenn Sarti (JIRA)

unread,
Feb 18, 2016, 12:44:03 PM2/18/16
to puppe...@googlegroups.com
Glenn Sarti commented on Task PUP-5735

Confirmed the current WIP PR for Facter works on 2008R2 and 2012R2. It is always reporting as true on 2003R2

Glenn Sarti (JIRA)

unread,
Feb 18, 2016, 1:18:03 PM2/18/16
to puppe...@googlegroups.com
Glenn Sarti commented on Task PUP-5735

Confirmed facter code is correct in all three OSes

Glenn Sarti (JIRA)

unread,
Feb 18, 2016, 1:56:04 PM2/18/16
to puppe...@googlegroups.com
Glenn Sarti assigned an issue to Ethan Brown
 
Change By: Glenn Sarti
Assignee: Ethan Brown

Ethan Brown (JIRA)

unread,
Feb 18, 2016, 6:52:03 PM2/18/16
to puppe...@googlegroups.com
Ethan Brown assigned an issue to Glenn Sarti
Change By: Ethan Brown
Assignee: Ethan Brown Glenn Sarti

Glenn Sarti (JIRA)

unread,
Feb 19, 2016, 1:07:03 PM2/19/16
to puppe...@googlegroups.com
Glenn Sarti assigned an issue to Ethan Brown
Change By: Glenn Sarti
Assignee: Ethan Brown

Ethan Brown (JIRA)

unread,
Feb 24, 2016, 10:27:03 AM2/24/16
to puppe...@googlegroups.com

William Hopper (JIRA)

unread,
Feb 24, 2016, 1:23:06 PM2/24/16
to puppe...@googlegroups.com
William Hopper assigned an issue to qa
 
Change By: William Hopper
Status: Ready for  CI  Test
Assignee: Ethan Brown qa

Steve Barlow (JIRA)

unread,
Feb 24, 2016, 1:23:06 PM2/24/16
to puppe...@googlegroups.com
Steve Barlow updated an issue
Change By: Steve Barlow
Sprint: Windows 2016-02-24 (Burn FF) , Windows 2016-03-09 (Burn CF)

Steve Barlow (JIRA)

unread,
Feb 24, 2016, 1:39:03 PM2/24/16
to puppe...@googlegroups.com
Steve Barlow updated an issue
Change By: Steve Barlow
Flagged: Impediment

Josh Cooper (JIRA)

unread,
Feb 26, 2016, 2:52:04 PM2/26/16
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Fix Version/s: PUP 4.3.3

Ethan Brown (JIRA)

unread,
Feb 29, 2016, 8:29:06 PM2/29/16
to puppe...@googlegroups.com
Ethan Brown updated an issue
Change By: Ethan Brown
Release Notes Summary: 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.
Release Notes: Bug Fix

Kenn Hussey (JIRA)

unread,
Mar 2, 2016, 9:43:03 AM3/2/16
to puppe...@googlegroups.com
Kenn Hussey updated an issue
Change By: Kenn Hussey
Flagged: Impediment

Ryan Gard (JIRA)

unread,
Mar 8, 2016, 1:12:03 PM3/8/16
to puppe...@googlegroups.com
Ryan Gard assigned an issue to Ryan Gard
Change By: Ryan Gard
Assignee: qa Ryan Gard

Josh Cooper (Jira)

unread,
Sep 10, 2020, 2:33:04 PM9/10/20
to puppe...@googlegroups.com
Josh Cooper commented on Task PUP-5735
 
Re: Remove usage of win32-security gem

Puppet stopped using the win32-security gem in PUP 4.4.0, but kept the gem dependency so as to not break custom types/providers.

In Puppet 7, we will no longer ship the win32 gem. That change was merged to main in https://github.com/puppetlabs/puppet/commit/13d0ccb4bb428b893635386592f6b6443f946b33. There should have been a separate ticket for the gem removal, but it didn't work out that way.

This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Mihai Buzgau (Jira)

unread,
Nov 5, 2020, 3:58:03 AM11/5/20
to puppe...@googlegroups.com
Mihai Buzgau updated an issue
 
Change By: Mihai Buzgau
Fix Version/s: PUP 7.0.0

Claire Cadman (Jira)

unread,
Nov 10, 2020, 5:43:03 AM11/10/20
to puppe...@googlegroups.com
Claire Cadman updated an issue
Change By: Claire Cadman
Labels: doc_reviewed

Valentyna (Jira)

unread,
Mar 5, 2021, 4:19:01 AM3/5/21
to puppe...@googlegroups.com
Valentyna commented on Task PUP-5735
 
Re: Remove usage of win32-security gem

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

Valentyna (Jira)

unread,
Mar 5, 2021, 4:20:01 AM3/5/21
to puppe...@googlegroups.com
Valentyna updated an issue
 
Change By: Valentyna
Priority: Normal High

Josh Cooper (Jira)

unread,
Mar 5, 2021, 1:15:02 PM3/5/21
to puppe...@googlegroups.com
Josh Cooper commented on Task PUP-5735
 
Re: Remove usage of win32-security gem

Valentyna the dependency on win32-security was removed in version 3.2.1 of the puppetlabs-acl module, see https://github.com/puppetlabs/puppetlabs-acl/commit/0aa45cba8eb89cc90879b3c53b854f0f64e482b9. Please update your acl module to 3.2.1 or greater.

Reply all
Reply to author
Forward
0 new messages