vault_ruby_client 0.18.2 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +7 -0
- data/.github/workflows/ruby.yml +45 -0
- data/.gitignore +43 -0
- data/.rspec +2 -0
- data/CHANGELOG.md +3 -281
- data/Gemfile +10 -0
- data/LICENSE +0 -0
- data/README.md +17 -9
- data/Rakefile +6 -0
- data/lib/vault/api/approle.rb +0 -0
- data/lib/vault/api/auth.rb +0 -0
- data/lib/vault/api/auth_tls.rb +0 -0
- data/lib/vault/api/auth_token.rb +0 -0
- data/lib/vault/api/help.rb +0 -0
- data/lib/vault/api/kv.rb +0 -0
- data/lib/vault/api/logical.rb +0 -0
- data/lib/vault/api/secret.rb +0 -0
- data/lib/vault/api/sys/audit.rb +0 -0
- data/lib/vault/api/sys/auth.rb +0 -0
- data/lib/vault/api/sys/health.rb +0 -0
- data/lib/vault/api/sys/init.rb +0 -0
- data/lib/vault/api/sys/leader.rb +0 -0
- data/lib/vault/api/sys/lease.rb +0 -0
- data/lib/vault/api/sys/mount.rb +0 -0
- data/lib/vault/api/sys/namespace.rb +0 -0
- data/lib/vault/api/sys/policy.rb +0 -0
- data/lib/vault/api/sys/quota.rb +0 -0
- data/lib/vault/api/sys/seal.rb +0 -0
- data/lib/vault/api/sys.rb +0 -0
- data/lib/vault/api/transform/alphabet.rb +0 -0
- data/lib/vault/api/transform/role.rb +0 -0
- data/lib/vault/api/transform/template.rb +0 -0
- data/lib/vault/api/transform/transformation.rb +0 -0
- data/lib/vault/api/transform.rb +0 -0
- data/lib/vault/api.rb +0 -0
- data/lib/vault/client.rb +11 -0
- data/lib/vault/configurable.rb +0 -0
- data/lib/vault/defaults.rb +0 -0
- data/lib/vault/encode.rb +1 -1
- data/lib/vault/errors.rb +0 -0
- data/lib/vault/persistent/connection.rb +0 -0
- data/lib/vault/persistent/pool.rb +0 -0
- data/lib/vault/persistent/timed_stack_multi.rb +0 -0
- data/lib/vault/persistent.rb +0 -0
- data/lib/vault/request.rb +0 -0
- data/lib/vault/response.rb +0 -0
- data/lib/vault/vendor/connection_pool/timed_stack.rb +0 -0
- data/lib/vault/vendor/connection_pool/version.rb +0 -0
- data/lib/vault/vendor/connection_pool.rb +0 -0
- data/lib/vault/version.rb +2 -1
- data/lib/vault_ruby_client.rb +0 -0
- data/vault_ruby_client.gemspec +50 -0
- metadata +31 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1326e9af43dc41b393da2221ef93be5fd2372e0207825646cd7ab568f7e9e94c
|
4
|
+
data.tar.gz: 700110ff9ab0f6ab2977f24072995048d541049de0cdcd47787d4482fa5a6817
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d81abee3a49207e5b20c27072791774b84dc229ed3e00f47d7c8c6602bef1a647eea51211e3cfe312172a1e919613b31970f8bb035689a0918f47f41bf98c3a
|
7
|
+
data.tar.gz: ecb8866a0f2b2ab13b1568c0ff65be47a87dd8b298f6b778867103f40f6cf3a784b150490ba2e83084c6305d9edfae11353a688022606d285622820077fb42c3
|
@@ -0,0 +1,45 @@
|
|
1
|
+
name: Ruby
|
2
|
+
on:
|
3
|
+
push:
|
4
|
+
paths-ignore:
|
5
|
+
- 'README.md'
|
6
|
+
- 'CHANGELOG.md'
|
7
|
+
pull_request:
|
8
|
+
branches: [ master ]
|
9
|
+
paths-ignore:
|
10
|
+
- 'README.md'
|
11
|
+
- 'CHANGELOG.md'
|
12
|
+
jobs:
|
13
|
+
test:
|
14
|
+
strategy:
|
15
|
+
fail-fast: false
|
16
|
+
matrix:
|
17
|
+
# https://endoflife.date/ruby
|
18
|
+
ruby: ['2.7', '3.0', '3.1', '3.2']
|
19
|
+
vault: ['1.13.13', '1.15.5', '1.17.6']
|
20
|
+
runs-on: ubuntu-latest
|
21
|
+
timeout-minutes: 5
|
22
|
+
steps:
|
23
|
+
- name: Checkout
|
24
|
+
uses: actions/checkout@v2
|
25
|
+
- name: Setup Ruby
|
26
|
+
uses: ruby/setup-ruby@v1
|
27
|
+
with:
|
28
|
+
ruby-version: ${{ matrix.ruby }}
|
29
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
30
|
+
- name: "Install vault cli"
|
31
|
+
run: |
|
32
|
+
curl -sLo vault.zip "https://releases.hashicorp.com/vault/${{ matrix.vault }}/vault_${{ matrix.vault }}_linux_amd64.zip"
|
33
|
+
unzip vault.zip
|
34
|
+
mkdir -p "$HOME/bin"
|
35
|
+
mv vault "$HOME/bin"
|
36
|
+
echo "$HOME/bin" >> "$GITHUB_PATH"
|
37
|
+
- run: bundle exec rake
|
38
|
+
- name: Publish code coverage
|
39
|
+
if: ${{ success() && env.CC_TEST_REPORTER_ID }}
|
40
|
+
uses: paambaati/codeclimate-action@v2.7.5
|
41
|
+
env:
|
42
|
+
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
|
43
|
+
|
44
|
+
permissions:
|
45
|
+
contents: read
|
data/.gitignore
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
### Ruby ###
|
2
|
+
*.gem
|
3
|
+
*.rbc
|
4
|
+
/.config
|
5
|
+
/.vscode
|
6
|
+
/.idea
|
7
|
+
/coverage/
|
8
|
+
/InstalledFiles
|
9
|
+
/pkg/
|
10
|
+
/spec/reports/
|
11
|
+
/test/tmp/
|
12
|
+
/test/version_tmp/
|
13
|
+
/tmp/
|
14
|
+
/vendor/bundle/
|
15
|
+
/vendor/ruby/
|
16
|
+
|
17
|
+
## Specific to RubyMotion:
|
18
|
+
.dat*
|
19
|
+
.repl_history
|
20
|
+
build/
|
21
|
+
|
22
|
+
## Documentation cache and generated files:
|
23
|
+
/.yardoc/
|
24
|
+
/_yardoc/
|
25
|
+
/doc/
|
26
|
+
/rdoc/
|
27
|
+
|
28
|
+
## Environment normalisation:
|
29
|
+
/.bundle/
|
30
|
+
/vendor/bundle
|
31
|
+
/lib/bundler/man/
|
32
|
+
|
33
|
+
# for a library or gem, you might want to ignore these files since the code is
|
34
|
+
# intended to run in multiple environments; otherwise, check them in:
|
35
|
+
Gemfile.lock
|
36
|
+
.ruby-version
|
37
|
+
.ruby-gemset
|
38
|
+
|
39
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
40
|
+
.rvmrc
|
41
|
+
|
42
|
+
# Project-specific
|
43
|
+
spec/tmp
|
data/.rspec
ADDED
data/CHANGELOG.md
CHANGED
@@ -1,287 +1,9 @@
|
|
1
1
|
# Vault Ruby Changelog
|
2
2
|
|
3
|
-
##
|
3
|
+
## Unreleased
|
4
4
|
|
5
|
-
|
5
|
+
No changes.
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
- Restored the ability to use this gem with older Ruby versions that do not have
|
10
|
-
the `OpenSSL::SSL::TLS1_2_VERSION` constant.
|
11
|
-
|
12
|
-
## v0.18.0 (September 14, 2023)
|
13
|
-
|
14
|
-
IMPROVEMENTS
|
15
|
-
|
16
|
-
- Added support for TLS v1.3 by replacing `ssl_version` with `min_version`.
|
17
|
-
|
18
|
-
## v0.17.0 (May 11, 2022)
|
19
|
-
|
20
|
-
IMPROVEMENTS
|
21
|
-
|
22
|
-
- 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.
|
23
|
-
|
24
|
-
## v0.16.0 (March 17, 2021)
|
25
|
-
|
26
|
-
IMPROVEMENTS
|
27
|
-
|
28
|
-
- 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`.
|
29
|
-
|
30
|
-
## v0.15.0 (July 29, 2020)
|
31
|
-
|
32
|
-
IMPROVEMENTS
|
33
|
-
|
34
|
-
- Added support for Resource Quotas
|
35
|
-
|
36
|
-
## v0.14.0 (May 28, 2020)
|
37
|
-
|
38
|
-
IMPROVEMENTS
|
39
|
-
|
40
|
-
- Added support for the Transform Secrets Engine
|
41
|
-
|
42
|
-
## v0.13.2 (May 7, 2020)
|
43
|
-
|
44
|
-
BUG FIXES
|
45
|
-
|
46
|
-
- Fixed the ability to use namespace as an option for each request. Previously, that option was ignored.
|
47
|
-
- aws-sigv4 gem was unlocked after a bug in 1.1.2 broke CI
|
48
|
-
|
49
|
-
## v0.13.1 (April 28, 2020)
|
50
|
-
|
51
|
-
IMPROVEMENTS
|
52
|
-
|
53
|
-
- Added support for defining a namespace when initializing the client, as well as options for changing the namespace via method.
|
54
|
-
- Added support for sys/namespaces API. Ability to Get, Create, Delete, and List namespaces has been provided.
|
55
|
-
|
56
|
-
## v0.13.0 (October 1, 2019)
|
57
|
-
|
58
|
-
IMPROVEMENTS
|
59
|
-
|
60
|
-
- Add support for versioned KV secrets in the client
|
61
|
-
|
62
|
-
## v0.12.0 (August 14, 2018)
|
63
|
-
|
64
|
-
IMPROVEMENTS
|
65
|
-
|
66
|
-
- Expose the github login path as an optional argument
|
67
|
-
- Support HTTP basic auth [GH-181]
|
68
|
-
- Expose the AWS IAM path to use [GH-180]
|
69
|
-
- Add GCP Auth [GH-173]
|
70
|
-
- Add shutdown functionality to close persistent connections [GH-175]
|
71
|
-
|
72
|
-
BUG FIXES
|
73
|
-
|
74
|
-
- Specifing the hostname for SNI didn't work. The functionality has been disabled for now.
|
75
|
-
|
76
|
-
## v0.11.0 (March 19, 2018)
|
77
|
-
|
78
|
-
IMPROVEMENTS
|
79
|
-
|
80
|
-
- Access to health has been added.
|
81
|
-
- Added ability to handle a Base64 encoded PEM (useful for certs in environment variables)
|
82
|
-
- Added IAM EC2 authentication support
|
83
|
-
- Add custom mount path support to TLS authentication
|
84
|
-
|
85
|
-
## v0.10.1 (May 8, 2017)
|
86
|
-
|
87
|
-
IMPROVEMENTS
|
88
|
-
|
89
|
-
- `vault-ruby` is licensed under Mozilla Public License 2.0, and has been for over 2 years. This patch release updates the gemspec to use the correct SPDX ID string for reporting this license, but **no change to the licensing of this gem has occurred**.
|
90
|
-
|
91
|
-
|
92
|
-
## v0.10.0 (April 19, 2017)
|
93
|
-
|
94
|
-
IMPROVEMENTS
|
95
|
-
|
96
|
-
- `#with_retries` now defaults to checking `HTTPServerError` if called without
|
97
|
-
an error classes
|
98
|
-
|
99
|
-
BUG FIXES
|
100
|
-
|
101
|
-
- Don't randomly fail when parsing with Time.parse [GH-140]
|
102
|
-
|
103
|
-
|
104
|
-
## v0.9.0 (March 10, 2017)
|
105
|
-
|
106
|
-
IMPROVEMENTS
|
107
|
-
|
108
|
-
- The pool size used to talk with vault is now configurable. Using `Vault.pool_size` or the env var `VAULT_POOL_SIZE`.
|
109
|
-
|
110
|
-
## v0.8.0 (March 3, 2017)
|
111
|
-
|
112
|
-
BREAKING CHANGES
|
113
|
-
|
114
|
-
- Use PUT/POST for all functions that involve tokens [GH-117]. For Vault 0.6+,
|
115
|
-
this will work as-expected. For older Vault versions, you will need to use an
|
116
|
-
older client library which uses the URL instead. This is deprecated in Vault
|
117
|
-
because the URL would include the token, thus revealing it in request logs.
|
118
|
-
These new methods place the token in the body instead.
|
119
|
-
|
120
|
-
BUG FIXES
|
121
|
-
|
122
|
-
- Do not convert arrays in `#to_h` [GH-125]
|
123
|
-
- Prevent mismatched checkout/checkin from the connection pool; this will avoid masking errors that occur on pool checkout.
|
124
|
-
|
125
|
-
IMPROVEMENTS
|
126
|
-
|
127
|
-
- Support new init API options [GH-127]
|
128
|
-
- Return base64-encoded keys in init response [GH-128]
|
129
|
-
- Add support for `#hostname` for specifying SNI hostname to validate [GH-112]
|
130
|
-
|
131
|
-
## v0.7.3 (October 25, 2016)
|
132
|
-
|
133
|
-
BUG FIXES
|
134
|
-
|
135
|
-
- Allow options to be set on `Vault` as well as any `Vault::Client`
|
136
|
-
instance to be used properly.
|
137
|
-
- Remove Ruby 2.0 syntax in favor of Ruby 1.9
|
138
|
-
|
139
|
-
## v0.7.2 (October 24, 2016)
|
140
|
-
|
141
|
-
BUG FIXES
|
142
|
-
|
143
|
-
- Set the default pool size to 16 rather than calculating from
|
144
|
-
the number of available file descriptors.
|
145
|
-
|
146
|
-
## v0.7.1 (October 21, 2016)
|
147
|
-
|
148
|
-
BUG FIXES
|
149
|
-
|
150
|
-
- Properly vendor Net::HTTP::Persistent so that it doesn't collide
|
151
|
-
with net-http-persistent
|
152
|
-
- Fix behavior where `verify_mode` was forced to `VERIFY_PEER`
|
153
|
-
if a custom CA was set
|
154
|
-
|
155
|
-
## v0.7.0 (October 18, 2016)
|
156
|
-
|
157
|
-
DEPRECATIONS
|
158
|
-
|
159
|
-
- Vault versions older than 0.5.3 are no longer tested
|
160
|
-
|
161
|
-
NEW FEATURES
|
162
|
-
|
163
|
-
- Add support for AppRole
|
164
|
-
- Expose the auth/tune API
|
165
|
-
- Add support for leader step down
|
166
|
-
- Use persistent connections to Vault to speed up requests
|
167
|
-
- Add support for a custom ssl certificate store
|
168
|
-
|
169
|
-
BUG FIXES
|
170
|
-
|
171
|
-
- Allow for spaces in secret names properly
|
172
|
-
|
173
|
-
## v0.6.0 (August 30, 2016)
|
174
|
-
|
175
|
-
NEW FEATURES
|
176
|
-
|
177
|
-
- Add support for Vault 0.6.1 APIs
|
178
|
-
- Add new token `accessors` API method
|
179
|
-
- Add TLS authentication endpoints
|
180
|
-
|
181
|
-
BUG FIXES
|
182
|
-
|
183
|
-
- Restore old `to_h` behavior on response objects
|
184
|
-
|
185
|
-
IMPROVEMENTS
|
186
|
-
|
187
|
-
- Bootstrap full testing harness against old Vault versions
|
188
|
-
|
189
|
-
## v0.5.0 (August 16, 2016)
|
190
|
-
|
191
|
-
NEW FEATURES
|
192
|
-
|
193
|
-
- Add TTL wrapping to logical and auth backends
|
194
|
-
- Support passing PGP keys to init
|
195
|
-
|
196
|
-
BUG FIXES
|
197
|
-
|
198
|
-
- New API documentation
|
199
|
-
- Remove recursive requires
|
200
|
-
|
201
|
-
## v0.4.0 (March 31, 2016)
|
202
|
-
|
203
|
-
NEW FEATURES
|
204
|
-
|
205
|
-
- Add LDAP authentication method [GH-61]
|
206
|
-
- Add GitHub authentication method [GH-37]
|
207
|
-
- Add `create_orphan` method [GH-65]
|
208
|
-
- Add `lookup` and `lookup_self` for tokens
|
209
|
-
- Accept `VAULT_SKIP_VERIFY` environment variable [GH-66]
|
210
|
-
|
211
|
-
BUG FIXES
|
212
|
-
|
213
|
-
- Prefer `VAULT_TOKEN` environment variable over disk to mirror Vault's own
|
214
|
-
behavior [GH-98]
|
215
|
-
- Do not duplicate query parameters on HEAD/GET requests [GH-62]
|
216
|
-
- Yield exception in `with_retries` [GH-68]
|
217
|
-
|
218
|
-
## v0.3.0 (February 16, 2016)
|
219
|
-
|
220
|
-
NEW FEATURES
|
221
|
-
|
222
|
-
- Add API for `renew_self`
|
223
|
-
- Add API for `revoke_self`
|
224
|
-
- Add API for listing secrets where supported
|
225
|
-
|
226
|
-
BUG FIXES
|
227
|
-
|
228
|
-
- Relax bundler constraint
|
229
|
-
- Fix race conditions on Ruby 2.3
|
230
|
-
- Escape path params before posting to Vault
|
231
|
-
|
232
|
-
## v0.2.0 (December 2, 2015)
|
233
|
-
|
234
|
-
IMPROVEMENTS
|
235
|
-
|
236
|
-
- Add support for retries (clients must opt-in) [GH-47]
|
237
|
-
|
238
|
-
BUG FIXES
|
239
|
-
|
240
|
-
- Fix redirection on POST/PUT [GH-40]
|
241
|
-
- Use `$HOME` instead of `~` for shell expansion
|
242
|
-
|
243
|
-
## v0.1.5 (September 1, 2015)
|
244
|
-
|
245
|
-
IMPROVEMENTS
|
246
|
-
|
247
|
-
- Use headers instead of cookies for authenticating to Vault [GH-36]
|
248
|
-
|
249
|
-
BUG FIXES
|
250
|
-
|
251
|
-
- Do not set undefined OpenSSL options
|
252
|
-
- Add `ssl_pem_passphrase` as a configuration option [GH-35]
|
253
|
-
|
254
|
-
## v0.1.4 (August 15, 2015)
|
255
|
-
|
256
|
-
IMPROVEMENTS
|
257
|
-
|
258
|
-
- Add support for using a custom CA cert [GH-8]
|
259
|
-
- Allow clients to specify timeouts [GH-12, GH-14]
|
260
|
-
- Show which error caused the HTTPConnectionError [GH-30]
|
261
|
-
- Allow clients to specify which SSL cipher suites to use [GH-29]
|
262
|
-
- Allow clients to specify the SSL pem password [GH-22, GH-31]
|
263
|
-
|
264
|
-
BUG FIXES
|
265
|
-
|
266
|
-
- Read local token (`~/.vault-token`) for token if present [GH-13]
|
267
|
-
- Disable bad SSL cipher suites and force TLSv1.2 [GH-16]
|
268
|
-
- Update to test against Vault 0.2.0 [GH-20]
|
269
|
-
- Do not attempt a read on logical path write [GH-11, GH-32]
|
270
|
-
|
271
|
-
## v0.1.3 (May 14, 2015)
|
272
|
-
|
273
|
-
BUG FIXES
|
274
|
-
|
275
|
-
- Decode logical response body if present
|
276
|
-
|
277
|
-
## v0.1.2 (May 3, 2015)
|
278
|
-
|
279
|
-
BUG FIXES
|
280
|
-
|
281
|
-
- Require vault/version before accessing Vault::VERSION in the client
|
282
|
-
- Improve Travis CI test coverage
|
283
|
-
- README and typo fixes
|
284
|
-
|
285
|
-
## v0.1.1 (April 4, 2015)
|
7
|
+
## v0.18.2 (November 27, 2023)
|
286
8
|
|
287
9
|
- Initial release
|
data/Gemfile
ADDED
data/LICENSE
CHANGED
File without changes
|
data/README.md
CHANGED
@@ -6,13 +6,21 @@
|
|
6
6
|
[](https://codeclimate.com/github/khiav223577/vault_ruby_client)
|
7
7
|
[](https://codeclimate.com/github/khiav223577/vault_ruby_client/coverage)
|
8
8
|
|
9
|
-
Vault is
|
9
|
+
Vault Ruby Client is a community-maintained Ruby client for interacting with [Vault](https://vaultproject.io) by HashiCorp.
|
10
|
+
|
11
|
+
The official Ruby client is no longer maintained. For more details, refer to the [deprecation announcement](https://developer.hashicorp.com/vault/docs/deprecation#ruby-client-libraries).
|
12
|
+
|
13
|
+
## Supports
|
14
|
+
- Ruby 2.7, 3.0 ~ 3.2
|
15
|
+
- Vault 1.13 ~ 1.17
|
16
|
+
|
17
|
+
If you are using a Ruby version not supported by this gem, please use an older version of the [official Ruby client gem](https://github.com/hashicorp/vault-ruby) instead.
|
10
18
|
|
11
19
|
Quick Start
|
12
20
|
-----------
|
13
|
-
Install Ruby 2.
|
21
|
+
Install Ruby 2.7+: [Guide](https://www.ruby-lang.org/en/documentation/installation/).
|
14
22
|
|
15
|
-
|
23
|
+
Install Vault: [Guide](https://developer.hashicorp.com/vault/install?product_intent=vault).
|
16
24
|
|
17
25
|
Install via Rubygems:
|
18
26
|
|
@@ -89,12 +97,12 @@ client_2 = Vault::Client.new(address: "https://other-vault.mycompany.com")
|
|
89
97
|
And if you want to authenticate with a `AWS EC2` :
|
90
98
|
|
91
99
|
```ruby
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
100
|
+
# Export VAULT_ADDR to ENV then
|
101
|
+
# Get the pkcs7 value from AWS
|
102
|
+
signature = `curl http://169.254.169.254/latest/dynamic/instance-identity/pkcs7`
|
103
|
+
iam_role = `curl http://169.254.169.254/latest/meta-data/iam/security-credentials/`
|
104
|
+
vault_token = Vault.auth.aws_ec2(iam_role, signature, nil)
|
105
|
+
vault_client = Vault::Client.new(address: ENV["VAULT_ADDR"], token: vault_token.auth.client_token)
|
98
106
|
```
|
99
107
|
|
100
108
|
### Making requests
|
data/Rakefile
ADDED
data/lib/vault/api/approle.rb
CHANGED
File without changes
|
data/lib/vault/api/auth.rb
CHANGED
File without changes
|
data/lib/vault/api/auth_tls.rb
CHANGED
File without changes
|
data/lib/vault/api/auth_token.rb
CHANGED
File without changes
|
data/lib/vault/api/help.rb
CHANGED
File without changes
|
data/lib/vault/api/kv.rb
CHANGED
File without changes
|
data/lib/vault/api/logical.rb
CHANGED
File without changes
|
data/lib/vault/api/secret.rb
CHANGED
File without changes
|
data/lib/vault/api/sys/audit.rb
CHANGED
File without changes
|
data/lib/vault/api/sys/auth.rb
CHANGED
File without changes
|
data/lib/vault/api/sys/health.rb
CHANGED
File without changes
|
data/lib/vault/api/sys/init.rb
CHANGED
File without changes
|
data/lib/vault/api/sys/leader.rb
CHANGED
File without changes
|
data/lib/vault/api/sys/lease.rb
CHANGED
File without changes
|
data/lib/vault/api/sys/mount.rb
CHANGED
File without changes
|
File without changes
|
data/lib/vault/api/sys/policy.rb
CHANGED
File without changes
|
data/lib/vault/api/sys/quota.rb
CHANGED
File without changes
|
data/lib/vault/api/sys/seal.rb
CHANGED
File without changes
|
data/lib/vault/api/sys.rb
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/lib/vault/api/transform.rb
CHANGED
File without changes
|
data/lib/vault/api.rb
CHANGED
File without changes
|
data/lib/vault/client.rb
CHANGED
@@ -305,6 +305,15 @@ module Vault
|
|
305
305
|
end
|
306
306
|
end
|
307
307
|
|
308
|
+
# Removes double slashes from a path.
|
309
|
+
#
|
310
|
+
# @param [String]
|
311
|
+
#
|
312
|
+
# @return [String]
|
313
|
+
def remove_double_slash(path)
|
314
|
+
path.b.gsub(%r{//+}, '/')
|
315
|
+
end
|
316
|
+
|
308
317
|
# Construct a URL from the given verb and path. If the request is a GET or
|
309
318
|
# DELETE request, the params are assumed to be query params are are
|
310
319
|
# converted as such using {Client#to_query_string}.
|
@@ -333,6 +342,8 @@ module Vault
|
|
333
342
|
# Don't merge absolute URLs
|
334
343
|
uri = URI.parse(File.join(address, path)) unless uri.absolute?
|
335
344
|
|
345
|
+
uri.path = remove_double_slash(uri.path)
|
346
|
+
|
336
347
|
# Return the URI object
|
337
348
|
uri
|
338
349
|
end
|
data/lib/vault/configurable.rb
CHANGED
File without changes
|
data/lib/vault/defaults.rb
CHANGED
File without changes
|
data/lib/vault/encode.rb
CHANGED
data/lib/vault/errors.rb
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/lib/vault/persistent.rb
CHANGED
File without changes
|
data/lib/vault/request.rb
CHANGED
File without changes
|
data/lib/vault/response.rb
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/lib/vault/version.rb
CHANGED
data/lib/vault_ruby_client.rb
CHANGED
File without changes
|
@@ -0,0 +1,50 @@
|
|
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_ruby_client'
|
8
|
+
spec.version = Vault::VERSION
|
9
|
+
spec.authors = ['khiav reoy']
|
10
|
+
spec.email = ['khiav223577@gmail.com']
|
11
|
+
|
12
|
+
spec.summary = 'Vault is a Ruby API client for interacting with a Vault server.'
|
13
|
+
spec.description = 'Vault is a Ruby API client for interacting with a Vault server.'
|
14
|
+
spec.homepage = 'https://github.com/khiav223577/vault_ruby_client'
|
15
|
+
spec.license = 'MIT'
|
16
|
+
|
17
|
+
# Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
|
18
|
+
# delete this section to allow pushing this gem to any host.
|
19
|
+
# if spec.respond_to?(:metadata)
|
20
|
+
# spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com'"
|
21
|
+
# else
|
22
|
+
# raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
|
23
|
+
# end
|
24
|
+
|
25
|
+
spec.required_ruby_version = ">= 2.0"
|
26
|
+
if Gem::Version.new(RUBY_VERSION) <= Gem::Version.new("2.4.0")
|
27
|
+
spec.add_runtime_dependency "aws-sigv4", "= 1.6.0"
|
28
|
+
spec.add_runtime_dependency "aws-eventstream", "= 1.2.0"
|
29
|
+
else
|
30
|
+
spec.add_runtime_dependency "aws-sigv4"
|
31
|
+
end
|
32
|
+
|
33
|
+
spec.files = `git ls-files -z`.split("\x0").reject{|f| f.match(%r{^(test|spec|features)/}) }
|
34
|
+
spec.bindir = 'exe'
|
35
|
+
spec.executables = spec.files.grep(%r{^exe/}){|f| File.basename(f) }
|
36
|
+
spec.require_paths = ['lib']
|
37
|
+
spec.metadata = {
|
38
|
+
'homepage_uri' => 'https://github.com/khiav223577/vault_ruby_client',
|
39
|
+
'changelog_uri' => 'https://github.com/khiav223577/vault_ruby_client/blob/master/CHANGELOG.md',
|
40
|
+
'source_code_uri' => 'https://github.com/khiav223577/vault_ruby_client',
|
41
|
+
'documentation_uri' => 'https://www.rubydoc.info/gems/vault_ruby_client',
|
42
|
+
'bug_tracker_uri' => 'https://github.com/khiav223577/vault_ruby_client/issues',
|
43
|
+
}
|
44
|
+
|
45
|
+
spec.add_development_dependency "bundler", "~> 2"
|
46
|
+
spec.add_development_dependency "rake", "~> 13.2"
|
47
|
+
spec.add_development_dependency "rspec", "~> 3.13"
|
48
|
+
spec.add_development_dependency "webmock", "~> 3.24"
|
49
|
+
spec.add_development_dependency "webrick", "~> 1.9"
|
50
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vault_ruby_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- khiav reoy
|
8
|
-
autorequire:
|
9
8
|
bindir: exe
|
10
9
|
cert_chain: []
|
11
|
-
date: 2024-
|
10
|
+
date: 2024-12-23 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: aws-sigv4
|
@@ -80,6 +79,20 @@ dependencies:
|
|
80
79
|
- - "~>"
|
81
80
|
- !ruby/object:Gem::Version
|
82
81
|
version: '3.24'
|
82
|
+
- !ruby/object:Gem::Dependency
|
83
|
+
name: webrick
|
84
|
+
requirement: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - "~>"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '1.9'
|
89
|
+
type: :development
|
90
|
+
prerelease: false
|
91
|
+
version_requirements: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - "~>"
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '1.9'
|
83
96
|
description: Vault is a Ruby API client for interacting with a Vault server.
|
84
97
|
email:
|
85
98
|
- khiav223577@gmail.com
|
@@ -87,9 +100,15 @@ executables: []
|
|
87
100
|
extensions: []
|
88
101
|
extra_rdoc_files: []
|
89
102
|
files:
|
103
|
+
- ".github/dependabot.yml"
|
104
|
+
- ".github/workflows/ruby.yml"
|
105
|
+
- ".gitignore"
|
106
|
+
- ".rspec"
|
90
107
|
- CHANGELOG.md
|
108
|
+
- Gemfile
|
91
109
|
- LICENSE
|
92
110
|
- README.md
|
111
|
+
- Rakefile
|
93
112
|
- lib/vault/api.rb
|
94
113
|
- lib/vault/api/approle.rb
|
95
114
|
- lib/vault/api/auth.rb
|
@@ -132,11 +151,16 @@ files:
|
|
132
151
|
- lib/vault/vendor/connection_pool/version.rb
|
133
152
|
- lib/vault/version.rb
|
134
153
|
- lib/vault_ruby_client.rb
|
154
|
+
- vault_ruby_client.gemspec
|
135
155
|
homepage: https://github.com/khiav223577/vault_ruby_client
|
136
156
|
licenses:
|
137
|
-
-
|
138
|
-
metadata:
|
139
|
-
|
157
|
+
- MIT
|
158
|
+
metadata:
|
159
|
+
homepage_uri: https://github.com/khiav223577/vault_ruby_client
|
160
|
+
changelog_uri: https://github.com/khiav223577/vault_ruby_client/blob/master/CHANGELOG.md
|
161
|
+
source_code_uri: https://github.com/khiav223577/vault_ruby_client
|
162
|
+
documentation_uri: https://www.rubydoc.info/gems/vault_ruby_client
|
163
|
+
bug_tracker_uri: https://github.com/khiav223577/vault_ruby_client/issues
|
140
164
|
rdoc_options: []
|
141
165
|
require_paths:
|
142
166
|
- lib
|
@@ -151,8 +175,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
151
175
|
- !ruby/object:Gem::Version
|
152
176
|
version: '0'
|
153
177
|
requirements: []
|
154
|
-
rubygems_version: 3.
|
155
|
-
signing_key:
|
178
|
+
rubygems_version: 3.6.2
|
156
179
|
specification_version: 4
|
157
180
|
summary: Vault is a Ruby API client for interacting with a Vault server.
|
158
181
|
test_files: []
|