Skip to content

Commit

Permalink
variables: fix access to variables for poststop tasks
Browse files Browse the repository at this point in the history
In the recent auth refactor, we accidentally fixed a bug where poststop tasks
would not get access to Variables. Fix this same bug for backports by ensuring
that we use client-terminal status and not server-terminal status to enforce
access.
  • Loading branch information
tgross committed Dec 1, 2023
1 parent 64abf72 commit aa322d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nomad/acl.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ func (s *Server) VerifyClaim(token string) (*structs.IdentityClaims, error) {
}

// the claims for terminal allocs are always treated as expired
if alloc.TerminalStatus() {
if alloc.ClientTerminalStatus() {
return nil, fmt.Errorf("allocation is terminal")
}

Expand Down

0 comments on commit aa322d2

Please sign in to comment.