Skip to content

Commit

Permalink
Merge pull request #270 from ovotech/enable-filter-in-non-rotate-mode
Browse files Browse the repository at this point in the history
Enable filter in non-rotate mode
  • Loading branch information
Chris Every authored Oct 22, 2020
2 parents c3da248 + 17c8669 commit ad6b1c4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/rotate/rotatekeys.go
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,12 @@ func filterKey(account string, config config.Config, key keys.Key) (eligible boo
//this means an overriding account has been supplied, i.e. from CLI
eligible = key.Account == account
} else if !config.RotationMode {
//rotation mode is false, so include the key so its age can be used
// rotation mode is false, we still want to filter down to specific
// service accounts if the AccountFilter has been set
if len(config.AccountFilter.Mode) > 0 {
eligible, err = isKeyEligible(config, key)
return
}
eligible = true
} else {
if eligible, err = isKeyEligible(config, key); err != nil {
Expand Down

0 comments on commit ad6b1c4

Please sign in to comment.