vault_ruby_client 0.18.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +287 -0
  3. data/LICENSE +364 -0
  4. data/README.md +223 -0
  5. data/lib/vault/api/approle.rb +221 -0
  6. data/lib/vault/api/auth.rb +324 -0
  7. data/lib/vault/api/auth_tls.rb +95 -0
  8. data/lib/vault/api/auth_token.rb +245 -0
  9. data/lib/vault/api/help.rb +36 -0
  10. data/lib/vault/api/kv.rb +230 -0
  11. data/lib/vault/api/logical.rb +153 -0
  12. data/lib/vault/api/secret.rb +171 -0
  13. data/lib/vault/api/sys/audit.rb +94 -0
  14. data/lib/vault/api/sys/auth.rb +119 -0
  15. data/lib/vault/api/sys/health.rb +66 -0
  16. data/lib/vault/api/sys/init.rb +86 -0
  17. data/lib/vault/api/sys/leader.rb +51 -0
  18. data/lib/vault/api/sys/lease.rb +52 -0
  19. data/lib/vault/api/sys/mount.rb +165 -0
  20. data/lib/vault/api/sys/namespace.rb +86 -0
  21. data/lib/vault/api/sys/policy.rb +95 -0
  22. data/lib/vault/api/sys/quota.rb +110 -0
  23. data/lib/vault/api/sys/seal.rb +84 -0
  24. data/lib/vault/api/sys.rb +30 -0
  25. data/lib/vault/api/transform/alphabet.rb +46 -0
  26. data/lib/vault/api/transform/role.rb +45 -0
  27. data/lib/vault/api/transform/template.rb +57 -0
  28. data/lib/vault/api/transform/transformation.rb +64 -0
  29. data/lib/vault/api/transform.rb +32 -0
  30. data/lib/vault/api.rb +17 -0
  31. data/lib/vault/client.rb +460 -0
  32. data/lib/vault/configurable.rb +53 -0
  33. data/lib/vault/defaults.rb +218 -0
  34. data/lib/vault/encode.rb +22 -0
  35. data/lib/vault/errors.rb +87 -0
  36. data/lib/vault/persistent/connection.rb +45 -0
  37. data/lib/vault/persistent/pool.rb +51 -0
  38. data/lib/vault/persistent/timed_stack_multi.rb +73 -0
  39. data/lib/vault/persistent.rb +1161 -0
  40. data/lib/vault/request.rb +47 -0
  41. data/lib/vault/response.rb +92 -0
  42. data/lib/vault/vendor/connection_pool/timed_stack.rb +181 -0
  43. data/lib/vault/vendor/connection_pool/version.rb +8 -0
  44. data/lib/vault/vendor/connection_pool.rb +153 -0
  45. data/lib/vault/version.rb +6 -0
  46. data/lib/vault_ruby_client.rb +53 -0
  47. metadata +158 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: bcb2a20987a39d207d4b1080bd4631a940b1be8261b7cd0bfbc3c51579a476a1
4
+ data.tar.gz: 38ebaf464ad1ba4fda63274d19acee366fcc1324a5b2be78722d2a7a57967891
5
+ SHA512:
6
+ metadata.gz: a1548a0313eb3d48c0991e6c29d2a1378a907b86d7dfd4749fd1bb325124afb6e01a811818e735af2897eacfba541787af4297edb5e38ddf8f0ca5eca040c1eb
7
+ data.tar.gz: b6051a92669dbbd3da23d091c5ad595be025d5656db7ab7f25d485fc74834105230748d8e8d01e8b234dc0747e04cadad47eaa135e8f9e0325834926a6c6f7f1
data/CHANGELOG.md ADDED
@@ -0,0 +1,287 @@
1
+ # Vault Ruby Changelog
2
+
3
+ ## v?.??.? (Unreleased)
4
+
5
+ ## v0.18.1 (September 14, 2023)
6
+
7
+ BUG FIXES
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)
286
+
287
+ - Initial release
data/LICENSE ADDED
@@ -0,0 +1,364 @@
1
+ Copyright (c) 2015 HashiCorp, Inc.
2
+
3
+ Mozilla Public License, version 2.0
4
+
5
+ 1. Definitions
6
+
7
+ 1.1. "Contributor"
8
+
9
+ means each individual or legal entity that creates, contributes to the
10
+ creation of, or owns Covered Software.
11
+
12
+ 1.2. "Contributor Version"
13
+
14
+ means the combination of the Contributions of others (if any) used by a
15
+ Contributor and that particular Contributor's Contribution.
16
+
17
+ 1.3. "Contribution"
18
+
19
+ means Covered Software of a particular Contributor.
20
+
21
+ 1.4. "Covered Software"
22
+
23
+ means Source Code Form to which the initial Contributor has attached the
24
+ notice in Exhibit A, the Executable Form of such Source Code Form, and
25
+ Modifications of such Source Code Form, in each case including portions
26
+ thereof.
27
+
28
+ 1.5. "Incompatible With Secondary Licenses"
29
+ means
30
+
31
+ a. that the initial Contributor has attached the notice described in
32
+ Exhibit B to the Covered Software; or
33
+
34
+ b. that the Covered Software was made available under the terms of
35
+ version 1.1 or earlier of the License, but not also under the terms of
36
+ a Secondary License.
37
+
38
+ 1.6. "Executable Form"
39
+
40
+ means any form of the work other than Source Code Form.
41
+
42
+ 1.7. "Larger Work"
43
+
44
+ means a work that combines Covered Software with other material, in a
45
+ separate file or files, that is not Covered Software.
46
+
47
+ 1.8. "License"
48
+
49
+ means this document.
50
+
51
+ 1.9. "Licensable"
52
+
53
+ means having the right to grant, to the maximum extent possible, whether
54
+ at the time of the initial grant or subsequently, any and all of the
55
+ rights conveyed by this License.
56
+
57
+ 1.10. "Modifications"
58
+
59
+ means any of the following:
60
+
61
+ a. any file in Source Code Form that results from an addition to,
62
+ deletion from, or modification of the contents of Covered Software; or
63
+
64
+ b. any new file in Source Code Form that contains any Covered Software.
65
+
66
+ 1.11. "Patent Claims" of a Contributor
67
+
68
+ means any patent claim(s), including without limitation, method,
69
+ process, and apparatus claims, in any patent Licensable by such
70
+ Contributor that would be infringed, but for the grant of the License,
71
+ by the making, using, selling, offering for sale, having made, import,
72
+ or transfer of either its Contributions or its Contributor Version.
73
+
74
+ 1.12. "Secondary License"
75
+
76
+ means either the GNU General Public License, Version 2.0, the GNU Lesser
77
+ General Public License, Version 2.1, the GNU Affero General Public
78
+ License, Version 3.0, or any later versions of those licenses.
79
+
80
+ 1.13. "Source Code Form"
81
+
82
+ means the form of the work preferred for making modifications.
83
+
84
+ 1.14. "You" (or "Your")
85
+
86
+ means an individual or a legal entity exercising rights under this
87
+ License. For legal entities, "You" includes any entity that controls, is
88
+ controlled by, or is under common control with You. For purposes of this
89
+ definition, "control" means (a) the power, direct or indirect, to cause
90
+ the direction or management of such entity, whether by contract or
91
+ otherwise, or (b) ownership of more than fifty percent (50%) of the
92
+ outstanding shares or beneficial ownership of such entity.
93
+
94
+
95
+ 2. License Grants and Conditions
96
+
97
+ 2.1. Grants
98
+
99
+ Each Contributor hereby grants You a world-wide, royalty-free,
100
+ non-exclusive license:
101
+
102
+ a. under intellectual property rights (other than patent or trademark)
103
+ Licensable by such Contributor to use, reproduce, make available,
104
+ modify, display, perform, distribute, and otherwise exploit its
105
+ Contributions, either on an unmodified basis, with Modifications, or
106
+ as part of a Larger Work; and
107
+
108
+ b. under Patent Claims of such Contributor to make, use, sell, offer for
109
+ sale, have made, import, and otherwise transfer either its
110
+ Contributions or its Contributor Version.
111
+
112
+ 2.2. Effective Date
113
+
114
+ The licenses granted in Section 2.1 with respect to any Contribution
115
+ become effective for each Contribution on the date the Contributor first
116
+ distributes such Contribution.
117
+
118
+ 2.3. Limitations on Grant Scope
119
+
120
+ The licenses granted in this Section 2 are the only rights granted under
121
+ this License. No additional rights or licenses will be implied from the
122
+ distribution or licensing of Covered Software under this License.
123
+ Notwithstanding Section 2.1(b) above, no patent license is granted by a
124
+ Contributor:
125
+
126
+ a. for any code that a Contributor has removed from Covered Software; or
127
+
128
+ b. for infringements caused by: (i) Your and any other third party's
129
+ modifications of Covered Software, or (ii) the combination of its
130
+ Contributions with other software (except as part of its Contributor
131
+ Version); or
132
+
133
+ c. under Patent Claims infringed by Covered Software in the absence of
134
+ its Contributions.
135
+
136
+ This License does not grant any rights in the trademarks, service marks,
137
+ or logos of any Contributor (except as may be necessary to comply with
138
+ the notice requirements in Section 3.4).
139
+
140
+ 2.4. Subsequent Licenses
141
+
142
+ No Contributor makes additional grants as a result of Your choice to
143
+ distribute the Covered Software under a subsequent version of this
144
+ License (see Section 10.2) or under the terms of a Secondary License (if
145
+ permitted under the terms of Section 3.3).
146
+
147
+ 2.5. Representation
148
+
149
+ Each Contributor represents that the Contributor believes its
150
+ Contributions are its original creation(s) or it has sufficient rights to
151
+ grant the rights to its Contributions conveyed by this License.
152
+
153
+ 2.6. Fair Use
154
+
155
+ This License is not intended to limit any rights You have under
156
+ applicable copyright doctrines of fair use, fair dealing, or other
157
+ equivalents.
158
+
159
+ 2.7. Conditions
160
+
161
+ Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in
162
+ Section 2.1.
163
+
164
+
165
+ 3. Responsibilities
166
+
167
+ 3.1. Distribution of Source Form
168
+
169
+ All distribution of Covered Software in Source Code Form, including any
170
+ Modifications that You create or to which You contribute, must be under
171
+ the terms of this License. You must inform recipients that the Source
172
+ Code Form of the Covered Software is governed by the terms of this
173
+ License, and how they can obtain a copy of this License. You may not
174
+ attempt to alter or restrict the recipients' rights in the Source Code
175
+ Form.
176
+
177
+ 3.2. Distribution of Executable Form
178
+
179
+ If You distribute Covered Software in Executable Form then:
180
+
181
+ a. such Covered Software must also be made available in Source Code Form,
182
+ as described in Section 3.1, and You must inform recipients of the
183
+ Executable Form how they can obtain a copy of such Source Code Form by
184
+ reasonable means in a timely manner, at a charge no more than the cost
185
+ of distribution to the recipient; and
186
+
187
+ b. You may distribute such Executable Form under the terms of this
188
+ License, or sublicense it under different terms, provided that the
189
+ license for the Executable Form does not attempt to limit or alter the
190
+ recipients' rights in the Source Code Form under this License.
191
+
192
+ 3.3. Distribution of a Larger Work
193
+
194
+ You may create and distribute a Larger Work under terms of Your choice,
195
+ provided that You also comply with the requirements of this License for
196
+ the Covered Software. If the Larger Work is a combination of Covered
197
+ Software with a work governed by one or more Secondary Licenses, and the
198
+ Covered Software is not Incompatible With Secondary Licenses, this
199
+ License permits You to additionally distribute such Covered Software
200
+ under the terms of such Secondary License(s), so that the recipient of
201
+ the Larger Work may, at their option, further distribute the Covered
202
+ Software under the terms of either this License or such Secondary
203
+ License(s).
204
+
205
+ 3.4. Notices
206
+
207
+ You may not remove or alter the substance of any license notices
208
+ (including copyright notices, patent notices, disclaimers of warranty, or
209
+ limitations of liability) contained within the Source Code Form of the
210
+ Covered Software, except that You may alter any license notices to the
211
+ extent required to remedy known factual inaccuracies.
212
+
213
+ 3.5. Application of Additional Terms
214
+
215
+ You may choose to offer, and to charge a fee for, warranty, support,
216
+ indemnity or liability obligations to one or more recipients of Covered
217
+ Software. However, You may do so only on Your own behalf, and not on
218
+ behalf of any Contributor. You must make it absolutely clear that any
219
+ such warranty, support, indemnity, or liability obligation is offered by
220
+ You alone, and You hereby agree to indemnify every Contributor for any
221
+ liability incurred by such Contributor as a result of warranty, support,
222
+ indemnity or liability terms You offer. You may include additional
223
+ disclaimers of warranty and limitations of liability specific to any
224
+ jurisdiction.
225
+
226
+ 4. Inability to Comply Due to Statute or Regulation
227
+
228
+ If it is impossible for You to comply with any of the terms of this License
229
+ with respect to some or all of the Covered Software due to statute,
230
+ judicial order, or regulation then You must: (a) comply with the terms of
231
+ this License to the maximum extent possible; and (b) describe the
232
+ limitations and the code they affect. Such description must be placed in a
233
+ text file included with all distributions of the Covered Software under
234
+ this License. Except to the extent prohibited by statute or regulation,
235
+ such description must be sufficiently detailed for a recipient of ordinary
236
+ skill to be able to understand it.
237
+
238
+ 5. Termination
239
+
240
+ 5.1. The rights granted under this License will terminate automatically if You
241
+ fail to comply with any of its terms. However, if You become compliant,
242
+ then the rights granted under this License from a particular Contributor
243
+ are reinstated (a) provisionally, unless and until such Contributor
244
+ explicitly and finally terminates Your grants, and (b) on an ongoing
245
+ basis, if such Contributor fails to notify You of the non-compliance by
246
+ some reasonable means prior to 60 days after You have come back into
247
+ compliance. Moreover, Your grants from a particular Contributor are
248
+ reinstated on an ongoing basis if such Contributor notifies You of the
249
+ non-compliance by some reasonable means, this is the first time You have
250
+ received notice of non-compliance with this License from such
251
+ Contributor, and You become compliant prior to 30 days after Your receipt
252
+ of the notice.
253
+
254
+ 5.2. If You initiate litigation against any entity by asserting a patent
255
+ infringement claim (excluding declaratory judgment actions,
256
+ counter-claims, and cross-claims) alleging that a Contributor Version
257
+ directly or indirectly infringes any patent, then the rights granted to
258
+ You by any and all Contributors for the Covered Software under Section
259
+ 2.1 of this License shall terminate.
260
+
261
+ 5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user
262
+ license agreements (excluding distributors and resellers) which have been
263
+ validly granted by You or Your distributors under this License prior to
264
+ termination shall survive termination.
265
+
266
+ 6. Disclaimer of Warranty
267
+
268
+ Covered Software is provided under this License on an "as is" basis,
269
+ without warranty of any kind, either expressed, implied, or statutory,
270
+ including, without limitation, warranties that the Covered Software is free
271
+ of defects, merchantable, fit for a particular purpose or non-infringing.
272
+ The entire risk as to the quality and performance of the Covered Software
273
+ is with You. Should any Covered Software prove defective in any respect,
274
+ You (not any Contributor) assume the cost of any necessary servicing,
275
+ repair, or correction. This disclaimer of warranty constitutes an essential
276
+ part of this License. No use of any Covered Software is authorized under
277
+ this License except under this disclaimer.
278
+
279
+ 7. Limitation of Liability
280
+
281
+ Under no circumstances and under no legal theory, whether tort (including
282
+ negligence), contract, or otherwise, shall any Contributor, or anyone who
283
+ distributes Covered Software as permitted above, be liable to You for any
284
+ direct, indirect, special, incidental, or consequential damages of any
285
+ character including, without limitation, damages for lost profits, loss of
286
+ goodwill, work stoppage, computer failure or malfunction, or any and all
287
+ other commercial damages or losses, even if such party shall have been
288
+ informed of the possibility of such damages. This limitation of liability
289
+ shall not apply to liability for death or personal injury resulting from
290
+ such party's negligence to the extent applicable law prohibits such
291
+ limitation. Some jurisdictions do not allow the exclusion or limitation of
292
+ incidental or consequential damages, so this exclusion and limitation may
293
+ not apply to You.
294
+
295
+ 8. Litigation
296
+
297
+ Any litigation relating to this License may be brought only in the courts
298
+ of a jurisdiction where the defendant maintains its principal place of
299
+ business and such litigation shall be governed by laws of that
300
+ jurisdiction, without reference to its conflict-of-law provisions. Nothing
301
+ in this Section shall prevent a party's ability to bring cross-claims or
302
+ counter-claims.
303
+
304
+ 9. Miscellaneous
305
+
306
+ This License represents the complete agreement concerning the subject
307
+ matter hereof. If any provision of this License is held to be
308
+ unenforceable, such provision shall be reformed only to the extent
309
+ necessary to make it enforceable. Any law or regulation which provides that
310
+ the language of a contract shall be construed against the drafter shall not
311
+ be used to construe this License against a Contributor.
312
+
313
+
314
+ 10. Versions of the License
315
+
316
+ 10.1. New Versions
317
+
318
+ Mozilla Foundation is the license steward. Except as provided in Section
319
+ 10.3, no one other than the license steward has the right to modify or
320
+ publish new versions of this License. Each version will be given a
321
+ distinguishing version number.
322
+
323
+ 10.2. Effect of New Versions
324
+
325
+ You may distribute the Covered Software under the terms of the version
326
+ of the License under which You originally received the Covered Software,
327
+ or under the terms of any subsequent version published by the license
328
+ steward.
329
+
330
+ 10.3. Modified Versions
331
+
332
+ If you create software not governed by this License, and you want to
333
+ create a new license for such software, you may create and use a
334
+ modified version of this License if you rename the license and remove
335
+ any references to the name of the license steward (except to note that
336
+ such modified license differs from this License).
337
+
338
+ 10.4. Distributing Source Code Form that is Incompatible With Secondary
339
+ Licenses If You choose to distribute Source Code Form that is
340
+ Incompatible With Secondary Licenses under the terms of this version of
341
+ the License, the notice described in Exhibit B of this License must be
342
+ attached.
343
+
344
+ Exhibit A - Source Code Form License Notice
345
+
346
+ This Source Code Form is subject to the
347
+ terms of the Mozilla Public License, v.
348
+ 2.0. If a copy of the MPL was not
349
+ distributed with this file, You can
350
+ obtain one at
351
+ http://mozilla.org/MPL/2.0/.
352
+
353
+ If it is not possible or desirable to put the notice in a particular file,
354
+ then You may include the notice in a location (such as a LICENSE file in a
355
+ relevant directory) where a recipient would be likely to look for such a
356
+ notice.
357
+
358
+ You may add additional accurate notices of copyright ownership.
359
+
360
+ Exhibit B - "Incompatible With Secondary Licenses" Notice
361
+
362
+ This Source Code Form is "Incompatible
363
+ With Secondary Licenses", as defined by
364
+ the Mozilla Public License, v. 2.0.