vault 0.14.0 → 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +20 -0
- data/README.md +7 -5
- data/lib/vault/api/auth.rb +7 -2
- data/lib/vault/api/sys/mount.rb +54 -0
- data/lib/vault/api/sys/namespace.rb +0 -2
- data/lib/vault/api/sys/quota.rb +107 -0
- data/lib/vault/api/sys.rb +1 -0
- data/lib/vault/client.rb +3 -1
- data/lib/vault/configurable.rb +1 -0
- data/lib/vault/defaults.rb +15 -2
- data/lib/vault/errors.rb +12 -0
- data/lib/vault/persistent/pool.rb +1 -1
- data/lib/vault/persistent.rb +2 -7
- data/lib/vault/version.rb +1 -1
- data/lib/vault.rb +6 -5
- metadata +5 -10
- data/.circleci/config.yml +0 -42
- data/.gitignore +0 -42
- data/.rspec +0 -2
- data/Gemfile +0 -3
- data/Rakefile +0 -6
- data/vault.gemspec +0 -30
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9cd81591af963bbdfe3d167fa31b00a9d503e3ad0dfcdf242cadce97ddc19281
|
4
|
+
data.tar.gz: de55b77ff05e80aeecf8f648d66916d9662605083fbfc0c36222368f85de0a2a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e0fa430df19981f84399ea639c69bb503d4f553bbd943b32bb0cb58ccf74f1f75f1d7c9558de92da372cf9f4d6e2dcd9b40f7a311956ee1c29310ee2701e5aa
|
7
|
+
data.tar.gz: 67395eb83e5586ef4232fac94ca5be1c9e408c3592a0fcfc26ee4cae1e81c0017b9a8e96ad39b24a256e61712b1ea001e9ab645ea79fabe918fdf0d377e58f89
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,25 @@
|
|
1
1
|
# Vault Ruby Changelog
|
2
2
|
|
3
|
+
## v?.??.? (Unreleased)
|
4
|
+
|
5
|
+
## v0.17.0 (May 11, 2022)
|
6
|
+
|
7
|
+
IMPROVEMENTS
|
8
|
+
|
9
|
+
- Added MissingRequiredStateErr error type to refer to 412s returned by Vault 1.10 when the WAL index on the node does not match the index in the Server-Side Consistent Token. This error type can be passed as a parameter to `#with_retries`, and will also be retried automatically when `#with_retries` is used with no parameters.
|
10
|
+
|
11
|
+
## v0.16.0 (March 17, 2021)
|
12
|
+
|
13
|
+
IMPROVEMENTS
|
14
|
+
|
15
|
+
- The timeout used to get a connection from the connection pool that talks with vault is now configurable. Using `Vault.pool_timeout` or the env var `VAULT_POOL_TIMEOUT`.
|
16
|
+
|
17
|
+
## v0.15.0 (July 29, 2020)
|
18
|
+
|
19
|
+
IMPROVEMENTS
|
20
|
+
|
21
|
+
- Added support for Resource Quotas
|
22
|
+
|
3
23
|
## v0.14.0 (May 28, 2020)
|
4
24
|
|
5
25
|
IMPROVEMENTS
|
data/README.md
CHANGED
@@ -1,15 +1,17 @@
|
|
1
|
-
Vault Ruby Client [![Build Status](https://
|
1
|
+
Vault Ruby Client [![Build Status](https://circleci.com/gh/hashicorp/vault-ruby.svg?style=shield)](https://circleci.com/gh/hashicorp/vault-ruby)
|
2
2
|
=================
|
3
3
|
|
4
4
|
Vault is the official Ruby client for interacting with [Vault](https://vaultproject.io) by HashiCorp.
|
5
5
|
|
6
|
-
**
|
6
|
+
**If you're viewing this README from GitHub on the `master` branch, know that it may contain unreleased features or
|
7
|
+
different APIs than the most recently released version. Please see the Git tag that corresponds to your version of the
|
8
|
+
Vault Ruby client for the proper documentation.**
|
7
9
|
|
8
10
|
Quick Start
|
9
11
|
-----------
|
10
12
|
Install Ruby 2.0+: [Guide](https://www.ruby-lang.org/en/documentation/installation/).
|
11
13
|
|
12
|
-
> Please note that
|
14
|
+
> Please note that as of Vault Ruby version 0.14.0 versions of Ruby prior to 2.0 are no longer supported.
|
13
15
|
|
14
16
|
Install via Rubygems:
|
15
17
|
|
@@ -18,7 +20,7 @@ Install via Rubygems:
|
|
18
20
|
or add it to your Gemfile if you're using Bundler:
|
19
21
|
|
20
22
|
```ruby
|
21
|
-
gem "vault"
|
23
|
+
gem "vault"
|
22
24
|
```
|
23
25
|
|
24
26
|
and then run the `bundle` command to install.
|
@@ -214,7 +216,7 @@ Development
|
|
214
216
|
Important Notes:
|
215
217
|
|
216
218
|
- **All new features must include test coverage.** At a bare minimum, Unit tests are required. It is preferred if you include integration tests as well.
|
217
|
-
- **The tests must be
|
219
|
+
- **The tests must be idempotent.** The HTTP calls made during a test should be able to be run over and over.
|
218
220
|
- **Tests are order independent.** The default RSpec configuration randomizes the test order, so this should not be a problem.
|
219
221
|
- **Integration tests require Vault** Vault must be available in the path for the integration tests to pass.
|
220
222
|
- **In order to be considered an integration test:** The test MUST use the `vault_test_client` or `vault_redirect_test_client` as the client. This spawns a process, or uses an already existing process from another test, to run against.
|
data/lib/vault/api/auth.rb
CHANGED
@@ -286,12 +286,17 @@ module Vault
|
|
286
286
|
# @param [String] path (default: 'cert')
|
287
287
|
# The path to the auth backend to use for the login procedure.
|
288
288
|
#
|
289
|
+
# @param [String] name optional
|
290
|
+
# The named certificate role provided to the login request.
|
291
|
+
#
|
289
292
|
# @return [Secret]
|
290
|
-
def tls(pem = nil, path = 'cert')
|
293
|
+
def tls(pem = nil, path = 'cert', name: nil)
|
291
294
|
new_client = client.dup
|
292
295
|
new_client.ssl_pem_contents = pem if !pem.nil?
|
293
296
|
|
294
|
-
|
297
|
+
opts = {}
|
298
|
+
opts[:name] = name if name
|
299
|
+
json = new_client.post("/v1/auth/#{CGI.escape(path)}/login", opts)
|
295
300
|
secret = Secret.decode(json)
|
296
301
|
client.token = secret.auth.client_token
|
297
302
|
return secret
|
data/lib/vault/api/sys/mount.rb
CHANGED
@@ -23,6 +23,48 @@ module Vault
|
|
23
23
|
field :options
|
24
24
|
end
|
25
25
|
|
26
|
+
class MountTune < Response
|
27
|
+
# @!attribute [r] description
|
28
|
+
# Specifies the description of the mount.
|
29
|
+
# @return [String]
|
30
|
+
field :description
|
31
|
+
|
32
|
+
# @!attribute [r] default_lease_ttl
|
33
|
+
# Specifies the default time-to-live.
|
34
|
+
# @return [Fixnum]
|
35
|
+
field :default_lease_ttl
|
36
|
+
|
37
|
+
# @!attribute [r] max_lease_ttl
|
38
|
+
# Specifies the maximum time-to-live.
|
39
|
+
# @return [Fixnum]
|
40
|
+
field :max_lease_ttl
|
41
|
+
|
42
|
+
# @!attribute [r] audit_non_hmac_request_keys
|
43
|
+
# Specifies the comma-separated list of keys that will not be HMAC'd by audit devices in the request data object.
|
44
|
+
# @return [Array<String>]
|
45
|
+
field :audit_non_hmac_request_keys
|
46
|
+
|
47
|
+
# @!attribute [r] audit_non_hmac_response_keys
|
48
|
+
# Specifies the comma-separated list of keys that will not be HMAC'd by audit devices in the response data object.
|
49
|
+
# @return [Array<String>]
|
50
|
+
field :audit_non_hmac_response_keys
|
51
|
+
|
52
|
+
# @!attribute [r] listing_visibility
|
53
|
+
# Specifies whether to show this mount in the UI-specific listing endpoint.
|
54
|
+
# @return [String]
|
55
|
+
field :listing_visibility
|
56
|
+
|
57
|
+
# @!attribute [r] passthrough_request_headers
|
58
|
+
# Comma-separated list of headers to whitelist and pass from the request to the plugin.
|
59
|
+
# @return [Array<String>]
|
60
|
+
field :passthrough_request_headers
|
61
|
+
|
62
|
+
# @!attribute [r] allowed_response_headers
|
63
|
+
# Comma-separated list of headers to whitelist, allowing a plugin to include them in the response.
|
64
|
+
# @return [Array<String>]
|
65
|
+
field :allowed_response_headers
|
66
|
+
end
|
67
|
+
|
26
68
|
class Sys < Request
|
27
69
|
# List all mounts in the vault.
|
28
70
|
#
|
@@ -57,6 +99,18 @@ module Vault
|
|
57
99
|
return true
|
58
100
|
end
|
59
101
|
|
102
|
+
# Get the mount tunings at a given path.
|
103
|
+
#
|
104
|
+
# @example
|
105
|
+
# Vault.sys.get_mount_tune("pki") #=> { :pki => #<struct Vault::MountTune default_lease_ttl=2764800> }
|
106
|
+
#
|
107
|
+
# @return [MountTune]
|
108
|
+
def get_mount_tune(path)
|
109
|
+
json = client.get("/v1/sys/mounts/#{encode_path(path)}/tune")
|
110
|
+
json = json[:data] if json[:data]
|
111
|
+
return MountTune.decode(json)
|
112
|
+
end
|
113
|
+
|
60
114
|
# Tune a mount at the given path.
|
61
115
|
#
|
62
116
|
# @example
|
@@ -18,8 +18,6 @@ module Vault
|
|
18
18
|
# Vault.sys.namespaces #=> { :foo => #<struct Vault::Namespace id="xxxx1", path="foo/" }
|
19
19
|
#
|
20
20
|
# @return [Hash<Symbol, Namespace>]
|
21
|
-
#
|
22
|
-
# NOTE: Due to a bug in Vault Enterprise, to be fixed soon, this method CAN return a pure JSON string if a scoping namespace is provided.
|
23
21
|
def namespaces(scoped=nil)
|
24
22
|
path = ["v1", scoped, "sys", "namespaces"].compact
|
25
23
|
json = client.list(path.join("/"))
|
@@ -0,0 +1,107 @@
|
|
1
|
+
module Vault
|
2
|
+
class Quota < Response
|
3
|
+
# @!attribute [r] name
|
4
|
+
# Name of the quota rule.
|
5
|
+
# @return [String]
|
6
|
+
field :name
|
7
|
+
|
8
|
+
# @!attribute [r] path
|
9
|
+
# Namespace/Path combination the quota applies to.
|
10
|
+
# @return [String]
|
11
|
+
field :path
|
12
|
+
|
13
|
+
# @!attribute [r] type
|
14
|
+
# Type of the quota rule, must be one of "lease-count" or "rate-limit"
|
15
|
+
# @return [String]
|
16
|
+
field :type
|
17
|
+
end
|
18
|
+
|
19
|
+
class RateLimitQuota < Quota
|
20
|
+
# @!attribute [r] rate
|
21
|
+
# The rate at which allowed requests are refilled per second by the quota
|
22
|
+
# rule.
|
23
|
+
# @return [Float]
|
24
|
+
field :rate
|
25
|
+
|
26
|
+
# @!attribute [r] burst
|
27
|
+
# The maximum number of requests at any given second allowed by the quota
|
28
|
+
# rule.
|
29
|
+
# @return [Int]
|
30
|
+
field :burst
|
31
|
+
end
|
32
|
+
|
33
|
+
class LeaseCountQuota < Quota
|
34
|
+
# @!attribute [r] counter
|
35
|
+
# Number of currently active leases for the quota.
|
36
|
+
# @return [Int]
|
37
|
+
field :counter
|
38
|
+
|
39
|
+
# @!attribute [r] max_leases
|
40
|
+
# The maximum number of allowed leases for this quota.
|
41
|
+
# @return [Int]
|
42
|
+
field :max_leases
|
43
|
+
end
|
44
|
+
|
45
|
+
class Sys
|
46
|
+
def quotas(type)
|
47
|
+
path = generate_path(type)
|
48
|
+
json = client.list(path)
|
49
|
+
if data = json.dig(:data, :key_info)
|
50
|
+
data.map do |item|
|
51
|
+
type_class(type).decode(item)
|
52
|
+
end
|
53
|
+
else
|
54
|
+
json
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
def create_quota(type, name, opts={})
|
59
|
+
path = generate_path(type, name)
|
60
|
+
client.post(path, JSON.fast_generate(opts))
|
61
|
+
return true
|
62
|
+
end
|
63
|
+
|
64
|
+
def delete_quota(type, name)
|
65
|
+
path = generate_path(type, name)
|
66
|
+
client.delete(path)
|
67
|
+
return true
|
68
|
+
end
|
69
|
+
|
70
|
+
def get_quota(type, name)
|
71
|
+
path = generate_path(type, name)
|
72
|
+
response = client.get(path)
|
73
|
+
if data = response[:data]
|
74
|
+
type_class(type).decode(data)
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
def get_quota_config
|
79
|
+
client.get("v1/sys/quotas/config")
|
80
|
+
end
|
81
|
+
|
82
|
+
def update_quota_config(opts={})
|
83
|
+
client.post("v1/sys/quotas/config", JSON.fast_generate(opts))
|
84
|
+
return true
|
85
|
+
end
|
86
|
+
|
87
|
+
private
|
88
|
+
|
89
|
+
def generate_path(type, name=nil)
|
90
|
+
verify_type(type)
|
91
|
+
path = ["v1", "sys", "quotas", type, name].compact
|
92
|
+
path.join("/")
|
93
|
+
end
|
94
|
+
|
95
|
+
def verify_type(type)
|
96
|
+
return if ["rate-limit", "lease-count"].include?(type)
|
97
|
+
raise ArgumentError, "type must be one of \"rate-limit\" or \"lease-count\""
|
98
|
+
end
|
99
|
+
|
100
|
+
def type_class(type)
|
101
|
+
case type
|
102
|
+
when "lease-count" then LeaseCountQuota
|
103
|
+
when "rate-limit" then RateLimitQuota
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
data/lib/vault/api/sys.rb
CHANGED
data/lib/vault/client.rb
CHANGED
@@ -86,7 +86,7 @@ module Vault
|
|
86
86
|
@lock.synchronize do
|
87
87
|
return @nhp if @nhp
|
88
88
|
|
89
|
-
@nhp = PersistentHTTP.new("vault-ruby", nil, pool_size)
|
89
|
+
@nhp = PersistentHTTP.new("vault-ruby", nil, pool_size, pool_timeout)
|
90
90
|
|
91
91
|
if proxy_address
|
92
92
|
proxy_uri = URI.parse "http://#{proxy_address}"
|
@@ -392,6 +392,8 @@ module Vault
|
|
392
392
|
|
393
393
|
# Use the correct exception class
|
394
394
|
case response
|
395
|
+
when Net::HTTPPreconditionFailed
|
396
|
+
raise MissingRequiredStateError.new
|
395
397
|
when Net::HTTPClientError
|
396
398
|
klass = HTTPClientError
|
397
399
|
when Net::HTTPServerError
|
data/lib/vault/configurable.rb
CHANGED
data/lib/vault/defaults.rb
CHANGED
@@ -30,9 +30,12 @@ module Vault
|
|
30
30
|
# The default size of the connection pool
|
31
31
|
DEFAULT_POOL_SIZE = 16
|
32
32
|
|
33
|
+
# The default timeout in seconds for retrieving a connection from the connection pool
|
34
|
+
DEFAULT_POOL_TIMEOUT = 0.5
|
35
|
+
|
33
36
|
# The set of exceptions that are detect and retried by default
|
34
37
|
# with `with_retries`
|
35
|
-
RETRIED_EXCEPTIONS = [HTTPServerError]
|
38
|
+
RETRIED_EXCEPTIONS = [HTTPServerError, MissingRequiredStateError]
|
36
39
|
|
37
40
|
class << self
|
38
41
|
# The list of calculated options for this configurable.
|
@@ -85,12 +88,22 @@ module Vault
|
|
85
88
|
# @return Integer
|
86
89
|
def pool_size
|
87
90
|
if var = ENV["VAULT_POOL_SIZE"]
|
88
|
-
|
91
|
+
var.to_i
|
89
92
|
else
|
90
93
|
DEFAULT_POOL_SIZE
|
91
94
|
end
|
92
95
|
end
|
93
96
|
|
97
|
+
# The timeout for getting a connection from the connection pool that communicates with Vault
|
98
|
+
# @return Float
|
99
|
+
def pool_timeout
|
100
|
+
if var = ENV["VAULT_POOL_TIMEOUT"]
|
101
|
+
var.to_f
|
102
|
+
else
|
103
|
+
DEFAULT_POOL_TIMEOUT
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
94
107
|
# The HTTP Proxy server address as a string
|
95
108
|
# @return [String, nil]
|
96
109
|
def proxy_address
|
data/lib/vault/errors.rb
CHANGED
@@ -22,6 +22,18 @@ EOH
|
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
25
|
+
class MissingRequiredStateError < VaultError
|
26
|
+
def initialize
|
27
|
+
super <<-EOH
|
28
|
+
The performance standby node does not yet have the
|
29
|
+
most recent index state required to authenticate
|
30
|
+
the request.
|
31
|
+
|
32
|
+
Generally, the request should be retried with the with_retries clause.
|
33
|
+
EOH
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
25
37
|
class HTTPConnectionError < VaultError
|
26
38
|
attr_reader :address
|
27
39
|
|
@@ -31,7 +31,7 @@ class PersistentHTTP::Pool < Vault::ConnectionPool # :nodoc:
|
|
31
31
|
stack = stacks[net_http_args]
|
32
32
|
|
33
33
|
if stack.empty? then
|
34
|
-
conn = @available.pop connection_args: net_http_args
|
34
|
+
conn = @available.pop @timeout, connection_args: net_http_args
|
35
35
|
else
|
36
36
|
conn = stack.last
|
37
37
|
end
|
data/lib/vault/persistent.rb
CHANGED
@@ -202,11 +202,6 @@ class PersistentHTTP
|
|
202
202
|
|
203
203
|
HAVE_OPENSSL = defined? OpenSSL::SSL # :nodoc:
|
204
204
|
|
205
|
-
##
|
206
|
-
# The default connection pool size is 1/4 the allowed open files.
|
207
|
-
|
208
|
-
DEFAULT_POOL_SIZE = 16
|
209
|
-
|
210
205
|
##
|
211
206
|
# The version of PersistentHTTP you are using
|
212
207
|
|
@@ -505,7 +500,7 @@ class PersistentHTTP
|
|
505
500
|
# Defaults to 1/4 the number of allowed file handles. You can have no more
|
506
501
|
# than this many threads with active HTTP transactions.
|
507
502
|
|
508
|
-
def initialize name=nil, proxy=nil, pool_size=DEFAULT_POOL_SIZE
|
503
|
+
def initialize name=nil, proxy=nil, pool_size=Vault::Defaults::DEFAULT_POOL_SIZE, pool_timeout=Vault::Defaults::DEFAULT_POOL_TIMEOUT
|
509
504
|
@name = name
|
510
505
|
|
511
506
|
@debug_output = nil
|
@@ -525,7 +520,7 @@ class PersistentHTTP
|
|
525
520
|
@socket_options << [Socket::IPPROTO_TCP, Socket::TCP_NODELAY, 1] if
|
526
521
|
Socket.const_defined? :TCP_NODELAY
|
527
522
|
|
528
|
-
@pool = PersistentHTTP::Pool.new size: pool_size do |http_args|
|
523
|
+
@pool = PersistentHTTP::Pool.new size: pool_size, timeout: pool_timeout do |http_args|
|
529
524
|
PersistentHTTP::Connection.new Net::HTTP, http_args, @ssl_generation
|
530
525
|
end
|
531
526
|
|
data/lib/vault/version.rb
CHANGED
data/lib/vault.rb
CHANGED
@@ -18,12 +18,13 @@ module Vault
|
|
18
18
|
@client = Vault::Client.new
|
19
19
|
|
20
20
|
# Set secure SSL options
|
21
|
-
OpenSSL::SSL::SSLContext::DEFAULT_PARAMS
|
22
|
-
opts &= ~OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS if defined?(OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS)
|
23
|
-
opts |= OpenSSL::SSL::OP_NO_COMPRESSION if defined?(OpenSSL::SSL::OP_NO_COMPRESSION)
|
24
|
-
opts |= OpenSSL::SSL::OP_NO_SSLv2 if defined?(OpenSSL::SSL::OP_NO_SSLv2)
|
25
|
-
opts |= OpenSSL::SSL::OP_NO_SSLv3 if defined?(OpenSSL::SSL::OP_NO_SSLv3)
|
21
|
+
OpenSSL::SSL::SSLContext::DEFAULT_PARAMS.tap do |opts|
|
22
|
+
opts[:options] &= ~OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS if defined?(OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS)
|
23
|
+
opts[:options] |= OpenSSL::SSL::OP_NO_COMPRESSION if defined?(OpenSSL::SSL::OP_NO_COMPRESSION)
|
24
|
+
opts[:options] |= OpenSSL::SSL::OP_NO_SSLv2 if defined?(OpenSSL::SSL::OP_NO_SSLv2)
|
25
|
+
opts[:options] |= OpenSSL::SSL::OP_NO_SSLv3 if defined?(OpenSSL::SSL::OP_NO_SSLv3)
|
26
26
|
end
|
27
|
+
|
27
28
|
|
28
29
|
self
|
29
30
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vault
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.17.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Seth Vargo
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-05-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sigv4
|
@@ -115,14 +115,9 @@ executables: []
|
|
115
115
|
extensions: []
|
116
116
|
extra_rdoc_files: []
|
117
117
|
files:
|
118
|
-
- ".circleci/config.yml"
|
119
|
-
- ".gitignore"
|
120
|
-
- ".rspec"
|
121
118
|
- CHANGELOG.md
|
122
|
-
- Gemfile
|
123
119
|
- LICENSE
|
124
120
|
- README.md
|
125
|
-
- Rakefile
|
126
121
|
- lib/vault.rb
|
127
122
|
- lib/vault/api.rb
|
128
123
|
- lib/vault/api/approle.rb
|
@@ -143,6 +138,7 @@ files:
|
|
143
138
|
- lib/vault/api/sys/mount.rb
|
144
139
|
- lib/vault/api/sys/namespace.rb
|
145
140
|
- lib/vault/api/sys/policy.rb
|
141
|
+
- lib/vault/api/sys/quota.rb
|
146
142
|
- lib/vault/api/sys/seal.rb
|
147
143
|
- lib/vault/api/transform.rb
|
148
144
|
- lib/vault/api/transform/alphabet.rb
|
@@ -164,7 +160,6 @@ files:
|
|
164
160
|
- lib/vault/vendor/connection_pool/timed_stack.rb
|
165
161
|
- lib/vault/vendor/connection_pool/version.rb
|
166
162
|
- lib/vault/version.rb
|
167
|
-
- vault.gemspec
|
168
163
|
homepage: https://github.com/hashicorp/vault-ruby
|
169
164
|
licenses:
|
170
165
|
- MPL-2.0
|
@@ -177,14 +172,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
177
172
|
requirements:
|
178
173
|
- - ">="
|
179
174
|
- !ruby/object:Gem::Version
|
180
|
-
version: '0'
|
175
|
+
version: '2.0'
|
181
176
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
182
177
|
requirements:
|
183
178
|
- - ">="
|
184
179
|
- !ruby/object:Gem::Version
|
185
180
|
version: '0'
|
186
181
|
requirements: []
|
187
|
-
rubygems_version: 3.
|
182
|
+
rubygems_version: 3.2.32
|
188
183
|
signing_key:
|
189
184
|
specification_version: 4
|
190
185
|
summary: Vault is a Ruby API client for interacting with a Vault server.
|
data/.circleci/config.yml
DELETED
@@ -1,42 +0,0 @@
|
|
1
|
-
version: 2.1
|
2
|
-
|
3
|
-
references:
|
4
|
-
images:
|
5
|
-
ubuntu: &UBUNTU_IMAGE ubuntu-1604:201903-01
|
6
|
-
|
7
|
-
jobs:
|
8
|
-
test:
|
9
|
-
machine:
|
10
|
-
image: *UBUNTU_IMAGE
|
11
|
-
parameters:
|
12
|
-
ruby-version:
|
13
|
-
type: string
|
14
|
-
vault-version:
|
15
|
-
type: string
|
16
|
-
steps:
|
17
|
-
- checkout
|
18
|
-
- run:
|
19
|
-
name: Install vault
|
20
|
-
command: |
|
21
|
-
curl -sLo vault.zip https://releases.hashicorp.com/vault/<< parameters.vault-version >>/vault_<< parameters.vault-version >>_linux_amd64.zip
|
22
|
-
unzip vault.zip
|
23
|
-
mkdir -p ~/bin
|
24
|
-
mv vault ~/bin
|
25
|
-
export PATH="~/bin:$PATH"
|
26
|
-
- run:
|
27
|
-
name: Run tests
|
28
|
-
command: |
|
29
|
-
export VAULT_VERSION=<< parameters.vault-version >>
|
30
|
-
rvm use << parameters.ruby-version >> --install --binary --fuzzy
|
31
|
-
bundle install --jobs=3 --retry=3 --path=vendor/bundle
|
32
|
-
bundle exec rake
|
33
|
-
|
34
|
-
workflows:
|
35
|
-
run-tests:
|
36
|
-
jobs:
|
37
|
-
- test:
|
38
|
-
matrix:
|
39
|
-
parameters:
|
40
|
-
ruby-version: ["2.2", "2.3", "2.4"]
|
41
|
-
vault-version: ["1.0.3", "1.1.5", "1.2.4", "1.3.0"]
|
42
|
-
name: test-ruby-<< matrix.ruby-version >>-vault-<< matrix.vault-version >>
|
data/.gitignore
DELETED
@@ -1,42 +0,0 @@
|
|
1
|
-
### Ruby ###
|
2
|
-
*.gem
|
3
|
-
*.rbc
|
4
|
-
/.config
|
5
|
-
/.vscode
|
6
|
-
/coverage/
|
7
|
-
/InstalledFiles
|
8
|
-
/pkg/
|
9
|
-
/spec/reports/
|
10
|
-
/test/tmp/
|
11
|
-
/test/version_tmp/
|
12
|
-
/tmp/
|
13
|
-
/vendor/bundle/
|
14
|
-
/vendor/ruby/
|
15
|
-
|
16
|
-
## Specific to RubyMotion:
|
17
|
-
.dat*
|
18
|
-
.repl_history
|
19
|
-
build/
|
20
|
-
|
21
|
-
## Documentation cache and generated files:
|
22
|
-
/.yardoc/
|
23
|
-
/_yardoc/
|
24
|
-
/doc/
|
25
|
-
/rdoc/
|
26
|
-
|
27
|
-
## Environment normalisation:
|
28
|
-
/.bundle/
|
29
|
-
/vendor/bundle
|
30
|
-
/lib/bundler/man/
|
31
|
-
|
32
|
-
# for a library or gem, you might want to ignore these files since the code is
|
33
|
-
# intended to run in multiple environments; otherwise, check them in:
|
34
|
-
Gemfile.lock
|
35
|
-
.ruby-version
|
36
|
-
.ruby-gemset
|
37
|
-
|
38
|
-
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
39
|
-
.rvmrc
|
40
|
-
|
41
|
-
# Project-specific
|
42
|
-
spec/tmp
|
data/.rspec
DELETED
data/Gemfile
DELETED
data/Rakefile
DELETED
data/vault.gemspec
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
lib = File.expand_path("../lib", __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require "vault/version"
|
5
|
-
|
6
|
-
Gem::Specification.new do |spec|
|
7
|
-
spec.name = "vault"
|
8
|
-
spec.version = Vault::VERSION
|
9
|
-
spec.authors = ["Seth Vargo"]
|
10
|
-
spec.email = ["sethvargo@gmail.com"]
|
11
|
-
spec.licenses = ["MPL-2.0"]
|
12
|
-
|
13
|
-
spec.summary = "Vault is a Ruby API client for interacting with a Vault server."
|
14
|
-
spec.description = spec.summary
|
15
|
-
spec.homepage = "https://github.com/hashicorp/vault-ruby"
|
16
|
-
|
17
|
-
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
|
-
spec.bindir = "exe"
|
19
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
|
-
spec.require_paths = ["lib"]
|
21
|
-
|
22
|
-
spec.add_runtime_dependency "aws-sigv4"
|
23
|
-
|
24
|
-
spec.add_development_dependency "bundler", "~> 2"
|
25
|
-
spec.add_development_dependency "pry", "~> 0.13.1"
|
26
|
-
spec.add_development_dependency "rake", "~> 12.0"
|
27
|
-
spec.add_development_dependency "rspec", "~> 3.5"
|
28
|
-
spec.add_development_dependency "yard", "~> 0.9.24"
|
29
|
-
spec.add_development_dependency "webmock", "~> 3.8.3"
|
30
|
-
end
|