mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-16 18:47:10 +02:00
core/authorize: use uuid for jti, current time for iat and exp (#5147)
* core/authorize: use uuid for jti, current time for iat and exp * exclude the jtis * Update authorize/evaluator/headers_evaluator_test.go Co-authored-by: Kenneth Jenkins <51246568+kenjenkins@users.noreply.github.com> --------- Co-authored-by: Kenneth Jenkins <51246568+kenjenkins@users.noreply.github.com>
This commit is contained in:
parent
a7dd30ad29
commit
bf1d228131
4 changed files with 21 additions and 32 deletions
|
@ -537,7 +537,7 @@ func TestPomeriumJWT(t *testing.T) {
|
|||
|
||||
// Obtain a Pomerium attestation JWT from the /.pomerium/jwt endpoint. The
|
||||
// contents should be identical to the JWT header (except possibly the
|
||||
// timestamps). (https://github.com/pomerium/pomerium/issues/4210)
|
||||
// timestamps and the jtis). (https://github.com/pomerium/pomerium/issues/4210)
|
||||
res, err = client.Get("https://restricted-httpdetails.localhost.pomerium.io/.pomerium/jwt")
|
||||
require.NoError(t, err)
|
||||
defer res.Body.Close()
|
||||
|
@ -549,8 +549,10 @@ func TestPomeriumJWT(t *testing.T) {
|
|||
// Remove timestamps before comparing.
|
||||
delete(p, "iat")
|
||||
delete(p, "exp")
|
||||
delete(p, "jti")
|
||||
delete(p2, "iat")
|
||||
delete(p2, "exp")
|
||||
delete(p2, "jti")
|
||||
assert.Equal(t, p, p2)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue