chef 17.6.18-universal-mingw32 → 17.9.18-universal-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (338) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +5 -0
  3. data/chef.gemspec +1 -0
  4. data/distro/ruby_bin_folder/AMD64/Chef.PowerShell.Wrapper.dll +0 -0
  5. data/distro/ruby_bin_folder/AMD64/Chef.PowerShell.dll +0 -0
  6. data/distro/ruby_bin_folder/AMD64/Ijwhost.dll +0 -0
  7. data/distro/ruby_bin_folder/AMD64/concrt140.dll +0 -0
  8. data/distro/ruby_bin_folder/AMD64/host/fxr/5.0.0/hostfxr.dll +0 -0
  9. data/distro/ruby_bin_folder/AMD64/msvcp140.dll +0 -0
  10. data/distro/ruby_bin_folder/AMD64/msvcp140_1.dll +0 -0
  11. data/distro/ruby_bin_folder/AMD64/msvcp140_2.dll +0 -0
  12. data/distro/ruby_bin_folder/AMD64/msvcp140_atomic_wait.dll +0 -0
  13. data/distro/ruby_bin_folder/AMD64/msvcp140_codecvt_ids.dll +0 -0
  14. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Chef.PowerShell.Wrapper.Core.dll +0 -0
  15. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Chef.Powershell.Core.dll +0 -0
  16. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Chef.Powershell.Core.pdb +0 -0
  17. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Ijwhost.dll +0 -0
  18. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Microsoft.CSharp.dll +0 -0
  19. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Microsoft.NETCore.App.deps.json +180 -180
  20. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Microsoft.VisualBasic.Core.dll +0 -0
  21. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Microsoft.VisualBasic.dll +0 -0
  22. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Microsoft.Win32.Primitives.dll +0 -0
  23. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Microsoft.Win32.Registry.dll +0 -0
  24. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.AppContext.dll +0 -0
  25. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Buffers.dll +0 -0
  26. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Collections.Concurrent.dll +0 -0
  27. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Collections.Immutable.dll +0 -0
  28. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Collections.NonGeneric.dll +0 -0
  29. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Collections.Specialized.dll +0 -0
  30. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Collections.dll +0 -0
  31. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ComponentModel.Annotations.dll +0 -0
  32. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ComponentModel.DataAnnotations.dll +0 -0
  33. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ComponentModel.EventBasedAsync.dll +0 -0
  34. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ComponentModel.Primitives.dll +0 -0
  35. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ComponentModel.TypeConverter.dll +0 -0
  36. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ComponentModel.dll +0 -0
  37. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Configuration.dll +0 -0
  38. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Console.dll +0 -0
  39. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Core.dll +0 -0
  40. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Data.Common.dll +0 -0
  41. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Data.DataSetExtensions.dll +0 -0
  42. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Data.dll +0 -0
  43. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.Contracts.dll +0 -0
  44. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.Debug.dll +0 -0
  45. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.DiagnosticSource.dll +0 -0
  46. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.FileVersionInfo.dll +0 -0
  47. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.Process.dll +0 -0
  48. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.StackTrace.dll +0 -0
  49. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.TextWriterTraceListener.dll +0 -0
  50. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.Tools.dll +0 -0
  51. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.TraceSource.dll +0 -0
  52. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.Tracing.dll +0 -0
  53. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Drawing.Primitives.dll +0 -0
  54. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Drawing.dll +0 -0
  55. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Dynamic.Runtime.dll +0 -0
  56. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Formats.Asn1.dll +0 -0
  57. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Globalization.Calendars.dll +0 -0
  58. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Globalization.Extensions.dll +0 -0
  59. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Globalization.dll +0 -0
  60. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.Compression.Brotli.dll +0 -0
  61. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.Compression.FileSystem.dll +0 -0
  62. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.Compression.ZipFile.dll +0 -0
  63. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.Compression.dll +0 -0
  64. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.FileSystem.AccessControl.dll +0 -0
  65. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.FileSystem.DriveInfo.dll +0 -0
  66. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.FileSystem.Primitives.dll +0 -0
  67. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.FileSystem.Watcher.dll +0 -0
  68. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.FileSystem.dll +0 -0
  69. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.IsolatedStorage.dll +0 -0
  70. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.MemoryMappedFiles.dll +0 -0
  71. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.Pipes.AccessControl.dll +0 -0
  72. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.Pipes.dll +0 -0
  73. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.UnmanagedMemoryStream.dll +0 -0
  74. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.dll +0 -0
  75. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Linq.Expressions.dll +0 -0
  76. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Linq.Parallel.dll +0 -0
  77. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Linq.Queryable.dll +0 -0
  78. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Linq.dll +0 -0
  79. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Memory.dll +0 -0
  80. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Http.Json.dll +0 -0
  81. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Http.dll +0 -0
  82. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.HttpListener.dll +0 -0
  83. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Mail.dll +0 -0
  84. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.NameResolution.dll +0 -0
  85. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.NetworkInformation.dll +0 -0
  86. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Ping.dll +0 -0
  87. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Primitives.dll +0 -0
  88. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Requests.dll +0 -0
  89. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Security.dll +0 -0
  90. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.ServicePoint.dll +0 -0
  91. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Sockets.dll +0 -0
  92. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.WebClient.dll +0 -0
  93. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.WebHeaderCollection.dll +0 -0
  94. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.WebProxy.dll +0 -0
  95. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.WebSockets.Client.dll +0 -0
  96. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.WebSockets.dll +0 -0
  97. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.dll +0 -0
  98. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Numerics.Vectors.dll +0 -0
  99. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Numerics.dll +0 -0
  100. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ObjectModel.dll +0 -0
  101. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Private.CoreLib.dll +0 -0
  102. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Private.DataContractSerialization.dll +0 -0
  103. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Private.Uri.dll +0 -0
  104. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Private.Xml.Linq.dll +0 -0
  105. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Private.Xml.dll +0 -0
  106. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.DispatchProxy.dll +0 -0
  107. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.Emit.ILGeneration.dll +0 -0
  108. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.Emit.Lightweight.dll +0 -0
  109. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.Emit.dll +0 -0
  110. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.Extensions.dll +0 -0
  111. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.Metadata.dll +0 -0
  112. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.Primitives.dll +0 -0
  113. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.TypeExtensions.dll +0 -0
  114. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.dll +0 -0
  115. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Resources.Reader.dll +0 -0
  116. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Resources.ResourceManager.dll +0 -0
  117. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Resources.Writer.dll +0 -0
  118. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.CompilerServices.Unsafe.dll +0 -0
  119. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.CompilerServices.VisualC.dll +0 -0
  120. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Extensions.dll +0 -0
  121. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Handles.dll +0 -0
  122. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.InteropServices.RuntimeInformation.dll +0 -0
  123. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.InteropServices.dll +0 -0
  124. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Intrinsics.dll +0 -0
  125. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Loader.dll +0 -0
  126. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Numerics.dll +0 -0
  127. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Serialization.Formatters.dll +0 -0
  128. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Serialization.Json.dll +0 -0
  129. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Serialization.Primitives.dll +0 -0
  130. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Serialization.Xml.dll +0 -0
  131. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Serialization.dll +0 -0
  132. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.dll +0 -0
  133. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.AccessControl.dll +0 -0
  134. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Claims.dll +0 -0
  135. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.Algorithms.dll +0 -0
  136. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.Cng.dll +0 -0
  137. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.Csp.dll +0 -0
  138. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.Encoding.dll +0 -0
  139. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.OpenSsl.dll +0 -0
  140. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.Primitives.dll +0 -0
  141. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.X509Certificates.dll +0 -0
  142. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Principal.Windows.dll +0 -0
  143. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Principal.dll +0 -0
  144. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.SecureString.dll +0 -0
  145. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.dll +0 -0
  146. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ServiceModel.Web.dll +0 -0
  147. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ServiceProcess.dll +0 -0
  148. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Text.Encoding.CodePages.dll +0 -0
  149. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Text.Encoding.Extensions.dll +0 -0
  150. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Text.Encoding.dll +0 -0
  151. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Text.Encodings.Web.dll +0 -0
  152. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Text.Json.dll +0 -0
  153. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Text.RegularExpressions.dll +0 -0
  154. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Channels.dll +0 -0
  155. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Overlapped.dll +0 -0
  156. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Tasks.Dataflow.dll +0 -0
  157. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Tasks.Extensions.dll +0 -0
  158. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Tasks.Parallel.dll +0 -0
  159. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Tasks.dll +0 -0
  160. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Thread.dll +0 -0
  161. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.ThreadPool.dll +0 -0
  162. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Timer.dll +0 -0
  163. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.dll +0 -0
  164. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Transactions.Local.dll +0 -0
  165. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Transactions.dll +0 -0
  166. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ValueTuple.dll +0 -0
  167. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Web.HttpUtility.dll +0 -0
  168. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Web.dll +0 -0
  169. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Windows.dll +0 -0
  170. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.Linq.dll +0 -0
  171. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.ReaderWriter.dll +0 -0
  172. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.Serialization.dll +0 -0
  173. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.XDocument.dll +0 -0
  174. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.XPath.XDocument.dll +0 -0
  175. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.XPath.dll +0 -0
  176. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.XmlDocument.dll +0 -0
  177. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.XmlSerializer.dll +0 -0
  178. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.dll +0 -0
  179. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.dll +0 -0
  180. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/WindowsBase.dll +0 -0
  181. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/clrcompression.dll +0 -0
  182. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/clretwrc.dll +0 -0
  183. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/clrjit.dll +0 -0
  184. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/coreclr.dll +0 -0
  185. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/createdump.exe +0 -0
  186. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/dbgshim.dll +0 -0
  187. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/hostfxr.dll +0 -0
  188. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/hostpolicy.dll +0 -0
  189. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscordaccore.dll +0 -0
  190. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscordaccore_amd64_amd64_5.0.521.16609.dll +0 -0
  191. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscordbi.dll +0 -0
  192. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscorlib.dll +0 -0
  193. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscorrc.dll +0 -0
  194. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/netstandard.dll +0 -0
  195. data/distro/ruby_bin_folder/AMD64/vccorlib140.dll +0 -0
  196. data/distro/ruby_bin_folder/AMD64/vcruntime140.dll +0 -0
  197. data/distro/ruby_bin_folder/AMD64/vcruntime140_1.dll +0 -0
  198. data/distro/ruby_bin_folder/x86/Chef.PowerShell.dll +0 -0
  199. data/distro/ruby_bin_folder/x86/Chef.Powershell.Wrapper.dll +0 -0
  200. data/distro/ruby_bin_folder/x86/concrt140.dll +0 -0
  201. data/distro/ruby_bin_folder/x86/msvcp140.dll +0 -0
  202. data/distro/ruby_bin_folder/x86/msvcp140_1.dll +0 -0
  203. data/distro/ruby_bin_folder/x86/msvcp140_2.dll +0 -0
  204. data/distro/ruby_bin_folder/x86/msvcp140_atomic_wait.dll +0 -0
  205. data/distro/ruby_bin_folder/x86/msvcp140_codecvt_ids.dll +0 -0
  206. data/distro/ruby_bin_folder/x86/shared/Microsoft.NETCore.App/5.0.0/Chef.PowerShell.Wrapper.Core.dll +0 -0
  207. data/distro/ruby_bin_folder/x86/shared/Microsoft.NETCore.App/5.0.0/Chef.Powershell.Core.dll +0 -0
  208. data/distro/ruby_bin_folder/x86/shared/Microsoft.NETCore.App/5.0.0/Chef.Powershell.Core.pdb +0 -0
  209. data/distro/ruby_bin_folder/x86/vccorlib140.dll +0 -0
  210. data/distro/ruby_bin_folder/x86/vcruntime140.dll +0 -0
  211. data/lib/chef/application/base.rb +1 -1
  212. data/lib/chef/chef_fs/file_pattern.rb +1 -1
  213. data/lib/chef/chef_fs/path_utils.rb +1 -1
  214. data/lib/chef/compliance/default_attributes.rb +12 -2
  215. data/lib/chef/compliance/runner.rb +51 -5
  216. data/lib/chef/data_collector/run_end_message.rb +1 -1
  217. data/lib/chef/dsl/reboot_pending.rb +1 -1
  218. data/lib/chef/exceptions.rb +10 -0
  219. data/lib/chef/mixin/powershell_exec.rb +6 -5
  220. data/lib/chef/mixin/why_run.rb +8 -2
  221. data/lib/chef/powershell.rb +8 -6
  222. data/lib/chef/provider/cron.rb +6 -3
  223. data/lib/chef/provider/directory.rb +2 -2
  224. data/lib/chef/provider/git.rb +1 -1
  225. data/lib/chef/provider/ifconfig/debian.rb +1 -1
  226. data/lib/chef/provider/ifconfig.rb +4 -4
  227. data/lib/chef/provider/mount/linux.rb +16 -2
  228. data/lib/chef/provider/mount/mount.rb +1 -1
  229. data/lib/chef/provider/package/dnf.rb +1 -1
  230. data/lib/chef/provider/package/habitat.rb +1 -1
  231. data/lib/chef/provider/package/powershell.rb +13 -10
  232. data/lib/chef/provider/package/yum/python_helper.rb +81 -25
  233. data/lib/chef/provider/package/yum.rb +39 -12
  234. data/lib/chef/provider/package/zypper.rb +2 -0
  235. data/lib/chef/provider/package.rb +62 -27
  236. data/lib/chef/provider/subversion.rb +5 -5
  237. data/lib/chef/provider.rb +5 -2
  238. data/lib/chef/providers.rb +0 -1
  239. data/lib/chef/pwsh.rb +3 -2
  240. data/lib/chef/resource/apt_package.rb +2 -2
  241. data/lib/chef/resource/chef_client_config.rb +21 -1
  242. data/lib/chef/resource/chef_client_launchd.rb +1 -1
  243. data/lib/chef/resource/chef_client_trusted_certificate.rb +1 -0
  244. data/lib/chef/resource/chocolatey_config.rb +1 -1
  245. data/lib/chef/resource/chocolatey_feature.rb +1 -1
  246. data/lib/chef/resource/chocolatey_package.rb +3 -3
  247. data/lib/chef/resource/chocolatey_source.rb +24 -2
  248. data/lib/chef/resource/cron/cron.rb +75 -1
  249. data/lib/chef/resource/cron/cron_d.rb +2 -1
  250. data/lib/chef/resource/directory.rb +1 -1
  251. data/lib/chef/resource/dnf_package.rb +4 -6
  252. data/lib/chef/resource/dpkg_package.rb +5 -0
  253. data/lib/chef/resource/execute.rb +1 -4
  254. data/lib/chef/resource/habitat_install.rb +5 -5
  255. data/lib/chef/resource/homebrew_tap.rb +0 -4
  256. data/lib/chef/resource/inspec_waiver.rb +1 -1
  257. data/lib/chef/resource/inspec_waiver_file_entry.rb +1 -1
  258. data/lib/chef/resource/kernel_module.rb +27 -2
  259. data/lib/chef/resource/launchd.rb +0 -3
  260. data/lib/chef/resource/macos_userdefaults.rb +41 -131
  261. data/lib/chef/resource/powershell_package_source.rb +8 -8
  262. data/lib/chef/resource/rhsm_register.rb +31 -0
  263. data/lib/chef/resource/support/client.erb +7 -0
  264. data/lib/chef/resource/windows_auto_run.rb +1 -1
  265. data/lib/chef/resource/windows_dfs_namespace.rb +2 -2
  266. data/lib/chef/resource/windows_feature_powershell.rb +8 -9
  267. data/lib/chef/resource/windows_task.rb +25 -10
  268. data/lib/chef/resource/windows_update_settings.rb +3 -3
  269. data/lib/chef/resource.rb +2 -2
  270. data/lib/chef/resource_reporter.rb +1 -1
  271. data/lib/chef/secret_fetcher/azure_key_vault.rb +64 -8
  272. data/lib/chef/secret_fetcher/hashi_vault.rb +37 -3
  273. data/lib/chef/secret_fetcher.rb +0 -1
  274. data/lib/chef/version.rb +1 -1
  275. data/spec/functional/dsl/reboot_pending_spec.rb +3 -3
  276. data/spec/functional/dsl/registry_helper_spec.rb +1 -1
  277. data/spec/functional/resource/dnf_package_spec.rb +138 -124
  278. data/spec/functional/resource/dpkg_package_spec.rb +16 -0
  279. data/spec/functional/resource/dsc_script_spec.rb +2 -2
  280. data/spec/functional/resource/macos_userdefaults_spec.rb +139 -0
  281. data/spec/functional/resource/registry_spec.rb +81 -81
  282. data/spec/functional/resource/yum_package_spec.rb +789 -129
  283. data/spec/functional/resource/zypper_package_spec.rb +7 -0
  284. data/spec/functional/win32/registry_spec.rb +8 -8
  285. data/spec/integration/client/client_spec.rb +31 -0
  286. data/spec/unit/application/base_spec.rb +40 -0
  287. data/spec/unit/compliance/runner_spec.rb +62 -1
  288. data/spec/unit/data_collector_spec.rb +24 -1
  289. data/spec/unit/dsl/reboot_pending_spec.rb +1 -1
  290. data/spec/unit/file_access_control_spec.rb +1 -1
  291. data/spec/unit/mixin/default_paths_spec.rb +1 -1
  292. data/spec/unit/mixin/securable_spec.rb +3 -3
  293. data/spec/unit/mixin/why_run_spec.rb +53 -0
  294. data/spec/unit/provider/cron_spec.rb +45 -0
  295. data/spec/unit/provider/group/groupadd_spec.rb +1 -0
  296. data/spec/unit/provider/group/usermod_spec.rb +2 -2
  297. data/spec/unit/provider/ifconfig_spec.rb +2 -0
  298. data/spec/unit/provider/mount/linux_spec.rb +16 -3
  299. data/spec/unit/provider/package/bff_spec.rb +1 -0
  300. data/spec/unit/provider/package/powershell_spec.rb +114 -114
  301. data/spec/unit/provider/package/rubygems_spec.rb +8 -5
  302. data/spec/unit/provider/package/solaris_spec.rb +1 -0
  303. data/spec/unit/provider/package/windows_spec.rb +1 -1
  304. data/spec/unit/provider/registry_key_spec.rb +4 -4
  305. data/spec/unit/provider/service/arch_service_spec.rb +2 -2
  306. data/spec/unit/provider/service/debian_service_spec.rb +1 -0
  307. data/spec/unit/provider/service/gentoo_service_spec.rb +1 -0
  308. data/spec/unit/provider/service/macosx_spec.rb +1 -0
  309. data/spec/unit/provider/service/redhat_spec.rb +4 -1
  310. data/spec/unit/provider/service/simple_service_spec.rb +6 -4
  311. data/spec/unit/provider/service/windows_spec.rb +5 -5
  312. data/spec/unit/provider/subversion_spec.rb +4 -4
  313. data/spec/unit/provider/user_spec.rb +2 -0
  314. data/spec/unit/provider/windows_env_spec.rb +1 -1
  315. data/spec/unit/provider/zypper_repository_spec.rb +1 -1
  316. data/spec/unit/resource/chef_client_trusted_certificate_spec.rb +14 -0
  317. data/spec/unit/resource/chocolatey_config_spec.rb +1 -1
  318. data/spec/unit/resource/chocolatey_feature_spec.rb +1 -1
  319. data/spec/unit/resource/chocolatey_source_spec.rb +1 -1
  320. data/spec/unit/resource/dpkg_package_spec.rb +12 -0
  321. data/spec/unit/resource/kernel_module_spec.rb +2 -1
  322. data/spec/unit/resource/macos_user_defaults_spec.rb +36 -96
  323. data/spec/unit/resource/registry_key_spec.rb +10 -10
  324. data/spec/unit/resource/rhsm_register_spec.rb +42 -0
  325. data/spec/unit/resource/windows_auto_run_spec.rb +1 -1
  326. data/spec/unit/resource/windows_feature_powershell_spec.rb +1 -1
  327. data/spec/unit/resource/windows_firewall_rule_spec.rb +2 -2
  328. data/spec/unit/resource/windows_task_spec.rb +3 -3
  329. data/spec/unit/resource_reporter_spec.rb +2 -2
  330. data/spec/unit/resource_spec.rb +5 -0
  331. data/spec/unit/secret_fetcher/azure_key_vault_spec.rb +99 -20
  332. data/spec/unit/secret_fetcher/hashi_vault_spec.rb +46 -0
  333. data/spec/unit/util/backup_spec.rb +1 -1
  334. data/spec/unit/win32/registry_spec.rb +3 -3
  335. metadata +25 -10
  336. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscordaccore_amd64_amd64_5.0.20.51904.dll +0 -0
  337. data/lib/chef/provider/group/suse.rb +0 -82
  338. data/spec/unit/provider/group/suse_spec.rb +0 -90
