Skip to content

Commit

Permalink
variables: fix access to variables for poststop tasks (#19270)
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 authored Dec 1, 2023
1 parent 48192a9 commit 5a7c4cd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .changelog/19270.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
variables: Fixed a bug where poststop tasks were not allowed access to Variables
```
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 5a7c4cd

Please sign in to comment.