Fix token lifetime, closes #35230 (#35271) (#35281)

Backport #35271 by @TimB87

This is an attempt to fix #35230 as discussed in the ticket.

Co-authored-by: Tim Biermann <tbier@posteo.de>
pull/35290/head
Giteabot 2025-08-15 05:52:09 +07:00 committed by GitHub
parent 136ec9ef81
commit f3e6672c09
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

@ -53,7 +53,7 @@ func CreateAuthorizationToken(taskID, runID, jobID int64) (string, error) {
claims := actionsClaims{
RegisteredClaims: jwt.RegisteredClaims{
ExpiresAt: jwt.NewNumericDate(now.Add(24 * time.Hour)),
ExpiresAt: jwt.NewNumericDate(now.Add(1*time.Hour + setting.Actions.EndlessTaskTimeout)),
NotBefore: jwt.NewNumericDate(now),
},
Scp: fmt.Sprintf("Actions.Results:%d:%d", runID, jobID),