@@ -100,8 +100,8 @@ class Chef
100
100
  install_command << " -Source \"#{new_resource.source}\"" if new_resource.source
101
101
  install_command << " -IncludeManagementTools" if new_resource.management_tools
102
102
 
103
- cmd = powershell_out!(install_command, timeout: new_resource.timeout)
104
- Chef::Log.info(cmd.stdout)
103
+ cmd = powershell_exec!(install_command, timeout: new_resource.timeout)
104
+ Chef::Log.info(cmd.result)
105
105
 
106
106
  reload_cached_powershell_data # Reload cached powershell feature state
107
107
  end
@@ -115,8 +115,8 @@ class Chef
115
115
 
116
116
  unless features_to_remove.empty?
117
117
  converge_by("remove Windows feature#{"s" if features_to_remove.count > 1} #{features_to_remove.join(",")}") do
118
- cmd = powershell_out!("Uninstall-WindowsFeature #{features_to_remove.join(",")}", timeout: new_resource.timeout)
119
- Chef::Log.info(cmd.stdout)
118
+ cmd = powershell_exec!("Uninstall-WindowsFeature #{features_to_remove.join(",")}", timeout: new_resource.timeout)
119
+ Chef::Log.info(cmd.result)
120
120
 
121
121
  reload_cached_powershell_data # Reload cached powershell feature state
