5 Commits

Author SHA1 Message Date
Steven Clark
4389ee438d
Provide a better error message around initializing with multiple seals (#23210)
* Provide a better error message around initializing with multiple seals

 - Specifically callout during cluster initialization or initial beta
   seal migration that we can only have a single seal enabled with the
following error message:

   `Initializing a cluster or enabling multi-seal on an existing cluster must occur with a single seal before adding additional seals`

 - Handle the use case that we have multiple seals configured, but
   some are disabled, leaving a single enabled seal. This is the legacy
   seal migratation case that works without the BETA flag set, so should
   work with it set as well.

* Update the expected error messages within seal tests

* Remove support for old style migration configurations in multi-seal
2023-09-21 12:32:44 -04:00
Steven Clark
bc42d56c7a
Seal-HA: Match multiple seals using name/type only (#23203)
* Match multiple seals using name/type only

 - This fix addresses an issue that changing any seal configuration in an existing seal stanza such as the Vault token would cause negate the seal matching.
 - If this was the only seal that was previously used or slight tweaks happened to all the seals Vault would fail to start with an error of

 "must have at least one seal in common with the old generation."

 - Also add a little more output to the validation error messages about
   the current seal and configured seal information to help in
   diagnosing errors in the future

* Tweak formatting and text on method doc

* Update comment around forcing a seal rewrap
2023-09-20 16:51:52 -04:00
Divya Pola
dcb7083260
Validate seal generation info only if beta flag is enabled (#22741) 2023-09-05 13:13:43 -05:00
Divya Pola
cdf6bf0669
Add checks to see if current seal generation is in middle of rewrapping (#22692)
* Add checks to see if current seal generation is in middle of rewrapping

* Check for rewrap flag only if thr previous configuration is not shamir
2023-08-31 14:32:22 -05:00
Divya Pola
e600d43690
Add safety logic for rejecting seal configuration changes (#22582)
* Fix clone method and add new validation for same gen

* Add safety logic for rejecting seal configuration changes

* Remove ent build req for test file
2023-08-28 11:58:16 -05:00