Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Certificate caching issue with 2.0.2? #1033

Closed
cmcfadden opened this issue Aug 16, 2016 · 5 comments
Closed

Certificate caching issue with 2.0.2? #1033

cmcfadden opened this issue Aug 16, 2016 · 5 comments
Assignees
Labels
type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@cmcfadden
Copy link

I'm using 2.0.2 (installed via composer) and am finding that if you don't manually remove /tmp/stash each day, auth fails during verifyIdToken(). I'm not sure what's up - the cache items aren't due for expiration, so it's not just a failure to purge. Anyone else seeing this?

@bshaffer
Copy link
Contributor

@cmcfadden This is interesting, I take it you've installed the tedivm/stash dependency to use the File cache?

@cmcfadden
Copy link
Author

Yeah, I'm running against the current master head for tedivm/stash (6aec97c9cc413223136e5f62dd200cf5eb932d1b)

@cmcfadden
Copy link
Author

It's definitely odd - here are a few more clues. What's happening is the JWT->verify function is failing for all of the available certs in the cases where it fails. However, it's more sporadic than I first realized. If I repeatedly try to auth, I'll get a mix of successes and failures.

Disabling the cache in Verify.php (commenting out the cache fetch in getFederatedSignOnCerts) seems to resolve it consistently - I haven't made it fail ever with that disabled. Unfortunately it doesn't look like it's possible to disable caching entirely if I've got stash loaded for other uses in the app (without modifying verify.php).

Very odd.

@cmcfadden
Copy link
Author

One more note - if I just curl the URL for certs, I get back different results pretty consistently - sometimes three certs, sometimes four, and different results for different hosts. Is there somewhere that explains what to expect from that from google?

@jaredk2g
Copy link

I'm running into similar issues on 2.0.3. What happens is that verifyIdToken() works and then after the next day or so it stops working. Each time I've been able to get it working again by clearing out the certificates cache. I'm using symfony/cache, which is PSR-6 compatible, instead of using tedvim/stash.

@michaelbausor michaelbausor added auth type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Feb 28, 2017
redcapital added a commit to redcapital/google-api-php-client that referenced this issue Oct 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

4 participants