webhdfs 0.7.3 → 0.7.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +12 -0
- data/VERSION +1 -1
- data/lib/webhdfs/client_v1.rb +9 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3633c5408544086d96f4274e31f80e193227d3e5
|
4
|
+
data.tar.gz: d882245ff5d655ba2fd87d54b80261859191b111
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c3a6ddc8842f41bd40a6ff845059aae459d2e63bc2694b868fba029a8e7aa5ed7c64b097133b69f43986baf43930259303eb0f8d339d74a6cb1d0dd5730c35c
|
7
|
+
data.tar.gz: 644c24ba30a07b4acf078e9ba222dcdfcfcec60e35f072b2b0fe1e61f547e4352a6efef646ff90677b8ea67cf98b4e884b79d15e1a3b285adf0cfc753b40d770
|
data/README.md
CHANGED
@@ -95,6 +95,7 @@ Note that net/https and openssl libraries must be available:
|
|
95
95
|
client.ssl = true
|
96
96
|
client.ssl_ca_file = "/path/to/ca_file.pem" # if needed
|
97
97
|
client.ssl_varify_mode = :peer # if needed (:none or :peer)
|
98
|
+
client.ssl_version = :TLSv1 # if needed
|
98
99
|
|
99
100
|
### For Kerberos Authentication
|
100
101
|
|
@@ -104,6 +105,17 @@ Note that [gssapi](https://github.com/zenchild/gssapi) library must be available
|
|
104
105
|
client.kerberos = true
|
105
106
|
client.kerberos_keytab = "/path/to/project.keytab"
|
106
107
|
|
108
|
+
### For SSL Client Authentication
|
109
|
+
|
110
|
+
Note that openssl libraries must be available:
|
111
|
+
|
112
|
+
require 'openssl'
|
113
|
+
|
114
|
+
client = WebHDFS::Client.new(host, port)
|
115
|
+
client.ssl = true
|
116
|
+
client.ssl_key = OpenSSL::PKey::RSA.new(open('/path/to/key.pem'))
|
117
|
+
client.ssl_cert = OpenSSL::X509::Certificate.new(open('/path/to/cert.pem'))
|
118
|
+
|
107
119
|
## AUTHORS
|
108
120
|
|
109
121
|
* Kazuki Ohta <kazuki.ohta@gmail.com>
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.7.
|
1
|
+
0.7.4
|
data/lib/webhdfs/client_v1.rb
CHANGED
@@ -23,6 +23,9 @@ module WebHDFS
|
|
23
23
|
attr_accessor :ssl
|
24
24
|
attr_accessor :ssl_ca_file
|
25
25
|
attr_reader :ssl_verify_mode
|
26
|
+
attr_accessor :ssl_cert
|
27
|
+
attr_accessor :ssl_key
|
28
|
+
attr_accessor :ssl_version
|
26
29
|
attr_accessor :kerberos, :kerberos_keytab
|
27
30
|
attr_accessor :http_headers
|
28
31
|
|
@@ -50,6 +53,9 @@ module WebHDFS
|
|
50
53
|
@ssl = false
|
51
54
|
@ssl_ca_file = nil
|
52
55
|
@ssl_verify_mode = nil
|
56
|
+
@ssl_cert = nil
|
57
|
+
@ssl_key = nil
|
58
|
+
@ssl_version = nil
|
53
59
|
|
54
60
|
@kerberos = false
|
55
61
|
@kerberos_keytab = nil
|
@@ -300,6 +306,9 @@ module WebHDFS
|
|
300
306
|
when :peer then OpenSSL::SSL::VERIFY_PEER
|
301
307
|
end
|
302
308
|
end
|
309
|
+
conn.cert = @ssl_cert if @ssl_cert
|
310
|
+
conn.key = @ssl_key if @ssl_key
|
311
|
+
conn.ssl_version = @ssl_version if @ssl_version
|
303
312
|
end
|
304
313
|
|
305
314
|
gsscli = nil
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webhdfs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kazuki Ohta
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|