winrm-s 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +3 -3
- data/CHANGELOG.md +5 -0
- data/Gemfile +2 -1
- data/Rakefile +16 -1
- data/lib/winrm-s/version.rb +1 -1
- data/lib/winrm/http/auth.rb +1 -1
- data/lib/winrm/winrm_service_patch.rb +1 -1
- data/spec/functional/sspi_nego_encrypt_decrypt_spec.rb +3 -18
- data/spec/spec_helper.rb +0 -5
- data/winrm-s.gemspec +1 -1
- metadata +11 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1ca75e230abc66bf7c5727a7b7b1cf8a91ba371
|
4
|
+
data.tar.gz: 1ea8c69888c111ddaede020425212a12bda2c650
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 39fe8cbc177f8d2986758a833a8ead44719951f027b0dc524ac991026cf33f7e374bd8ac4b88209ad05ef5eb74bbd39a952951111dc79212ae306725c18b8fed
|
7
|
+
data.tar.gz: 0da71b1d4e730c52036ff527d40771d0933b604f16af7ff86b57ee84fd953cfa47a449ba52d40e983d0fe4d5471b7ab7fd18476674b6dc0223d46357f5b3ae6a
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,11 @@
|
|
2
2
|
Unreleased
|
3
3
|
--------------
|
4
4
|
|
5
|
+
Release: 0.3.2
|
6
|
+
--------------
|
7
|
+
* Strip UTF-8 BOM from response added by win2k8R2 since newer WinRM versions now use UTF-8
|
8
|
+
* Decode all authorized payloads, not just successful ones so an unsuccesful command error can be communicated
|
9
|
+
|
5
10
|
Release: 0.3.1
|
6
11
|
--------------
|
7
12
|
* [Issue #27](https://github.com/chef/winrm-s/pull/27): Fixes problem with AllowUnencrypted being true and using negotiate
|
data/Gemfile
CHANGED
data/Rakefile
CHANGED
@@ -1 +1,16 @@
|
|
1
|
-
require 'bundler
|
1
|
+
require 'bundler'
|
2
|
+
require 'rspec/core/rake_task'
|
3
|
+
|
4
|
+
Bundler::GemHelper.install_tasks
|
5
|
+
|
6
|
+
task :default => [:unit_spec]
|
7
|
+
|
8
|
+
desc "Run all functional specs in spec directory"
|
9
|
+
RSpec::Core::RakeTask.new(:functional_spec) do |t|
|
10
|
+
t.pattern = 'spec/functional/**/*_spec.rb'
|
11
|
+
end
|
12
|
+
|
13
|
+
desc "Run all unit specs in spec directory"
|
14
|
+
RSpec::Core::RakeTask.new(:unit_spec) do |t|
|
15
|
+
t.pattern = 'spec/unit/**/*_spec.rb'
|
16
|
+
end
|
data/lib/winrm-s/version.rb
CHANGED
data/lib/winrm/http/auth.rb
CHANGED
@@ -66,7 +66,7 @@ module WinRM
|
|
66
66
|
output = Output.new
|
67
67
|
REXML::XPath.match(resp_doc, "//#{NS_WIN_SHELL}:Stream").each do |n|
|
68
68
|
next if n.text.nil? || n.text.empty?
|
69
|
-
stream = { n.attributes['Name'].to_sym => Base64.decode64(n.text) }
|
69
|
+
stream = { n.attributes['Name'].to_sym => Base64.decode64(n.text).force_encoding('utf-8').sub("\xEF\xBB\xBF", "") }
|
70
70
|
output[:data] << stream
|
71
71
|
yield stream[:stdout], stream[:stderr] if block_given?
|
72
72
|
end
|
@@ -10,7 +10,7 @@ def assert_prerequisites
|
|
10
10
|
end
|
11
11
|
|
12
12
|
|
13
|
-
describe "Test sspinegotiate with encrypt/decrypt via WinRM"
|
13
|
+
describe "Test sspinegotiate with encrypt/decrypt via WinRM" do
|
14
14
|
before(:all) do
|
15
15
|
assert_prerequisites
|
16
16
|
# Remember the user setting.
|
@@ -21,7 +21,7 @@ describe "Test sspinegotiate with encrypt/decrypt via WinRM", :windows_and_func_
|
|
21
21
|
|
22
22
|
before do
|
23
23
|
%x{winrm set winrm/config/service @{AllowUnencrypted="false"}}
|
24
|
-
@winrm = WinRM::WinRMWebService.new(ENV["test_winrm_endpoint"], :sspinegotiate, :user => ENV["test_winrm_user"], :pass => ENV["test_winrm_pass"])
|
24
|
+
@winrm = WinRM::WinRMWebService.new(ENV["test_winrm_endpoint"], :sspinegotiate, :user => ENV["test_winrm_user"].dup, :pass => ENV["test_winrm_pass"].dup)
|
25
25
|
end
|
26
26
|
|
27
27
|
after(:all) do
|
@@ -47,19 +47,4 @@ describe "Test sspinegotiate with encrypt/decrypt via WinRM", :windows_and_func_
|
|
47
47
|
end
|
48
48
|
expect(outvar).to match(/Windows IP Configuration/)
|
49
49
|
end
|
50
|
-
|
51
|
-
describe "Negative test:" do
|
52
|
-
before do
|
53
|
-
%x{winrm set winrm/config/service @{AllowUnencrypted="true"}}
|
54
|
-
end
|
55
|
-
after do
|
56
|
-
%x{winrm set winrm/config/service @{AllowUnencrypted="false"}}
|
57
|
-
end
|
58
|
-
|
59
|
-
describe "when AllowUnencrypted is set to true" do
|
60
|
-
it "should raise an exception" do
|
61
|
-
expect{@winrm.run_cmd('ipconfig')}.to raise_exception
|
62
|
-
end
|
63
|
-
end
|
64
|
-
end
|
65
|
-
end
|
50
|
+
end
|
data/spec/spec_helper.rb
CHANGED
@@ -10,12 +10,7 @@ def unix?
|
|
10
10
|
!windows?
|
11
11
|
end
|
12
12
|
|
13
|
-
def windows_and_func_spec_enabled?
|
14
|
-
windows? and ENV["enable_winrms_func_spec"]
|
15
|
-
end
|
16
|
-
|
17
13
|
RSpec.configure do |config|
|
18
14
|
config.filter_run_excluding :windows_only => true unless windows?
|
19
|
-
config.filter_run_excluding :windows_and_func_spec_enabled => true unless windows_and_func_spec_enabled?
|
20
15
|
config.filter_run_excluding :unix_only => true unless unix?
|
21
16
|
end
|
data/winrm-s.gemspec
CHANGED
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
|
|
14
14
|
s.summary = %q{Gem that extends the functionality of the WinRM gem to support the Microsoft Negotiate protocol when authenticating to a remote WinRM endpoint from a Windows system}
|
15
15
|
s.description = s.summary
|
16
16
|
|
17
|
-
s.add_dependency "winrm", "~> 1.3.
|
17
|
+
s.add_dependency "winrm", "~> 1.3", ">= 1.3.6"
|
18
18
|
|
19
19
|
%w(rspec-core rspec-expectations rspec-mocks rspec_junit_formatter).each { |gem| s.add_development_dependency gem }
|
20
20
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: winrm-s
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kaustubh Deorukhkar
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: winrm
|
@@ -16,14 +16,20 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.3
|
19
|
+
version: '1.3'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 1.3.6
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
27
|
- - "~>"
|
25
28
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.3
|
29
|
+
version: '1.3'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 1.3.6
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: rspec-core
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -131,11 +137,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
131
137
|
version: '0'
|
132
138
|
requirements: []
|
133
139
|
rubyforge_project:
|
134
|
-
rubygems_version: 2.4.
|
140
|
+
rubygems_version: 2.4.8
|
135
141
|
signing_key:
|
136
142
|
specification_version: 4
|
137
143
|
summary: Gem that extends the functionality of the WinRM gem to support the Microsoft
|
138
144
|
Negotiate protocol when authenticating to a remote WinRM endpoint from a Windows
|
139
145
|
system
|
140
146
|
test_files: []
|
141
|
-
has_rdoc: true
|