mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-29 17:52:32 +00: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:
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
|
||||
|
||||
Reference in New Issue
Block a user