122
122
  end
@@ -132,8 +132,8 @@ class Chef
132
132
 
133
133
  unless features_to_delete.empty?
134
134
  converge_by("delete Windows feature#{"s" if features_to_delete.count > 1} #{features_to_delete.join(",")} from the image") do
135
- cmd = powershell_out!("Uninstall-WindowsFeature #{features_to_delete.join(",")} -Remove", timeout: new_resource.timeout)
136
- Chef::Log.info(cmd.stdout)
135
+ cmd = powershell_exec!("Uninstall-WindowsFeature #{features_to_delete.join(",")} -Remove", timeout: new_resource.timeout)
136
+ Chef::Log.info(cmd.result)
137
137
 
138
138
  reload_cached_powershell_data # Reload cached powershell feature state
139
139
  end
@@ -215,9 +215,8 @@ class Chef
215
215
  # fetch the list of available feature names and state in JSON and parse the JSON
216
216
  def parsed_feature_list
217
217
  # Grab raw feature information from WindowsFeature
218
- raw_list_of_features = powershell_out!("Get-WindowsFeature | Select-Object -Property Name,InstallState | ConvertTo-Json -Compress", timeout: new_resource.timeout).stdout
219
-
220
- Chef::JSONCompat.from_json(raw_list_of_features)
218
+ raw_list_of_features = powershell_exec!("Get-WindowsFeature | Select-Object -Property Name,InstallState", timeout: new_resource.timeout).result
219
+ raw_list_of_features || []
221
220
  end
