Page MenuHomePhabricator

REST Gateway: use the sxp field for token expiry
Open, In Progress, Needs TriagePublic

Description

MediaWiki doesn't set the standard exp claim on the tokens in the sessionJwt cookie. Envoy will consider these tokens to be valid forever. We'll have to check the custom sxp claim manually to check if a token is expired. Expired tokens form cookies should be ignored, while expired tokens from headers should be rejected.

Event Timeline

KineticPelagic subscribed.

I am moving this task as part of my Clinic Duty rotation.

Another approach would be to ignore all tokens where the iat (issued at) field is older than some given threshold. That's robust against accidental minting of tokens with no / far future expiry.

Change #1353970 had a related patch set uploaded (by Daniel Kinzler; author: Daniel Kinzler):

[operations/deployment-charts@master] REST Gateway: add trust expiry for rlc claims.

https://gerrit.wikimedia.org/r/1353970