Commit Graph

719 Commits

Author SHA1 Message Date
hc-github-team-secure-vault-core
d9ec27eb4c Update hashicorp/vault-plugin-database-elasticsearch to v0.13.3 (#22696)
* Automated dependency upgrades

* Add changelog

---------

Co-authored-by: hc-github-team-secure-vault-ecosystem <hc-github-team-secure-vault-ecosystem@users.noreply.github.com>
2023-08-31 11:31:38 -07:00
hc-github-team-secure-vault-core
9006375b53 Update hashicorp/vault-plugin-auth-alicloud to v0.16.0 (#22646)
* Automated dependency upgrades

* Add changelog

---------

Co-authored-by: hc-github-team-secure-vault-ecosystem <hc-github-team-secure-vault-ecosystem@users.noreply.github.com>
2023-08-30 20:51:10 +00:00
hc-github-team-secure-vault-core
7a5911be4f Update hashicorp/vault-plugin-database-redis to v0.2.2 (#22654)
* Automated dependency upgrades

* Add changelog

---------

Co-authored-by: hc-github-team-secure-vault-ecosystem <hc-github-team-secure-vault-ecosystem@users.noreply.github.com>
2023-08-30 20:09:00 +00:00
hc-github-team-secure-vault-core
c8efa4c7a4 Update hashicorp/vault-plugin-database-mongodbatlas to v0.10.1 (#22655)
* Automated dependency upgrades

* Add changelog

---------

Co-authored-by: hc-github-team-secure-vault-ecosystem <hc-github-team-secure-vault-ecosystem@users.noreply.github.com>
2023-08-30 11:58:32 -07:00
hc-github-team-secure-vault-core
5ac26d3da0 Update hashicorp/vault-plugin-auth-gcp to v0.16.1 (#22612)
* Automated dependency upgrades

* Add changelog

---------

Co-authored-by: hc-github-team-secure-vault-ecosystem <hc-github-team-secure-vault-ecosystem@users.noreply.github.com>
2023-08-29 17:55:57 +00:00
hc-github-team-secure-vault-core
3126b9f365 Update hashicorp/vault-plugin-database-redis-elasticache to v0.2.3 (#22598)
* Automated dependency upgrades

* Add changelog

---------

Co-authored-by: hc-github-team-secure-vault-ecosystem <hc-github-team-secure-vault-ecosystem@users.noreply.github.com>
2023-08-29 00:04:12 +00:00
hc-github-team-secure-vault-core
2fc490b408 Update hashicorp/vault-plugin-database-redis-elasticache to v0.2.2 (#22584)
* Automated dependency upgrades

* Add changelog

---------

Co-authored-by: hc-github-team-secure-vault-ecosystem <hc-github-team-secure-vault-ecosystem@users.noreply.github.com>
2023-08-28 18:05:10 +00:00
John-Michael Faircloth
83f3e391c2 secrets/database: advanced TTL management for static roles (#22484)
* add rotation_schedule field to db backend

* add cron schedule field

* use priority queue with scheduled rotation types

* allow marshalling of cron schedule type

* return warning on use of mutually exclusive fields

* handle mutual exclusion of rotation fields (#22306)

* handle mutual exclusion of rotation fields

* fix import

* adv ttl mgmt: add rotation_window field (#22303)

* adv ttl mgmt: add rotation_window field

* do some rotation_window validation and add unit tests

* adv ttl mgmt: Ensure initialization sets appropriate rotation schedule (#22341)

* general cleanup and refactor rotation type checks

* make NextRotationTime account for the rotation type

* add comments

* add unit tests to handle mutual exclusion (#22352)

* add unit tests to handle mutual exclusion

* revert rotation_test.go and add missing test case to path_roles_test.go

* adv ttl mgmt: add tests for init queue (#22376)

* Vault 18908/handle manual rotation (#22389)

* support manual rotation for schedule based roles

* update description and naming

* adv ttl mgmt: consider rotation window (#22448)

* consider rotation window

ensure rotations only occur within a rotation window for schedule-based
rotations

* use helper method to set priority in rotateCredential

* fix bug with priority check

* remove test for now

* add and remove comments

* add unit tests for manual rotation (#22453)

* adv ttl mgmt: add tests for rotation_window

* adv ttl mgmt: refactor window tests (#22472)

* Handle GET static-creds endpoint (#22476)

* update read static-creds endpoint to include correct resp data

* return rotation_window if set

* update

* add changelog

* add unit test for static-creds read endpoint (#22505)

---------

Co-authored-by: Milena Zlaticanin <60530402+Zlaticanin@users.noreply.github.com>
2023-08-24 16:45:07 -05:00
Victor Rodriguez
d8c6d28ec7 Add vault community changes for the Seal HA project. (#22515)
* Seal HA: Use new SealWrappedValue type to abstract seal wrapped values

Introduce SealWrappedValue to abstract seal wrapped values.

Make SealWrappedValue capable of marshalling into a BlobInfo, when there is
plaintext or a single encryption, or to a custom serialization consisting of a
header, length and a marshalled MultiWrapValue protobuf.

* Vault-13769: Support configuring and using multiple seals for unsealing

* Make sealWrapBackend start using multiple seals

* Make seal.Access no longer implement wrapping.Wrapper.

Instead, add the Encrypt and Decrypt methods to the Access interface.

* Make raft snapshot system use funcs SealWrapValue + UnsealWrapValue.

Move the snapshot.Sealer implementation to the vault package to
avoid circular imports.

* Update sealWrapBackend to use multiple seals for encryption.

Use all the encryption wrappers when storing seal wrapped values.

Try do decrypt using the highest priority wrapper, but try all
combinations of encrypted values and wrappers if necessary.

* Allow the use of multiple seals for entropy augmentation

Add seal_name variable in entropy stanza
Add new MultiSourcer to accommodate the new entropy augmentation behavior.

* Individually health check each wrapper, and add a sys/seal-backend-status endpoint.

* Address a race, and also a failed test mock that I didn't catch

* Track partial wrapping failures...

... where one or more but not all access.Encrypts fail for a given write.
Note these failures by adding a time ordered UUID storage entry containing
the path in a special subdirectory of root storage. Adds a callback
pattern to accomplish this, with certain high value writes like initial
barrier key storage not allowing a partial failure. The followup work
would be to detect return to health and iterate through these storage
entries, rewrapping.

* Add new data structure to track seal config generation (#4492)

* Add new data structure to track seal config generation

* Remove import cycle

* Fix undefined variable errors

* update comment

* Update setSeal response

* Fix setSealResponse in operator_diagnose

* Scope the wrapper health check locks individually (#4491)

* Refactor setSeal function in server.go. (#4505)

Refactor setSeal function in server.go.

* Decouple CreateSecureRandomReaderFunc from seal package.

Instead of using a list of seal.SealInfo structs, make
CreateSecureRandomReaderFunc use a list of new EntropySourcerInfo structs. This
brakes the denpency of package configutil on the seal package.

* Move SealGenerationInfo tracking to the seal Access.

* Move SealGenerationInfo tracking to the seal Access.

The SealGenerationInfo is now kept track by a Seal's Access instead of by the
Config object. The access implementation now records the correct generation
number on seal wrapped values.

* Only store and read SealGenerationInfo if VAULT_ENABLE_SEAL_HA_BETA is true.

* Add MultiWrapValue protobuf message

MultiWrapValue can be used to keep track of different encryptions of a value.
---------

Co-authored-by: Victor Rodriguez <vrizo@hashicorp.com>

* Use generation to determine if a seal wrapped value is up-to-date. (#4542)

* Add logging to seal Access implementation.

* Seal HA buf format run (#4561)

* Run buf format.

* Add buf.lock to ensure go-kms-wrapping module is imported.

* Vault-18958: Add unit tests for config checks

* Add safety logic for seal configuration changes

* Revert "Add safety logic for seal configuration changes"

This reverts commit 7fec48035a5cf274e5a4d98901716d08d766ce90.

* changes and tests for checking seal config

* add ent tests

* remove check for empty name and add type into test cases

* add error message for empty name

* fix no seals test

---------

Co-authored-by: divyapola5 <divya@hashicorp.com>

* Handle migrations between single-wrapper and multi-wrapper autoSeals

* Extract method SetPhysicalSealConfig.

* Extract function physicalSealConfig.

The extracted function is the only code now reading SealConfig entries from
storage.

* Extract function setPhysicalSealConfig.

The extracted function is the only code now writing SealConfig entries from
storage (except for migration from the old recovery config path).

* Move SealConfig to new file vault/seal_config.go.

* Add SealConfigType quasy-enumeration.

SealConfigType is to serve as the typed values for field SealConfig.Type.

* Rename Seal.RecoveryType to RecoverySealConfigType.

Make RecoverySealConfigType  return a SealConfigType instead of a string.

* Rename Seal.BarrierType to BarrierSealConfigType.

Make BarrierSealConfigType return a SealConfigType.

Remove seal.SealType (really a two-step rename to SealConfigType).

* Add Seal methods ClearBarrierConfig and ClearRecoveryConfig.

* Handle autoseal <-> multiseal migrations.

While going between single-wrapper and multiple-wrapper autoseals are not
migrations that require an unwrap seal (such as going from shamir to autoseal),
the stored "barrier" SealConfig needs to be updated in these cases.

Specifically, the value of SealConfg.Type is "multiseal" for autoSeals that have
more than one wrapper; on the other hand, for autoseals with a single wrapper,
SealConfig.Type is the type of the wrapper.

* Remove error return value from NewAutoSeal constructor.

* Automatically rewrap partially seal wrapped values on an interval

* Add in rewrapping of partially wrapped values on an interval, regardless of seal health/status.

* Don't set SealGenerationInfo Rewrapped flag in the partial rewrap call.

* Unexport the SealGenerationInfo's Rewrapped field, add a mutex to it for thread safe access, and add accessor methods for it.

* Add a success callback to the manual seal rewrap process that updates the SealGenerationInfo's rewrapped field. This is done via a callback to avoid an import cycle in the SealRewrap code.

* Fix a failing seal wrap backend test which was broken by the unexporting of SealGenerationInfo's Rewrapped field.

* Nil check the seal rewrap success callback before calling it.

* Change SealGenerationInfo rewrapped parameter to an atomic.Bool rather than a sync.RWMutex for simplicity and performance.

* Add nil check for SealAccess before updating SealGenerationInfo rewrapped status during seal rewrap call.

* Update partial rewrap check interval from 10 seconds to 1 minute.

* Update a reference to SealGenerationInfo Rewrapped field to use new getter method.

* Fix up some data raciness in partial rewrapping.

* Account for possibly nil storage entry when retrieving partially wrapped value.

* Allow multi-wrapper autoSeals to include disabled seal wrappers.

* Restore propagation of wrapper configuration errors by setSeal.

Function setSeal is meant to propagate non KeyNotFound errors returned by calls
to configutil.ConfigureWrapper.

* Remove unused Access methods SetConfig and Type.

* Allow multi-wrapper autoSeals to include disabled seal wrappers.

Make it possible for an autoSeal that uses multiple wrappers to include disabled
wrappers that can be used to decrypt entries, but are skipped for encryption.
e an unwrapSeal when there are disabled seals.

* Fix bug with not providing name (#4580)

* add suffix to name defaults

* add comment

* only change name for disabled seal

* Only attempt to rewrap partial values when all seals are healthy.

* Only attempt to rewrap partial values when all seals are healthy.

* Change logging level from info to debug for notice about rewrap skipping based on seal health.

* Remove stale TODOs and commented out code.

---------

Co-authored-by: rculpepper <rculpepper@hashicorp.com>
Co-authored-by: Larroyo <95649169+DeLuci@users.noreply.github.com>
Co-authored-by: Scott G. Miller <smiller@hashicorp.com>
Co-authored-by: Divya Pola <87338962+divyapola5@users.noreply.github.com>
Co-authored-by: Matt Schultz <matt.schultz@hashicorp.com>
Co-authored-by: divyapola5 <divya@hashicorp.com>
Co-authored-by: Rachel Culpepper <84159930+rculpepper@users.noreply.github.com>
2023-08-24 11:40:01 -04:00
hc-github-team-secure-vault-core
7f1f54d856 Update hashicorp/vault-plugin-secrets-alicloud to v0.15.1 (#22533)
* Automated dependency upgrades

* Add changelog

---------

Co-authored-by: hc-github-team-secure-vault-ecosystem <hc-github-team-secure-vault-ecosystem@users.noreply.github.com>
2023-08-23 15:46:18 -05:00
hc-github-team-secure-vault-core
b45d944960 Update hashicorp/vault-plugin-database-snowflake to v0.9.0 (#22516)
* Automated dependency upgrades

* Add changelog

---------

Co-authored-by: hc-github-team-secure-vault-ecosystem <hc-github-team-secure-vault-ecosystem@users.noreply.github.com>
2023-08-22 21:39:09 +00:00
Alexander Scheel
b14b0aba25 Bump Go version to 1.21.0 on main (#22497)
* Bump Go version to 1.21.0

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Update to Docker v24.0.5 to fix host header issue

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

---------

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
2023-08-22 15:09:29 -04:00
Evan Gilman
1c4d3dd0c0 Bump go-plugin dep (#20966) 2023-08-22 15:21:38 +00:00
Ellie
a5b3b3d6b5 secrets/ldap: upgrade to v0.11.1 for bug fix (#22330)
* secrets/ldap: upgrade to v0.11.1 for bug fix

* add changelog
2023-08-15 08:06:52 -05:00
Tom Proctor
b07f919b7c Bump consul-template 0.32.0 -> 0.33.0 (#22322)
Also adds a test to ensure the new VAULT_CACERT_BYTES functionality works.
2023-08-14 21:31:29 +01:00
Peter Wilson
ab9f0808e0 Updated go-eventlogger to v0.2.3 (#22321) 2023-08-14 09:29:40 -04:00
hc-github-team-secure-vault-core
dfffe29492 Update hashicorp/vault-plugin-auth-azure to v0.16.0 (#22277)
Update includes dependency upgrades and WIF support
---------

Co-authored-by: hc-github-team-secure-vault-ecosystem <hc-github-team-secure-vault-ecosystem@users.noreply.github.com>
2023-08-10 14:27:20 -04:00
Violet Hynes
7e5f2cebb7 VAULT-14644 Add support for Azure WIF auth to auto-auth (for Agent and Proxy) (#22264)
* VAULT-14644 first draft of changes for WIF support

* VAULT-14644 Potentially finalize Agent work for WIF support

* VAULT-14644 finishing touches

* VAULT-14644 finishing touches

* VAULT-14644 remove extra log

* VAULT-14644 better docs

* VAULT-14644 changelog

* VAULT-14644 review feedback
2023-08-10 10:28:13 -04:00
Peter Wilson
43a3210003 Bump go-eventlogger to v0.2.2 (#22215) 2023-08-07 08:48:20 -04:00
Nick Cabatoff
8a08331212 Bump go mod versions to match those in ent (#22172) 2023-08-02 15:10:32 -04:00
Victor Rodriguez
d59ed459e0 Bump google.golang.go/protobuf dependency to v1.31.0 (#22176)
Run `make proto` to update generated files.
2023-08-02 17:19:16 +00:00
John-Michael Faircloth
bf05cfd64a awsutil: update to v0.2.3 (#21951)
* awsutil: update to v0.2.3

* add changelog
2023-07-19 19:23:42 +00:00
Nick Cabatoff
d79190808e Update oss go.mod to use same versions as ent go.mod (#21896) 2023-07-17 14:48:37 -04:00
Austin Gebauer
c2cbd5a578 auth/azure: upgrade to v0.15.1 for bug fix (#21800)
* auth/azure: upgrade to v0.15.1 for bug fix

* adds changelog
2023-07-13 10:06:51 -07:00
Kuba Wieczorek
5defa54bd4 VAULT-17592 Extract failed Go test results across runners (#21625) 2023-07-07 16:18:29 +01:00
Austin Gebauer
304ecfc8e9 secrets/azure: upgrade to v0.16.1 for bug fix (#21631)
* secrets/azure: upgrade to v0.16.1 for bug fix

* adds changelog
2023-07-06 12:57:29 -07:00
Peter Wilson
8bb9cbbeba VAULT-17772: bump go-eventlogger to v0.2.1 (#21623)
* go-eventlogger: moved to v0.2.1, allows removal of pipeline and nodes
2023-07-06 18:17:02 +01:00
Nick Cabatoff
afc8f7d5aa Prevent breakage when merging OSS changes to ENT due to missing funcs (#21564)
Add a go:generate helper called stubmaker, which generates appropriate stubs on ent based on oss stubs, but only when needed (i.e. real ent funcs haven't been added yet.)
2023-07-06 12:35:06 -04:00
mickael-hc
c6ef0800a0 update github.com/protonmail/go-crypto (#21560)
Updates the transitive dependency github.com/cloudflare/circl which will help address scanning noise related to CVE-2023-1732.

Vault is not affected by this issue as it does not use the vulnerable functionality.
2023-07-05 09:24:14 -04:00
Josh Black
17d63abdb1 bump lib/pq to 1.10.9 (#20594)
* bump lib/pq to 1.10.9

* bump jackc/pgx/v4 also
2023-06-20 13:50:24 -07:00
Austin Gebauer
7d207b7d19 Upgrade hashicorp/cap to fix OIDC provider test on 32bit (#21034) 2023-06-06 17:14:57 -07:00
Milena Zlaticanin
c02c1dad14 Update MongoDB Atlas plugin to v0.10.0 (#20882)
* Update MongoDB Atlas plugin to v0.10.0

* add changelog

* add a changelog with feature release note

* Update changelog/20882.txt

Co-authored-by: Calvin Leung Huang <1883212+calvn@users.noreply.github.com>

---------

Co-authored-by: Calvin Leung Huang <1883212+calvn@users.noreply.github.com>
2023-05-31 09:33:54 -07:00
Alexander Scheel
63ccb60b9a Transit BYOK export capabilities (#20736)
* Add WrapKey capabilities to keysutil

This allows one keysutil to wrap another key, assuming that key has an
type matching one of keysutil's allowed KeyTypes. This allows completing
the BYOK import loop with Transit, allowing imported wrapping keys to
export (wrap) other keys in transit, without having them leave in
plaintext.

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Add /byok-export/:dst/:src[/:version] to Transit

Still respecting exportable, we allow encrypted-only export of transit
keys to another cluster using the BYOK semantics.

In particular, this allows an operator to securely establish key
material between two separate Transit installations. This potentially
allows one cluster to be used as a source cluster (encrypting a large
amount of data) and a second cluster to decrypt this data later. This
might be useful in hybrid or site-specific deployments of Vault for
instance.

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Add missing dependency to sdk/, vault/

Also updates to a newer version while we're here.

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Add documentation on BYOK export

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Add tests for BYOK export/import

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Add changelog entry

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Update website/content/api-docs/secret/transit.mdx

* Update builtin/logical/transit/path_byok.go

Co-authored-by: Matt Schultz <975680+schultz-is@users.noreply.github.com>

---------

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
Co-authored-by: Matt Schultz <975680+schultz-is@users.noreply.github.com>
2023-05-30 21:42:41 +00:00
Christopher Swenson
82359a9e8f fix: upgrade vault-plugin-auth-azure to v0.15.0 (#20816) 2023-05-30 09:12:09 -07:00
Christopher Swenson
e5ae00a767 fix: upgrade vault-plugin-secrets-gcp to v0.16.0 (#20818) 2023-05-30 09:11:53 -07:00
Milena Zlaticanin
7490a2ebb7 Add support for client cert credential type (#20425)
* poc: client cert credential type

* go mod tidy

* fix typo

* fix newUserReqToProto

* add changelog

* add newline

* fix changelog

* add test for the client cert generator

* Fix formatting

* unset signing bundle URLs

* set BasicConstraintsValidForNonCA to false

* backdate cert by 30s

* remove empty creation params URLs

* check cert BasicConstraintsValid

* set default key bits in newClientCertificateGenerator

* fix client cert gen test with default values

* Add default for key_type

* fix default key_type

* update test with default key type

* update test

* Update changelog/20425.txt

Co-authored-by: Austin Gebauer <34121980+austingebauer@users.noreply.github.com>

* set default key bits and sig bits

* remove the default for key type ad fix the test

* make fmt + add comments for each exported field

* restart test

---------

Co-authored-by: Austin Gebauer <agebauer@hashicorp.com>
Co-authored-by: Austin Gebauer <34121980+austingebauer@users.noreply.github.com>
2023-05-30 09:11:02 -07:00
Max Coulombe
681ae20fac Updated snowflake plugin to v0.8.0 (#20807)
* updated snowflake plugin to v0.8.0
2023-05-26 09:48:25 -04:00
Violet Hynes
8f9bcaf97d Update SDK and API for 1.14 release (#20808) 2023-05-26 09:34:58 -04:00
John-Michael Faircloth
71de665fd6 update secrets/kubernetes and auth/kubernetes plugin versions (#20802)
* update secrets/kubernetes and auth/kubernetes plugin versions

* add changelog
2023-05-25 18:54:45 -05:00
Christopher Swenson
2957b1edf1 fix: upgrade vault-plugin-auth-jwt to v0.16.0 (#20799) 2023-05-25 14:59:17 -07:00
Alexander Scheel
b8082f5234 sdk/helper/nonce -> go-secure-stdlib/nonceutil (#20737)
Depends on https://github.com/hashicorp/go-secure-stdlib/pull/73

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
2023-05-25 20:57:08 +00:00
vinay-gopalan
bea964cb5d upgrade vault-plugin-secrets-alicloud to v0.15.0 (#20787) 2023-05-25 10:34:48 -07:00
Robert
94e31c4667 auth/kerberos: upgrade plugin version (#20771)
* Upgrade vault-plugin-auth-kerberos to v0.10.0
2023-05-25 17:29:42 +00:00
Robert
8e0a615533 database/redis: upgrade plugin version (#20763)
* Upgrade vault-plugin-database-redis to v0.2.1
2023-05-25 17:25:18 +00:00
Raymond Ho
092f6b2bba fix: upgrade vault-plugin-auth-cf to v0.15.0 (#20785) 2023-05-25 17:10:51 +00:00
Robert
3f226edfc8 database/elasticsearch: upgrade plugin version (#20767)
* Upgrade vault-plugin-database-elasticsearch to v0.13.2
2023-05-25 17:09:41 +00:00
vinay-gopalan
e336bb4a19 upgrade vault-plugin-auth-alicloud to v0.15.0 (#20758) 2023-05-25 09:56:48 -07:00
Raymond Ho
4add914081 fix: upgrade vault-plugin-secrets-terraform to v0.7.1 (#20748) 2023-05-25 16:47:08 +00:00
Robert
45345e9dcb secrets/gcpkms: upgrade plugin version (#20784)
* Upgrade vault-plugin-secrets-gcpkms to v0.15.0
2023-05-25 16:39:00 +00:00
Christopher Swenson
3690f784ac fix: upgrade vault-plugin-database-couchbase to v0.9.2 (#20764) 2023-05-25 09:17:36 -07:00