Search code examples
oauth-2.0stackdrivergoogle-cloud-stackdrivergoogle-cloud-monitoring

Stackdriver login redirect loop


I can't login to Stackdriver from the Google Cloud Console because of a login page redirect loop.

Here is the complete http request flow:

Request 3 and 9 are the login page of Stackdriver if presents me with ony the stackdriver logo and a single link with the text Log in with Google. I've tried to restart the browser (Firefox) and clearing all caches and site data, with no change in behavior.


Solution

  • After some investigation, I figured out various causes for this case:

    -1-

    According to the documentation,

    Stackdriver Monitoring relies on cookies from various Google sites to manage Workspaces. If these cookies are blocked, you may find that you get stuck in an endless authentication loop. Cookies can be blocked accidentally, or by automatic updates pushed out as part of changes in security policy at your location.

    Solution:

    -You must have third-party cookies enabled for the following:

    google.com

    accounts.google.com

    apis.google.com

    -Thus, after having cleared and enabled your browser cookies, make sure that they are not blocked, as for example by any extension like PrivacyBadger.

    -2-

    If you are logged into the browser with more than 1 account, it may cause a redirection behavior.

    Solution:

    -Try logging in from “Incognito mode”, or even a different browser to configure if the issue persists.

    -Disable all your extensions and try again.

    -3-

    An update from the browser might interfere with the logging process in your browser.

    Solution(same as the 2nd):

    -Try logging in from “Incognito mode”, or even a different browser to configure if the issue persists.

    -4-

    If the version of the installed Stackdriver build is on Beta, then you might get this issue.

    Solution:

    -Uninstall Beta version and install a non-beta version of Stackdriver.

    -5-

    If nothing of the above works, please change your network and/or device and try again.


    Additionally, during my research I came across few Feature Requests regarding the “Stackdriver Redirection Loop Issue”.

    1-Allow the use of Google Cloud products without having cross-site tracking enabled.

    2-Login loop attempting to access Stackdriver by using default settings of Firefox.

    As soon as we can determine the cause, you can “star” the corresponding(one or more) Feature Request, so that it gets more visibility and also you may attach your email on the CC field, in order to get notified on any updates of the FR.

    Clarification questions:

    • Were you able to login successfully to Stackdriver Monitoring before this issue occurred?