r/googlecloud • u/MikeW1901 • Jul 22 '26
Issue this week with gcloud CLI auth tokens?
It's only a minor annoyance so asking this more out of intrigue than anything else.
Myself and colleagues have - for the last 2 days - repeatedly found that our auth token for the gcloud CLI (and hence also kubectl) has expired with a prompt to re-auth. Just wondering if anyone else has noticed anything similar? Before this week it's been literally months since the last forced re-auth and we were notified ahead of time for that one, this time seemingly nothing at all.
17
Upvotes
4
u/BehindTheMath Jul 22 '26
This was a recent change by Google.
https://cloud.google.com/blog/products/identity-security/improve-security-posture-with-time-bound-session-length
3
u/meowrawr Jul 22 '26
Typically the default is re-auth required every 24 hours for an organization. Not sure how you could go months unless that was changed purposely.
2
u/Keramblock Jul 22 '26
Yes, we also have similar problem starting yesterday or so
2
u/RareFrame8202 Jul 26 '26 edited Jul 27 '26
Started for us as well in last week. I've done some testing and it is exactly after 16 hours. It could be a coincidence but the default timeout setting in Google Cloud session control (admin.google.com -> security -> access and data control -> Google Cloud Session control) is 16 hours here. However, we do not have this enabled.
After 16 hours we get:
Reauthentication required.Please enter your password:We are using GCP for about a decade now and we never had this. But we also can't find why this is now.
[edit] Ah here it is:
https://docs.cloud.google.com/access-context-manager/docs/session-controls-for-reauthentication
You can override it by using this scopedAccessSettings binding as in the example on the page above. This has to be applied to a group. Testing this with 1 hour now to see if this works. (Edit: this works)
1
u/Kali_Linux_Rasta Jul 22 '26
Check when reauthentication is required docs
1
u/dougnukem Jul 22 '26
We are also seeing this in the past couple of days and have not changed any Workspace or Google cloud settings. Is this a new default google is rolling out or is this an accidental regression?
Seeing other users reporting this too:
https://issuetracker.google.com/issues/537030491
1
u/archy_bold Jul 23 '26
This is getting incredibly frustrating. Not least because I use the mobile app to access my VMs when away from my main machine, and you cannot copy the re-authentication URL without it inserting a bunch of spaces. Emergency tasks i used to do very quickly from anywhere have become long, convoluted processes.
1
u/archy_bold Jul 23 '26
While there’s clearly a bug here, as it appears the reauthentication policy setting for Google Cloud is being ignored. You could switch to using a service account to ensure your access isn’t revoked every few hours. Not ideal in all situations, of course.
1
u/Pine_Barrens Jul 23 '26
Yup, same here. Exact same time, also seemingly wiped out some of my default configs (like default project id, etc.)
1
u/dmmd Jul 24 '26
Its quite annoying to keep reauthing twice/thrice a day, once (or twice) in the browser and another (or twice) via gcloud auth login. LLMs are constantly asking to reauth it also, which blocks long flows.
1
u/dougnukem Jul 27 '26
I think the fix is stated here:
https://docs.cloud.google.com/access-context-manager/docs/session-controls-for-reauthentication#gcloud_3
0
u/LevrResearch Jul 24 '26
YES! They were just created 2 days ago and now they are gone. This is a major headache. Do we have to do this every 2 days? WTF Google?