222
221
 
223
222
  # add the features values to the appropriate array
@@ -149,7 +149,6 @@ class Chef
149
149
  DOC
150
150
 
151
151
  allowed_actions :create, :delete, :run, :end, :enable, :disable, :change
152
- default_action :create
153
152
 
154
153
  property :task_name, String, regex: [%r{\A[^/\:\*\?\<\>\|]+\z}],
155
154
  description: "An optional property to set the task name if it differs from the resource block's name. Example: `Task Name` or `/Task Name`",
@@ -182,10 +181,19 @@ class Chef
182
181
  default: false
183
182
 
184
183
  property :frequency_modifier, [Integer, String],
185
- default: 1
184
+ default: 1,
185
+ description: <<~DOCS
186
+ * For frequency `:minute` valid values are 1 to 1439
187
+ * For frequency `:hourly` valid values are 1 to 23
188
+ * For frequency `:daily` valid values are 1 to 365
189
+ * For frequency `:weekly` valid values are 1 to 52
190
+ * For frequency `:monthly` valid values are `('FIRST', 'SECOND', 'THIRD', 'FOURTH', 'LAST')` OR `1-12`.
191
+ * e.g. If user want to run the task on `second week of the month` use `frequency_modifier` value as `SECOND`. Multiple values for weeks of the month should be comma separated e.g. `"FIRST, THIRD, LAST"`.
192
+ * To run task every (n) months use values 1 to 12.
193
+ DOCS
186
194
 
