mirror of
https://github.com/hashicorp/vault.git
synced 2026-02-03 20:40:45 -05:00
Load SSCT Generation Counter Upon DR Promotion [OSS] (#16956)
* port ssct bugfix to load epoch from storage * changelog * update changelog to be user-facing * change 2 to two
This commit is contained in:
parent
05997054cf
commit
d7d5c055fc
2 changed files with 6 additions and 0 deletions
3
changelog/16956.txt
Normal file
3
changelog/16956.txt
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
```release-note:bug
|
||||
core: Prevent two or more DR failovers from invalidating SSCT tokens generated on the previous primaries.
|
||||
```
|
||||
|
|
@ -38,6 +38,9 @@ func (ts *TokenStore) loadSSCTokensGenerationCounter(ctx context.Context) error
|
|||
}
|
||||
|
||||
func (ts *TokenStore) UpdateSSCTokensGenerationCounter(ctx context.Context) error {
|
||||
if err := ts.loadSSCTokensGenerationCounter(ctx); err != nil {
|
||||
return err
|
||||
}
|
||||
ts.sscTokensGenerationCounter.Counter += 1
|
||||
if ts.sscTokensGenerationCounter.Counter <= 0 {
|
||||
// Don't store the 0 value
|
||||
|
|
|
|||
Loading…
Reference in a new issue