Skip to content

Commit

Permalink
backport of commit 12bce35 (#15896)
Browse files Browse the repository at this point in the history
Co-authored-by: Hridoy Roy <[email protected]>
  • Loading branch information
hc-github-team-secure-vault-core and Hridoy Roy authored Jun 9, 2022
1 parent 548baed commit b3a2b78
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions changelog/15879.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
core: Limit SSCT WAL checks on perf standbys to raft backends only
```
6 changes: 6 additions & 0 deletions vault/request_handling.go
Original file line number Diff line number Diff line change
Expand Up @@ -1941,6 +1941,12 @@ func (c *Core) checkSSCTokenInternal(ctx context.Context, token string, isPerfSt
if err != nil {
return "", err
}

// Disregard SSCT on perf-standbys for non-raft storage
if c.perfStandby && c.getRaftBackend() == nil {
return plainToken.Random, nil
}

ep := int(plainToken.IndexEpoch)
if ep < c.tokenStore.GetSSCTokensGenerationCounter() {
return plainToken.Random, nil
Expand Down

0 comments on commit b3a2b78

Please sign in to comment.