gcloud auth login localhost redirect failed - gcloud

Tried to use "gcloud auth login" and got this error.
gcloud auth login error msg
and browser shows localhost:8085 can't be connected.

Clear browsers cache and re-try, it should work. I had same issue. It worked after browsers cache clear.

Related

Keycloak login page says "Page not found"?

I downloaded the latest Keycloak (17.0.0), start it with kc.bat start-dev and when I open localhost:8080 it redirects to localhost:8080/auth and this page is shown:
I can't make it work and get the page I get when I start the Keycloak standalone version 12...
Thanks in advance
the admin authentification in keycloak 17 is localhost:8080 without /auth
you should run kc.bat start-dev on your cmd after check this url it worked for me.
if it doesn't work try to re-run your cmd
In my case, I've tried to use keycloak 16 that has a login page at http://localhost:8080/auth. Then I've migrated to keycloak 20 that has a login page at http://localhost:8080/.
The browser has cached http://localhost:8080/auth and redirected me to this address every time I've tried to open http://localhost:8080/, so I've received "Page not found" error. I've tried to open login page in anonymous tab and it worked as expected.
To sum up, make sure to clear browser cache after migrating to keycloak 17+.
Try clearing your browser's cache and cookies and then try accessing the Keycloak URL again

gcloud, how do I grant appropriate permission to enable sqladmin?

I am doing the tutorial at https://cloud.google.com/python/django/flexible-environment
After authenticating with the command gcloud auth application-default login, I run the command to enable sql in the project gcloud auth applicatoin-default login, returning the error ERROR: (gcloud.services.enable) PERMISSION_DENIED: The caller does not have permission.
How do I fix this? I tried creating a service account with cloudsql permissions but it doesn't work, or I don't know how to make it work.
I solved this by scouring through other google tutorials, and by reauthenticating and setting the active project with the gcloud command. Thanks!

Cannot find Openshift 3 login details for Eclipse with JBoss tools

Openshift gives a login command for oc upon clicking copy login command but Eclipse asks for a server url and a token.
I tried putting server url and token from the copied command but it shows login error.
It shows "The server type, credentials, or auth scheme might be incorrect."
Openshift login
Where can I find these details for login?
Please help me login to openshift using eclipse.
if you look at what "Copy Login Command" in the Web-UI for OpenShift gives you you'll see something similar to this:
oc login https://192.168.64.39:8443 --token=XXXXXXXXXXXXXXXXXXXXXXXX
There are all informations that you need to connect via Eclipse. You have the server url https://192.168.64.39:8443 and the token that you can give Eclipse when switching the authentication to OAuth.

How can I use gcloud auth?

I am trying to follow the tutorial of python with google cloud sql.
When I run: ./cloud_sql_proxy -instances="My-connection-name"=tcp:3306, I get google: could not find default credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information..
Also, when I run: gcloud auth application-default login, I get www.googleapis.com%2Fauth%2Fcloud-platform&access_type=offline" doesn’t understand the “open location” message. (-1708)
I followed downloaded the json file for the credintials and set the enviromnet virable GOOGLE_APPLICATION_CREDENTIALS to link to the json file, but I still get the same error.
TL;DR - You can ignore the doesn’t understand the “open location” message. (-1708) error. You should see a browser window/tab opening with the URL, if not you can follow the steps I've added below where you can manually copy-paste the URL in the browser and you should not be seeing any warnings/errors.
You will need to authorize gcloud (one-time step) to use your account credentials for Google Cloud API calls.
Run gcloud auth application-default login --no-launch-browser
You will be provided a URL. Open the URL in the browser, authorize the application using your Google account and you will be provided a verification code in the page.
Copy the verification code and paste it back in the terminal where you ran the gcloud command in Step 1.
Now gcloud as well as any Google Cloud Client libraries you use can make use of the Application Default Credentials from that machine.

Keycloak 1.9.1.Final- failed verification of token: Token is not active

I'm trying to connect a Spring App Keycloak, but I get this error:
After I enter to my app, and I was redirected to Keycloak for authentication, I receive an error in my browser:
192.168.1.66 redirected you too many times.
Full url
URL: http://192.168.1.66:9092/keycloak-sp-example/sso/login?state=139%2F1ed115fb-4d4f-468c-9a72-845f9cfa9cdb&code=PVGhg5X28G8fjNt36tMGHTJIP7CQdHOhoK4XhPgUh3E.2d885db5-5c4f-43b1-9095-305494718a97
And, in the console, I got:
ERROR org.keycloak.adapters.OAuthRequestAuthenticator - failed verification of token: Token is not active.
It's a bug? Or is anything that I should configure in the console?
I found the problem, I was testing the product in a virtual machine without the correct time zone configured.
Try to sync the server timing of Keycloak and application server or else increase the access token life span which is not recommended.