187
195
  property :frequency, Symbol, equal_to: %i{minute hourly daily weekly monthly once on_logon onstart on_idle none},
188
- description: "The frequency with which to run the task."
196
+ description: "The frequency with which to run the task. Note: This property is required in Chef Infra Client 14.1 or later. Note: The `:once` value requires the `start_time` property to be set."
189
197
 
190
198
  property :start_day, String,
191
199
  description: "Specifies the first date on which the task runs in **MM/DD/YYYY** format.",
@@ -195,7 +203,14 @@ class Chef
195
203
  description: "Specifies the start time to run the task, in **HH:mm** format."
196
204
 
197
205
  property :day, [String, Integer],
198
- description: "The day(s) on which the task runs."
206
+ description: <<~DOCS
207
+ The day(s) on which the task runs.
208
+ * Use this property when setting `frequency` to `:monthly` or `:weekly`.
209
+ * Valid values with frequency `:weekly` are `MON`-`SUN` or `*`.
210
+ * Valid values with frequency `:monthly` are `1-31`, `MON`-`SUN`, and `LASTDAY`.
211
+ * Use `MON`-`SUN` or `LASTDAY` if you are setting `frequency_modifier` as "FIRST, SECOND, THIRD etc." else use 1-31.
212
+ * Multiple days should be comma separated. e.g `1, 2, 3` or `MON, WED, FRI`.
213
+ DOCS
199
214
 
200
215
  property :months, String,
201
216
  description: "The Months of the year on which the task runs, such as: `JAN, FEB` or `*`. Multiple months should be comma delimited. e.g. `Jan, Feb, Mar, Dec`."
@@ -961,7 +976,7 @@ class Chef
961
976
  end
962
977
  end
963
978
 
