Skip to content

Commit

Permalink
fix(hatchery): remove model data from worker jwt token
Browse files Browse the repository at this point in the history
  • Loading branch information
richardlt committed Jan 17, 2020
1 parent 40b5a94 commit 1cccf32
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sdk/hatchery/worker_token.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ func NewWorkerToken(hatcheryName string, privateKey *rsa.PrivateKey, expiration
},
}

// FIXME create dedicated struct with only required fields for the token
claims.Worker.Model = nil

jwtoken := jwt.NewWithClaims(jwt.SigningMethodRS512, claims)
signedJWToken, err := jwtoken.SignedString(privateKey)
if err != nil {
Expand Down

0 comments on commit 1cccf32

Please sign in to comment.