fix(authn): correct struct tag typo jsom -> json for Expiration in kubernetes auth claims#5908
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v2 #5908 +/- ##
==========================================
+ Coverage 59.38% 61.28% +1.90%
==========================================
Files 141 141
Lines 14208 14208
==========================================
+ Hits 8437 8707 +270
+ Misses 5035 4772 -263
+ Partials 736 729 -7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
d771a5e to
940784b
Compare
There was a problem hiding this comment.
Verdict: approve
The PR corrects a typo in a struct tag that prevented the Expiration claim from deserializing in Kubernetes JWT authentication. The change is direct, follows Go and project conventions, and is well-tested by a new unit test confirming correct behavior. No other issues found; documentation and coverage check out. Looks good — no changes requested.
🤖 Automated review by the Flipt PR review agent.
The Expiration field in the claims struct had a typo in its struct tag: jsom:"exp" → json:"exp" This caused Go's encoding/json to never unmarshal the exp field from the Kubernetes service account JWT, leaving Expiration always as 0 (Unix epoch). Downstream this causes token expiry to be treated as January 1, 1970, effectively making all SA tokens immediately expired Signed-off-by: Roman Dmytrenko <[email protected]> Co-authored-by: Koren Ben Ezri <[email protected]>
There was a problem hiding this comment.
Verdict: approve
The PR fixes a struct tag typo in Kubernetes authentication claims ('jsom' → 'json'), ensuring proper JWT deserialization for the 'exp' field. The new unit test verifies correct behavior, coverage is complete for all modified lines, and no open issues remain. Change follows Go and repo conventions.
🤖 Automated review by the Flipt PR review agent.
There was a problem hiding this comment.
Verdict: approve
This is a precise, well-tested fix for a struct tag typo that prevented the Kubernetes JWT exp claim from being unmarshaled. The new unit test directly verifies correct deserialization. No other issues found.
🤖 Automated review by the Flipt PR review agent.
The Expiration field in the claims struct had a typo in its struct tag:
This caused Go's encoding/json to never unmarshal the exp field from the Kubernetes service account JWT, leaving Expiration always as 0 (Unix epoch). Downstream this causes token expiry to be treated as January 1, 1970, effectively making all SA tokens immediately expired
Co-authored-by: Koren Ben Ezri [email protected]
closes #5906