mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-03 00:40:25 +02:00
authorize: remove JWT timestamp format workaround (#4321)
Update OPA to v0.54.0, which changes the JSON serialization behavior for large integers. Remove the formatting workaround and the unit test that verified that the workaround was still needed.
This commit is contained in:
parent
cd056e89db
commit
74e648630f
4 changed files with 14 additions and 39 deletions
|
@ -90,10 +90,6 @@ jwt_payload_exp = v {
|
|||
v = five_minutes
|
||||
} else = null
|
||||
|
||||
jwt_payload_exp_int = v {
|
||||
v = to_number(format_int(jwt_payload_exp, 10))
|
||||
} else = null
|
||||
|
||||
jwt_payload_iat = v {
|
||||
# sessions store the issued_at on the id_token
|
||||
v = round(session.id_token.issued_at.seconds)
|
||||
|
@ -102,10 +98,6 @@ jwt_payload_iat = v {
|
|||
v = round(session.issued_at.seconds)
|
||||
} else = null
|
||||
|
||||
jwt_payload_iat_int = v {
|
||||
v = to_number(format_int(jwt_payload_iat, 10))
|
||||
} else = null
|
||||
|
||||
jwt_payload_sub = v {
|
||||
v = session.user_id
|
||||
} else = ""
|
||||
|
@ -141,8 +133,8 @@ base_jwt_claims := [
|
|||
["iss", jwt_payload_iss],
|
||||
["aud", jwt_payload_aud],
|
||||
["jti", jwt_payload_jti],
|
||||
["exp", jwt_payload_exp_int],
|
||||
["iat", jwt_payload_iat_int],
|
||||
["exp", jwt_payload_exp],
|
||||
["iat", jwt_payload_iat],
|
||||
["sub", jwt_payload_sub],
|
||||
["user", jwt_payload_user],
|
||||
["email", jwt_payload_email],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue