kubeclient 3.1.1 → 3.1.2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of kubeclient might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -2
- data/lib/kubeclient/config.rb +2 -1
- data/lib/kubeclient/version.rb +1 -1
- data/test/config/timestamps.kubeconfig +25 -0
- data/test/test_config.rb +5 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c9d152d80d40134d2ae7eecd9a319cde84983452
|
4
|
+
data.tar.gz: 29d56b44b8e7cae1cd12a8161063de21398094dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 829939040059e56d8a023da659c2e60d646622e263a5273b79fa3793a6b3f93e3739abbe35c02df1da004bc958778741567829b15e0537f0c5c517f6d207c91b
|
7
|
+
data.tar.gz: 3ecc6f28154591bef665ce2699ecff835bf5b30384338c69dfc8c4b9234792b2f3563f8e9225e7fa76a5b3425135c5c51e16f150d5e37e94c767a3f851197650
|
data/CHANGELOG.md
CHANGED
@@ -4,10 +4,17 @@ Notable changes to this project will be documented in this file.
|
|
4
4
|
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
|
5
5
|
Kubeclient release versioning follows [SemVer](https://semver.org/).
|
6
6
|
|
7
|
-
## 3.1.
|
7
|
+
## 3.1.2 — 2018-06-11
|
8
|
+
|
9
|
+
### Fixed
|
10
|
+
- Fixed `Kubeclient::Config.read` regression, no longer crashes on YAML timestamps (#338).
|
11
|
+
|
12
|
+
## 3.1.1 - 2018-06-01 — REGRESSION
|
13
|
+
|
14
|
+
In this version `Kubeclient::Config.read` raises Psych::DisallowedClass on legal yaml configs containing a timestamp, for example gcp access-token expiry (#337).
|
8
15
|
|
9
16
|
### Security
|
10
|
-
-
|
17
|
+
- Changed `Kubeclient::Config.read` to use `YAML.safe_load` (#334).
|
11
18
|
|
12
19
|
Previously, could deserialize arbitrary ruby classes. The risk depends on ruby classes available in the application; sometimes a class may have side effects - up to arbitrary code execution - when instantiated and/or built up with `x[key] = value` during YAML parsing.
|
13
20
|
|
data/lib/kubeclient/config.rb
CHANGED
@@ -25,7 +25,8 @@ module Kubeclient
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def self.read(filename)
|
28
|
-
|
28
|
+
parsed = YAML.safe_load(File.read(filename), [Date, Time])
|
29
|
+
Config.new(parsed, File.dirname(filename))
|
29
30
|
end
|
30
31
|
|
31
32
|
def contexts
|
data/lib/kubeclient/version.rb
CHANGED
@@ -0,0 +1,25 @@
|
|
1
|
+
apiVersion: v1
|
2
|
+
users:
|
3
|
+
- name: gke_username
|
4
|
+
user:
|
5
|
+
auth-provider:
|
6
|
+
config:
|
7
|
+
access-token: REDACTED
|
8
|
+
cmd-args: config config-helper --format=json
|
9
|
+
cmd-path: /Users/tannerbruce/opt/google-cloud-sdk/bin/gcloud
|
10
|
+
expiry: 2018-07-07T18:25:36Z
|
11
|
+
expiry-key: '{.credential.token_expiry}'
|
12
|
+
token-key: '{.credential.access_token}'
|
13
|
+
name: gcp
|
14
|
+
|
15
|
+
# More syntaxes from go-yaml tests, hopefully covering all types possible in kubeconfig
|
16
|
+
IPv4: 1.2.3.4
|
17
|
+
Duration: 3s
|
18
|
+
date_only: 2015-01-01
|
19
|
+
rfc3339: 2015-02-24T18:19:39Z
|
20
|
+
longer: 2015-02-24T18:19:39.123456789-03:00
|
21
|
+
shorter: 2015-2-3T3:4:5Z
|
22
|
+
iso_lower_t: 2015-02-24t18:19:39Z
|
23
|
+
space_no_tz: 2015-02-24 18:19:39
|
24
|
+
space_tz: 2001-12-14 21:59:43.10 -5
|
25
|
+
timestamp_like_string: "2015-02-24T18:19:39Z"
|
data/test/test_config.rb
CHANGED
@@ -68,6 +68,11 @@ class KubeclientConfigTest < MiniTest::Test
|
|
68
68
|
assert_equal('pAssw0rd123', context.auth_options[:password])
|
69
69
|
end
|
70
70
|
|
71
|
+
def test_timestamps
|
72
|
+
# Test YAML parsing doesn't crash on YAML timestamp syntax.
|
73
|
+
Kubeclient::Config.read(config_file('timestamps.kubeconfig'))
|
74
|
+
end
|
75
|
+
|
71
76
|
private
|
72
77
|
|
73
78
|
def check_context(context, ssl: true)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kubeclient
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alissa Bonas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-06-
|
11
|
+
date: 2018-06-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -204,6 +204,7 @@ files:
|
|
204
204
|
- test/config/external-key.rsa
|
205
205
|
- test/config/external.kubeconfig
|
206
206
|
- test/config/nouser.kubeconfig
|
207
|
+
- test/config/timestamps.kubeconfig
|
207
208
|
- test/config/userauth.kubeconfig
|
208
209
|
- test/json/bindings_list.json
|
209
210
|
- test/json/component_status.json
|
@@ -309,6 +310,7 @@ test_files:
|
|
309
310
|
- test/config/external-key.rsa
|
310
311
|
- test/config/external.kubeconfig
|
311
312
|
- test/config/nouser.kubeconfig
|
313
|
+
- test/config/timestamps.kubeconfig
|
312
314
|
- test/config/userauth.kubeconfig
|
313
315
|
- test/json/bindings_list.json
|
314
316
|
- test/json/component_status.json
|