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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f7a3f5bd1265e7901b0107badc19f6519919674d
4
- data.tar.gz: 89a0f99ce7194c998a3a0f18888fcc0496adf2b8
3
+ metadata.gz: c9d152d80d40134d2ae7eecd9a319cde84983452
4
+ data.tar.gz: 29d56b44b8e7cae1cd12a8161063de21398094dd
5
5
  SHA512:
6
- metadata.gz: 0ea1aec07c2dd2e121b9648fb1e18a3c23993af2bf9efd460992ec8a983c5d1ee38102c1b013a20e09c766d1f7e1474561494bd77e28be190f3a85ec23ec5fd6
7
- data.tar.gz: b002550b4e4144802f20e21262f082ce228bc196e643e0f9c4446f1cbe49f0710584d5cdab865a544cc557b4e27a6661ce9350423075a34a700fbc01b18ebdb2
6
+ metadata.gz: 829939040059e56d8a023da659c2e60d646622e263a5273b79fa3793a6b3f93e3739abbe35c02df1da004bc958778741567829b15e0537f0c5c517f6d207c91b
7
+ data.tar.gz: 3ecc6f28154591bef665ce2699ecff835bf5b30384338c69dfc8c4b9234792b2f3563f8e9225e7fa76a5b3425135c5c51e16f150d5e37e94c767a3f851197650
@@ -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.1 - 2018-06-01
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
- - Fixed `Kubeclient::Config.read` to use `YAML.safe_load` (#334).
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
 
@@ -25,7 +25,8 @@ module Kubeclient
25
25
  end
26
26
 
27
27
  def self.read(filename)
28
- Config.new(YAML.safe_load(File.read(filename)), File.dirname(filename))
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
@@ -1,4 +1,4 @@
1
1
  # Kubernetes REST-API Client
2
2
  module Kubeclient
3
- VERSION = '3.1.1'.freeze
3
+ VERSION = '3.1.2'.freeze
4
4
  end
@@ -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"
@@ -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.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-01 00:00:00.000000000 Z
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