#Recovering expired token

8 messages · Page 1 of 1 (latest)

pine chasm
#

Hey y'all, we have a PAT that expired today and blocks a lot of important CI pipelines. The colleague is sick. I found the token via the gitlab rails token and found the docs for extending a token's expiry date. Can I also recover an expired token from the rails console? It wasn't mentioned in the aforementioned docs

pine chasm
#

oh well, I ended up creating a new token and updating the CI pipelines... wasn't as bad as I expected
Would be cruious to know if this would work tho

feral mango
#

@safe tartan Can you answer this?

safe tartan
#

I don't know the answer i'm afraid

jade summit
#

You should be able to just update the expires_at field of the relevant record

pine chasm
#

Oh it's that easy??

#

I was worried it would mess with relations to other tables or something. Especially since the docs on how to extend the expiry on existing tokes was documented but not recovering expired ones

jade summit
#

A token is the same as an expired token. The only difference is, that the expires_at field has a date that is in the past. So you can use the same documentation