• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pomerium / pomerium / 23688008115
52%

Build:
DEFAULT BRANCH: main
Ran 28 Mar 2026 03:25PM UTC
Jobs 1
Files 688
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

28 Mar 2026 03:11PM UTC coverage: 45.464% (+0.004%) from 45.46%
23688008115

push

github

web-flow
authenticate: fix Handle.WithNewIssuer to preserve TTL for Exp and clear Nbf (#6212)

## Summary

- `Handle.WithNewIssuer()` cloned the handle and reset `Iat` to `Now()`
but left `Exp` and `Nbf` unchanged from the original handle
- When a stored session handle (with stale `Exp` from the original IdP
token) was reused in the stateful authenticate flow, the resulting JWT
had `iat` in the present but `exp` hours in the past
- Fix preserves the original validity duration (`exp - iat`) relative to
the new `iat`, and clears `Nbf` since the original IdP token's
not-before is meaningless after reissue

**Introducing commit:**
[`a233784ef`](https://github.com/pomerium/pomerium/commit/a233784ef)
(PR #6033, v0.32.0)
**Not affected:** v0.31.3 and earlier (old `State` type had no
`exp`/`nbf` fields)
**Scope:** Stateful auth flow only. Internal Pomerium auth was
functionally unaffected (JWS decoder does not validate `exp`; session
validity comes from databroker `Session.ExpiresAt`). External JWT
consumers that validate `exp` would reject the token.

## AI Disclosure

Claude drafted the fix and tests. Bobby reviewed, verified version
boundaries, and confirmed root cause analysis.

## Test plan

- [x] `go test -v -run TestHandle_WithNewIssuer ./pkg/grpc/session/` --
8 sub-tests covering TTL preservation, Nbf clearing, nil Exp, nil Iat,
negative duration, both nil, immutability, and basic Iss/Aud update
- [x] `go test ./pkg/grpc/session/...` -- full package passes
- [ ] CI

13 of 13 new or added lines in 1 file covered. (100.0%)

26 existing lines in 9 files now uncovered.

34807 of 76559 relevant lines covered (45.46%)

115.84 hits per line

Coverage Regressions

Lines Coverage ∆ File
7
72.3
-4.73% pkg/grpcutil/client_manager.go
4
85.78
-1.96% config/config_source.go
4
90.91
-3.64% pkg/fanout/receive.go
3
48.28
-0.54% internal/databroker/server_clustered_follower.go
2
78.66
-0.79% internal/recording/server.go
2
89.19
-5.41% pkg/fanout/fanout.go
2
85.67
-0.62% pkg/grpc/databroker/syncer.go
1
75.73
-0.26% pkg/storage/postgres/backend.go
1
75.41
0.0% pkg/storage/postgres/registry.go
Jobs
ID Job ID Ran Files Coverage
1 23688008115.1 28 Mar 2026 03:25PM UTC 688
45.46
GitHub Action Run
Source Files on build 23688008115
  • Tree
  • List 688
  • Changed 14
  • Source Changed 1
  • Coverage Changed 14
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #23688008115
  • 23024422 on github
  • Prev Build on main (#23594266292)
  • Next Build on main (#23757219346)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc