net-ssh-krb 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: e8eef9475050a1c97c194780b45cd18f4d880f3f
4
+ data.tar.gz: 3841e98a624a3d8114d81eff1c134f686f9295e8
5
+ SHA512:
6
+ metadata.gz: 069dbc4935acda421b734e5aefc72ae32f494e8eef9023d1e1600df75a4e8d29c2d9690ecaeacb8da294eec7452c0ffbe2293a5f2b66581d5448e9e80e559425
7
+ data.tar.gz: 1dfe3a72c71375605e0fda96cc6cf750c6b2a4f7c3c6bde2279ab85ad5d62db0e66f564fe5ae0a844bf326a4d2c09924fb1aea1e2c8b78637b5f388461fccff2
data/.gitignore CHANGED
@@ -7,3 +7,4 @@ doc
7
7
  rdoc
8
8
  pkg
9
9
  Capfile
10
+ Gemfile.lock
data/README.md CHANGED
@@ -17,6 +17,28 @@ Add the following lines to the top of your Capfile (the relevant :auth_method is
17
17
  set :ssh_options, { :auth_methods => %w(gssapi-with-mic publickey hostbased password keyboard-interactive) }
18
18
  ```
19
19
 
20
+ ## How to use with 'net/ssh'
21
+
22
+ With bundler, add the following lines to Gemfile.
23
+
24
+ ```
25
+ gem 'net-ssh', :require => 'net/ssh'
26
+ gem 'net-ssh-krb'
27
+ ```
28
+
29
+ Set :auth_methods in Net::SSH options.
30
+
31
+ ```
32
+ #!/usr/bin/env ruby
33
+ require 'rubygems'
34
+ require 'bundler'
35
+ Bundler.require
36
+
37
+ Net::SSH.start('10.3.18.198', 'root', {:auth_methods => ["gssapi-with-mic"]}) do |ssh|
38
+ puts ssh.exec!('hostname')
39
+ end
40
+ ```
41
+
20
42
  ## Contributors
21
43
 
22
44
  - Joe Khoobyar http://github.com/joekhoobyar
data/Rakefile CHANGED
@@ -1,2 +1,9 @@
1
1
  require 'rubygems'
2
2
  require "bundler/gem_tasks"
3
+
4
+
5
+ require "rspec/core/rake_task"
6
+
7
+ RSpec::Core::RakeTask.new(:spec)
8
+
9
+ task :default => :spec
@@ -19,7 +19,8 @@ module Net
19
19
  debug { "trying kerberos authentication" }
20
20
  req = userauth_request(username, next_service, "gssapi-with-mic")
21
21
  req.write_long(1)
22
- req.write_string(supported_oid = 6.chr + GSS_KRB5_MECH.length.chr + GSS_KRB5_MECH)
22
+ supported_oid = (6.chr + GSS_KRB5_MECH.length.chr + GSS_KRB5_MECH).force_encoding(Encoding::ASCII_8BIT)
23
+ req.write_string(supported_oid)
23
24
  send_message req
24
25
  message = session.next_message
25
26
  case message.type
@@ -33,7 +34,7 @@ module Net
33
34
  end
34
35
 
35
36
  # Try to match the OID.
36
- oid = message.read_string
37
+ oid = message.read_string.force_encoding(Encoding::ASCII_8BIT)
37
38
  if oid != supported_oid
38
39
  info { "gssapi-with-mic failed (USERAUTH_GSSAPI_RESPONSE)" }
39
40
  return false
@@ -0,0 +1 @@
1
+ require 'net/ssh/kerberos'
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{net-ssh-krb}
5
- s.version = "0.3.0"
5
+ s.version = "0.4.0"
6
6
  s.authors = ["Joe Khoobyar", "Chris Beer"]
7
7
  s.description = %q{Extends Net::SSH by adding Kerberos authentication capability for password-less logins on multiple platforms.
8
8
  }
@@ -17,7 +17,8 @@ Gem::Specification.new do |s|
17
17
  s.summary = %q{Add Kerberos support to Net::SSH}
18
18
 
19
19
  s.add_dependency 'net-ssh', '>= 2.0'
20
- s.add_dependency 'gssapi', '~> 1.1.2'
21
- s.add_development_dependency 'rspec'
20
+ s.add_dependency 'gssapi', '~> 1.2.0'
21
+
22
+ s.add_development_dependency 'rake'
23
+ s.add_development_dependency 'rspec', "~> 3.0"
22
24
  end
23
-
@@ -1,7 +1,14 @@
1
1
  require 'spec_helper'
2
2
  require 'net/ssh'
3
+
3
4
  describe "run commands on a kerberized server" do
5
+ let :conn do
6
+ Net::SSH.start(ENV['KERBEROS_TEST_HOST'], ENV['USER'], :auth_methods => ["gssapi-with-mic", "publickey"])
7
+ end
8
+
4
9
  it "it should work" do
5
- Net::SSH.start(ENV['KERBEROS_TEST_HOST'], ENV['USER'], :auth_methods => ["gssapi-with-mic", "publickey"]).exec!("whoami").strip.should == ENV['USER']
10
+ remote_user_name = conn.exec!("whoami")
11
+
12
+ expect(remote_user_name.strip).to eq ENV['USER']
6
13
  end
7
- end
14
+ end
@@ -3,7 +3,6 @@ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
3
3
 
4
4
  require 'bundler/setup'
5
5
  require 'rspec'
6
- require 'rspec/autorun'
7
6
 
8
7
  ruby_engine = defined?(RUBY_ENGINE) ? RUBY_ENGINE : "ruby"
9
8
  if ENV['COVERAGE'] and RUBY_VERSION =~ /^1.9/ and ruby_engine != "jruby"
@@ -14,4 +13,4 @@ end
14
13
  require 'net/ssh/kerberos'
15
14
 
16
15
  RSpec.configure do |config|
17
- end
16
+ end
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: net-ssh-krb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
5
- prerelease:
4
+ version: 0.4.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Joe Khoobyar
@@ -10,60 +9,66 @@ authors:
10
9
  autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2013-04-01 00:00:00.000000000 Z
12
+ date: 2014-09-25 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: net-ssh
17
16
  requirement: !ruby/object:Gem::Requirement
18
- none: false
19
17
  requirements:
20
- - - ! '>='
18
+ - - ">="
21
19
  - !ruby/object:Gem::Version
22
20
  version: '2.0'
23
21
  type: :runtime
24
22
  prerelease: false
25
23
  version_requirements: !ruby/object:Gem::Requirement
26
- none: false
27
24
  requirements:
28
- - - ! '>='
25
+ - - ">="
29
26
  - !ruby/object:Gem::Version
30
27
  version: '2.0'
31
28
  - !ruby/object:Gem::Dependency
32
29
  name: gssapi
33
30
  requirement: !ruby/object:Gem::Requirement
34
- none: false
35
31
  requirements:
36
- - - ~>
32
+ - - "~>"
37
33
  - !ruby/object:Gem::Version
38
- version: 1.1.2
34
+ version: 1.2.0
39
35
  type: :runtime
40
36
  prerelease: false
41
37
  version_requirements: !ruby/object:Gem::Requirement
42
- none: false
43
38
  requirements:
44
- - - ~>
39
+ - - "~>"
45
40
  - !ruby/object:Gem::Version
46
- version: 1.1.2
41
+ version: 1.2.0
47
42
  - !ruby/object:Gem::Dependency
48
- name: rspec
43
+ name: rake
49
44
  requirement: !ruby/object:Gem::Requirement
50
- none: false
51
45
  requirements:
52
- - - ! '>='
46
+ - - ">="
53
47
  - !ruby/object:Gem::Version
54
48
  version: '0'
55
49
  type: :development
56
50
  prerelease: false
57
51
  version_requirements: !ruby/object:Gem::Requirement
58
- none: false
59
52
  requirements:
60
- - - ! '>='
53
+ - - ">="
61
54
  - !ruby/object:Gem::Version
62
55
  version: '0'
63
- description: ! 'Extends Net::SSH by adding Kerberos authentication capability for
64
- password-less logins on multiple platforms.
65
-
66
- '
56
+ - !ruby/object:Gem::Dependency
57
+ name: rspec
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - "~>"
61
+ - !ruby/object:Gem::Version
62
+ version: '3.0'
63
+ type: :development
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: '3.0'
70
+ description: |
71
+ Extends Net::SSH by adding Kerberos authentication capability for password-less logins on multiple platforms.
67
72
  email: joe@ankhcraft.com cabeer@stanford.edu
68
73
  executables: []
69
74
  extensions: []
@@ -71,9 +76,8 @@ extra_rdoc_files:
71
76
  - LICENSE
72
77
  - README.md
73
78
  files:
74
- - .gitignore
79
+ - ".gitignore"
75
80
  - Gemfile
76
- - Gemfile.lock
77
81
  - LICENSE
78
82
  - README.md
79
83
  - Rakefile
@@ -83,34 +87,33 @@ files:
83
87
  - lib/net/ssh/authentication/methods/gssapi_with_mic.rb
84
88
  - lib/net/ssh/kerberos.rb
85
89
  - lib/net/ssh/kerberos/constants.rb
90
+ - lib/net/ssh/krb.rb
86
91
  - net-ssh-kerberos.gemspec
87
92
  - spec/integration_spec.rb
88
93
  - spec/spec_helper.rb
89
94
  homepage: http://github.com/cbeer/net-ssh-kerberos
90
95
  licenses: []
96
+ metadata: {}
91
97
  post_install_message:
92
98
  rdoc_options: []
93
99
  require_paths:
94
100
  - lib
95
101
  required_ruby_version: !ruby/object:Gem::Requirement
96
- none: false
97
102
  requirements:
98
- - - ! '>='
103
+ - - ">="
99
104
  - !ruby/object:Gem::Version
100
105
  version: '0'
101
106
  required_rubygems_version: !ruby/object:Gem::Requirement
102
- none: false
103
107
  requirements:
104
- - - ! '>='
108
+ - - ">="
105
109
  - !ruby/object:Gem::Version
106
110
  version: '0'
107
111
  requirements: []
108
112
  rubyforge_project:
109
- rubygems_version: 1.8.23
113
+ rubygems_version: 2.2.2
110
114
  signing_key:
111
- specification_version: 3
115
+ specification_version: 4
112
116
  summary: Add Kerberos support to Net::SSH
113
117
  test_files:
114
118
  - spec/integration_spec.rb
115
119
  - spec/spec_helper.rb
116
- has_rdoc:
@@ -1,31 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- net-ssh-krb (0.2.7)
5
- gssapi (~> 1.1.2)
6
- net-ssh (>= 2.0)
7
-
8
- GEM
9
- remote: http://rubygems.org/
10
- specs:
11
- diff-lcs (1.2.2)
12
- ffi (1.6.0)
13
- gssapi (1.1.2)
14
- ffi (>= 1.0.1)
15
- net-ssh (2.6.6)
16
- rspec (2.13.0)
17
- rspec-core (~> 2.13.0)
18
- rspec-expectations (~> 2.13.0)
19
- rspec-mocks (~> 2.13.0)
20
- rspec-core (2.13.1)
21
- rspec-expectations (2.13.0)
22
- diff-lcs (>= 1.1.3, < 2.0)
23
- rspec-mocks (2.13.0)
24
-
25
- PLATFORMS
26
- ruby
27
-
28
- DEPENDENCIES
29
- gssapi
30
- net-ssh-krb!
31
- rspec