| From b0b42e86e834a1d02fe83f7be3663d19f6a1ee80 Mon Sep 17 00:00:00 2001 |
| From: Lorenz Brun <lorenz@monogon.tech> |
| Date: Thu, 17 Mar 2022 16:56:29 +0100 |
| Subject: [PATCH] Fix for semver breakage in go-jose |
| |
| --- |
| pkg/serviceaccount/claims.go | 4 ++-- |
| 1 file changed, 2 insertions(+), 2 deletions(-) |
| |
| diff --git a/pkg/serviceaccount/claims.go b/pkg/serviceaccount/claims.go |
| index 1e1475c779f..06620f7a420 100644 |
| --- a/pkg/serviceaccount/claims.go |
| +++ b/pkg/serviceaccount/claims.go |
| @@ -50,7 +50,7 @@ type kubernetes struct { |
| Svcacct ref `json:"serviceaccount,omitempty"` |
| Pod *ref `json:"pod,omitempty"` |
| Secret *ref `json:"secret,omitempty"` |
| - WarnAfter jwt.NumericDate `json:"warnafter,omitempty"` |
| + WarnAfter *jwt.NumericDate `json:"warnafter,omitempty"` |
| } |
| |
| type ref struct { |
| @@ -198,7 +198,7 @@ func (v *validator) Validate(ctx context.Context, _ string, public *jwt.Claims, |
| |
| // Check special 'warnafter' field for projected service account token transition. |
| warnafter := private.Kubernetes.WarnAfter |
| - if warnafter != 0 { |
| + if warnafter != nil { |
| if nowTime.After(warnafter.Time()) { |
| secondsAfterWarn := nowTime.Unix() - warnafter.Time().Unix() |
| auditInfo := fmt.Sprintf("subject: %s, seconds after warning threshold: %d", public.Subject, secondsAfterWarn) |
| -- |
| 2.25.1 |
| |