964
- action :create do
979
+ action :create, description: "Creates a scheduled task, or updates an existing task if any property has changed." do
965
980
  set_command_and_arguments if new_resource.command
966
981
 
967
982
  if current_resource.exists
@@ -998,7 +1013,7 @@ class Chef
998
1013
  end
999
1014
  end
1000
1015
 
1001
- action :run do
1016
+ action :run, description: "Runs a scheduled task." do
1002
1017
  if current_resource.exists
1003
1018
  logger.trace "#{new_resource} task exists"
1004
1019
  if current_resource.task.status == "running"
@@ -1013,7 +1028,7 @@ class Chef
1013
1028
  end
1014
1029
  end
1015
1030
 
1016
- action :delete do
1031
+ action :delete, description: "Deletes a scheduled task." do
1017
1032
  if current_resource.exists
1018
1033
  logger.trace "#{new_resource} task exists"
1019
1034
  converge_by("delete scheduled task #{new_resource}") do
@@ -1026,7 +1041,7 @@ class Chef
1026
1041
  end
1027
1042
  end
1028
1043
 
1029
- action :end do
1044
+ action :end, description: "Ends a scheduled task." do
1030
1045
  if current_resource.exists
1031
1046
  logger.trace "#{new_resource} task exists"
1032
1047
  if current_resource.task.status != "running"
@@ -1041,7 +1056,7 @@ class Chef
1041
1056
  end
1042
1057
  end
1043
1058
 
1044
- action :enable do
1059
+ action :enable, description: "Enables a scheduled task." do
1045
1060
  if current_resource.exists
1046
1061
  logger.trace "#{new_resource} task exists"
1047
1062
  if current_resource.task.status == "not scheduled"
@@ -1058,7 +1073,7 @@ class Chef
1058
1073
  end
1059
1074
  end
1060
1075
 
1061
- action :disable do
1076
+ action :disable, description: "Disables a scheduled task." do
1062
1077
  if current_resource.exists
1063
1078
  logger.info "#{new_resource} task exists"
1064
1079
  if %w{ready running}.include?(current_resource.task.status)
@@ -145,7 +145,7 @@ class Chef
145
145
  action :set, description: "Set Windows Update settings." do
146
146
  actual_day = convert_day(new_resource.scheduled_install_day)
147
147
 
148
- registry_key 'HKEY_LOCAL_MACHINE\\Software\\Policies\\Microsoft\\Windows\\WindowsUpdate' do
148
+ registry_key "HKEY_LOCAL_MACHINE\\Software\\Policies\\Microsoft\\Windows\\WindowsUpdate" do
149
149
  recursive true
