Only synthesize anonymous token in primary DC

pull/17231/head
Paul Glass 2023-05-05 15:03:03 -05:00
parent 134aac7c26
commit 1e48592aaa
1 changed files with 1 additions and 1 deletions

View File

@ -151,7 +151,7 @@ func (s *Server) ResolveIdentityFromToken(token string) (bool, structs.ACLIdenti
} else if aclToken != nil && !aclToken.IsExpired(time.Now()) {
return true, aclToken, nil
}
if aclToken == nil && token == acl.AnonymousTokenSecret {
if aclToken == nil && token == acl.AnonymousTokenSecret && s.InPrimaryDatacenter() {
// synthesize the anonymous token for early use, bootstrapping has not completed
s.insertAnonymousToken()
fallbackId := structs.ACLToken{