150
150
  values [{
151
151
  name: "DisableOSUpgrade",
@@ -180,7 +180,7 @@ class Chef
180
180
  action :create
181
181
  end
182
182
 
183
- registry_key 'HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer' do
183
+ registry_key "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer" do
184
184
  recursive true
185
185
  values [{
186
186
  name: "NoWindowsUpdate",
@@ -190,7 +190,7 @@ class Chef
190
190
  action :create
191
191
  end
192
192
 
193
- registry_key 'HKEY_LOCAL_MACHINE\\Software\\Policies\\Microsoft\\Windows\\WindowsUpdate\\AU' do
193
+ registry_key "HKEY_LOCAL_MACHINE\\Software\\Policies\\Microsoft\\Windows\\WindowsUpdate\\AU" do
194
194
  recursive true
195
195
  values [{
196
196
  name: "AUOptions",
data/lib/chef/resource.rb CHANGED
@@ -454,7 +454,7 @@ class Chef
454
454
  # @param arg [String] The umask to apply while converging the resource.
455
455
  # @return [Boolean] The umask to apply while converging the resource.
456
456
  #
457
- property :umask, String,
457
+ property :umask, [String, Integer],
458
458
  desired_state: false,
459
459
  introduced: "16.2",
460
460
  description: "Set a umask to be used for the duration of converging the resource. Defaults to `nil`, which means to use the system umask. Unsupported on Windows because Windows lacks a direct equivalent to UNIX's umask."
@@ -1508,7 +1508,7 @@ class Chef
1508
1508
  # @return Chef::CookbookVersion The cookbook in which this Resource was defined.
1509
1509
  #
1510
1510
  def cookbook_version
1511
- if cookbook_name
1511
+ if cookbook_name && cookbook_name != "@recipe_files"
1512
1512
  run_context.cookbook_collection[cookbook_name]
1513
1513
  end
1514
1514
  end
@@ -41,7 +41,7 @@ class Chef
41
41
  as_hash["result"] = action_record.action.to_s
42
42
  if new_resource.cookbook_name
43
43
  as_hash["cookbook_name"] = new_resource.cookbook_name
44
- as_hash["cookbook_version"] = new_resource.cookbook_version.version
44
+ as_hash["cookbook_version"] = new_resource.cookbook_version&.version
45
45
  end
46
46
 
47
47
  as_hash
@@ -1,4 +1,8 @@
1
1
  require_relative "base"
2
+ require_relative "../exceptions"
3
+ require "json" unless defined?(JSON)
4
+ require "net/http" unless defined?(Net::HTTP)
5
+ require "uri" unless defined?(URI)
2
6
 
3
7
  class Chef
4
8
  class SecretFetcher
@@ -14,13 +18,19 @@ class Chef
14
18
  #
15
19
  # @example
16
20
  #
17
- # fetcher = SecretFetcher.for_service(:azure_key_vault, { vault: "my_vault" }, run_context )
21
+ # fetcher = SecretFetcher.for_service(:azure_key_vault, { vault: "my_vault" }, run_context)
18
22
  # fetcher.fetch("secretkey1", "v1")
19
23
  #
20
24
  # @example
21
25
  #
22
- # fetcher = SecretFetcher.for_service(:azure_key_vault, {}, run_context )
26
+ # fetcher = SecretFetcher.for_service(:azure_key_vault, {}, run_context)
23
27
  # fetcher.fetch("my_vault/secretkey1", "v1")
28
+ #
29
+ # @example
30
+ #
31
+ # fetcher = SecretFetcher.for_service(:azure_key_vault, { client_id: "540d76b6-7f76-456c-b68b-ccae4dc9d99d" }, run_context)
32
+ # fetcher.fetch("my_vault/secretkey1", "v1")
33
+ #
24
34
  class AzureKeyVault < Base
25
35
 
26
36
  def do_fetch(name, version)
@@ -48,6 +58,12 @@ class Chef
48
58
  end
49
59
  end
50
60
 
61
+ def validate!
62
+ raise Chef::Exceptions::Secret::ConfigurationInvalid, "You may only specify one (these are mutually exclusive): :object_id, :client_id, or :mi_res_id" if [object_id, client_id, mi_res_id].select { |x| !x.nil? }.length > 1
63
+ end
64
+
65
+ private
66
+
51
67
  # Determine the vault name and secret name from the provided name.
52
68
  # If it is not in the provided name in the form "vault_name/secret_name"
53
69
  # it will determine the vault name from `config[:vault]`.
@@ -63,16 +79,56 @@ class Chef
63
79
  end
64
80
  end
65
81
 
82
+ def api_version
83
+ "2018-02-01"
84
+ end
85
+
86
+ def resource
87
+ "https://vault.azure.net"
88
+ end
89
+
90
+ def object_id
91
+ config[:object_id]
92
+ end
93
+
94
+ def client_id
95
+ config[:client_id]
96
+ end
97
+
98
+ def mi_res_id
99
+ config[:mi_res_id]
100
+ end
101
+
102
+ def token_query
103
+ @token_query ||= begin
104
+ p = {}
105
+ p["api-version"] = api_version
106
+ p["resource"] = resource
107
+ p["object_id"] = object_id if object_id
108
+ p["client_id"] = client_id if client_id
109
+ p["mi_res_id"] = mi_res_id if mi_res_id
110
+ URI.encode_www_form(p)
111
+ end
112
+ end
113
+
66
114
  def fetch_token
67
- token_uri = URI.parse("http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https%3A%2F%2Fvault.azure.net")
115
+ token_uri = URI.parse("http://169.254.169.254/metadata/identity/oauth2/token")
116
+ token_uri.query = token_query
68
117
  http = Net::HTTP.new(token_uri.host, token_uri.port)
69
118
  response = http.get(token_uri, { "Metadata" => "true" })
70
- body = JSON.parse(response.body)
71
- body["access_token"]
119
+
120
+ case response
121
+ when Net::HTTPSuccess
122
+ body = JSON.parse(response.body)
123
+ body["access_token"]
124
+ when Net::HTTPBadRequest
125
+ body = JSON.parse(response.body)
126
+ raise Chef::Exceptions::Secret::Azure::IdentityNotFound if body["error_description"] =~ /identity not found/i
127
+ else
128
+ body = JSON.parse(response.body)
129
+ body["access_token"]
130
+ end
72
131
  end
73
132
  end
74
133
  end
75
134
  end
76
-
77
-
78
-
@@ -31,6 +31,10 @@ class Chef
31
31
  # :auth_method - one of :iam_role, :token. default: :iam_role
32
32
  # :vault_addr - the address of a running Vault instance, eg https://vault.example.com:8200
33
33
  #
34
+ # For `:approle`: one of `:approle_name` or `:approle_id`
35
+ # `:approle_name`: The name of the approle to use for authentication. When specified, associated `:approle_id` will be found via query to Vault instance.
36
+ # `:approle_id`: The ID of the approle to use for authentication, requires `:approle_secret_id`
37
+ # `:approle_secret_id`: The Vault `secret_id` associated with the provided `:approle_name` or `:approle_id`. When specified, prevents need to create `:secret_id` with `:approle_name`.
34
38
  # For `:token` auth: `:token` - a Vault token valid for authentication.
35
39
  #
36
40
  # For `:iam_role`: `:role_name` - the name of the role in Vault that was created
@@ -47,14 +51,25 @@ class Chef
47
51
  #
48
52
  # @example
49
53
  #
50
- # fetcher = SecretFetcher.for_service(:hashi_vault, { role_name: "testing-role", vault_addr: https://localhost:8200}, run_context )
54
+ # fetcher = SecretFetcher.for_service(:hashi_vault, { auth_method: :iam_role, role_name: "testing-role", vault_addr: https://localhost:8200}, run_context )
51
55
  # fetcher.fetch("secretkey1")
52
56
  #
53
57
  # @example
54
58
  #
55
- # fetcher = SecretFetcher.for_service(:hashi_vault, { auth_method: :token, token: "s.1234abcdef", vault_addr: https://localhost:8200}, run_context )
59
+ # fetcher = SecretFetcher.for_service(:hashi_vault, { auth_method: :token, token: "s.1234abcdef", vault_addr: https://localhost:8200}, approle: 'approle_name', run_context )
56
60
  # fetcher.fetch("secretkey1")
57
- SUPPORTED_AUTH_TYPES = %i{iam_role token}.freeze
61
+ #
62
+ # @example
63
+ #
64
+ # fetcher = SecretFetcher.for_service(:hashi_vault, { auth_method: :approle, approle_id: "11111111-abcd-1111-abcd-111111111111", approle_secret_id: "22222222-abcd-2222-abcd-222222222222", vault_addr: https://localhost:8200}, run_context )
65
+ # fetcher.fetch("secretkey1")
66
+ #
67
+ # @example
68
+ #
69
+ # fetcher = SecretFetcher.for_service(:hashi_vault, { auth_method: :approle, approle_name: "testing-role", token: "s.1234abcdef", vault_addr: https://localhost:8200}, run_context )
70
+ # fetcher.fetch("secretkey1")
71
+ #
72
+ SUPPORTED_AUTH_TYPES = %i{approle iam_role token}.freeze
58
73
  class HashiVault < Base
59
74
 
60
75
  # Validate and authenticate the current session using the configured auth strategy and parameters
@@ -67,6 +82,25 @@ class Chef
67
82
  Vault.namespace = config[:namespace] unless config[:namespace].nil?
68
83
 
69
84
  case config[:auth_method]
85
+ when :approle
86
+ unless config[:approle_name] || config[:approle_id]
87
+ raise Chef::Exceptions::Secret::ConfigurationInvalid.new("You must provide the :approle_name or :approle_id in the configuration with :auth_method set to :approle")
88
+ end
89
+
90
+ # When :approle_id and :approle_secret_id are both specified, all pieces are present which are needed to authenticate using an approle.
91
+ # If either is missing, we need to authenticate to Vault to get the missing pieces with the :approle_name and optionally :token.
92
+ unless config[:approle_id] && config[:approle_secret_id]
93
+ if config[:approle_name].nil?
94
+ raise Chef::Exceptions::Secret::ConfigurationInvalid.new("You must provide the :approle_name in the configuration when :approle_id and :approle_secret_id are not both present with :auth_method set to :approle")
95
+ end
96
+
97
+ Vault.token = config[:token] unless config[:token].nil?
98
+ end
99
+
100
+ approle_id = config[:approle_id] || Vault.approle.role_id(config[:approle_name])
101
+ approle_secret_id = config[:approle_secret_id] || Vault.approle.create_secret_id(config[:approle_name]).data[:secret_id]
102
+
103
+ Vault.auth.approle(approle_id, approle_secret_id)
70
104
  when :token
71
105
  if config[:token].nil?
72
106
  raise Chef::Exceptions::Secret::ConfigurationInvalid.new("You must provide the token in the configuration as :token")
@@ -58,4 +58,3 @@ class Chef
58
58
  end
59
59
  end
60
60
  end
61
-
data/lib/chef/version.rb CHANGED
@@ -23,7 +23,7 @@ require_relative "version_string"
23
23
 
24
24
  class Chef
25
25
  CHEF_ROOT = File.expand_path("..", __dir__)
26
- VERSION = Chef::VersionString.new("17.6.18")
26
+ VERSION = Chef::VersionString.new("17.9.18")
27
27
  end
28
28
 
29
29
  #
@@ -39,8 +39,8 @@ describe Chef::DSL::RebootPending, :windows_only do
39
39
  let(:reg_key) { nil }
40
40
  let(:original_set) { false }
41
41
 
42
- describe 'HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations' do
43
- let(:reg_key) { 'HKLM\SYSTEM\CurrentControlSet\Control\Session Manager' }
42
+ describe "HKLM\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\PendingFileRenameOperations" do
43
+ let(:reg_key) { "HKLM\\SYSTEM\\CurrentControlSet\\Control\\Session Manager" }
44
44
  let(:original_set) { registry.value_exists?(reg_key, { name: "PendingFileRenameOperations" }) }
45
45
 
46
46
  it "returns true if the registry value exists" do
@@ -78,7 +78,7 @@ describe Chef::DSL::RebootPending, :windows_only do
78
78
 
79
79
  describe "when there is nothing to indicate a reboot is pending" do
80
80
  it "should return false" do
81
- skip "reboot pending" if registry_value_exists?('HKLM\SYSTEM\CurrentControlSet\Control\Session Manager', { name: "PendingFileRenameOperations" }) ||
81
+ skip "reboot pending" if registry_value_exists?("HKLM\\SYSTEM\\CurrentControlSet\\Control\\Session Manager", { name: "PendingFileRenameOperations" }) ||
82
82
  registry_key_exists?('HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired') ||
83
83
  registry_key_exists?('HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending')
84
84
  expect(recipe.reboot_pending?).to be_falsey
@@ -24,7 +24,7 @@ describe Chef::Resource::RegistryKey, :windows_only do
24
24
  before(:all) do
25
25
  ::Win32::Registry::HKEY_CURRENT_USER.create "Software\\Root"
26
26
  ::Win32::Registry::HKEY_CURRENT_USER.create "Software\\Root\\Branch"
27
- ::Win32::Registry::HKEY_CURRENT_USER.open('Software\\Root', Win32::Registry::KEY_ALL_ACCESS) do |reg|
27
+ ::Win32::Registry::HKEY_CURRENT_USER.open("Software\\Root", Win32::Registry::KEY_ALL_ACCESS) do |reg|
28
28
  reg["RootType1", Win32::Registry::REG_SZ] = "fibrous"
29
29
  reg.write("Roots", Win32::Registry::REG_MULTI_SZ, ["strong roots", "healthy tree"])
30
30
  end