When I log in to the Cloud foundry (Authenticating... {"error":"invalid_grant","error_description":"User authentication failed: unauthorized"}) - sap-cloud-platform

I am inside the SAP Business Application Studio, inside the terminal, when I put the CF login command I enter my credentials and this appears
Authenticating...
{"error":"invalid_grant","error_description":"User authentication failed: Unauthorized"}
Could you please help me

The solution on my side is to use the --sso option.
cf login --sso -a https://api.cf.us10.hana.ondemand.com
Afterwards you will be prompted to get a passcode from this url: https://login.cf.us10.hana.ondemand.com/passcode
However, for me this failed several times.
The key is to use alternative identity provider on the login screen
and enter sap.ids as provider when you already have an SAP Universal login
Sadly, this does not work when using trial version in API endpoint https://api.cf.us10-001.hana.ondemand.com . I already opened a support request.

Related

Azure "MySQL in App" An attempt was made to access a socket in a way forbidden by its access permissions

I activated “MySQL in app” on Azure and clicked the “Manage” link. A phpMyAdmin login page launches.
Login does not accept any username/password combo including what I find in MYSQLCONNECTSTR_localdb.ini.
Is there any other setup required to access the tool, or is there another tool I could use to create a new db on MySQL in App?
I found the problem. If the website has been stopped and restarted you have to first connect to the website URL from a browser.
Once you do that, the instance is running and you can connect to phpMyAdmin.
It will launch without a login screen.

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.

WSO2 IS SAML2.0 Deactivates user after single login

I downloaded WSO2 IS, took care of all the prerequisites and started it using "wso2server.bat --run" command.
It's running and I am able to configure it in Management Console as Identity Provider (SAML 2.0). I also added my app as Service Provider (SAML 2.0). SSO seems to be working - I navigate to my app, it redirects to WSO2 IS where I log in using default admin/admin. I am then redirected to assertion service in my app when I am authenticating a user. Everything great so far!
The problem is that when I close the browser (using incognito mode) and try to repeat that process and login to WSO2 IS using the same user (admin/admin) I get error message:
"Login failed! Please recheck the username and password and try again."
I also get similar message in console:
[2018-02-08 15:57:39,258] ERROR {org.wso2.carbon.identity.scim.common.listener.SCIMUserOperationListener} - Trying to login from an inactive account of user: admin
How is that possible? It looks like the second I use given user during SSO process - that account gets deactivated. I can't even login to WSO2 IS Management Console.
I did not change any configuration other than mentioned above.
I would appreciate any help.

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.

Swisscom Passeport two-step login with Cloud Foundry CLI

How can I login with the Cloud Foundry CLI to the Swisscom Application Cloud when I have activated the two-step login method (password and SMS code) in my Swisscom Passeport account?
$ cf login -a https://….appcloud.swisscom.com -u …
API endpoint: https://….appcloud.swisscom.com
Password>
Authenticating...
Credentials were rejected, please try again.
After entering my Passeport password on the command line I do receive the SMS code, however there's no possibility to enter it on the command line.
If you enable Passeport's two-factor authentication, you have to use the --sso flag and follow the instructions:
cf login -a https://api.lyra-836.appcloud.swisscom.com --sso
API endpoint: https://api.lyra-836.appcloud.swisscom.com
One Time Code ( Get one at https://login.lyra-836.appcloud.swisscom.com/passcode )>
Switching to the browser and obtaining an OTP is needed because the cf cli does not support two-step auth directly on the cli yet.
We will add this info to the official documentation.
Because lots of users have problems to login to iAPC (internal Application Cloud) I post here the steps. For external users this API endpoint is not reachable, you need to be in Corproot network (with proxy configured).
unset https_proxy http_proxy HTTP_PROXY HTTPS_PROXY
cf login -a https://api.scapp-console.swisscom.com --sso
API endpoint: https://api.scapp-console.swisscom.com
One Time Code ( Get one at https://login.scapp-console.swisscom.com/passcode )>
Authenticating...
OK
Select an org (or press enter to skip):
(...)
Select a space (or press enter to skip):
(...)
Space> test
Targeted space Test
API endpoint: https://api.scapp-console.swisscom.com (API version: 2.92.0)
User: xxx.xxx#swisscom.com
Org: xxx
Space: xxx
A screenshot how the One Time Code looks like (you need to copy and paste into CF CLI)
This CF installation is connected to Corproot domain. You need to use your Corproot credentials (the same you use for your Desktop).
This how to error (Credentials were rejected, please try again) looks if you are doing it wrong:
cf push
FAILED
Not logged in. Use 'cf login' to log in.
cf login
API endpoint: https://api.scapp-console.swisscom.com
Email> xxx.xxx#swisscom.com
Password>
Authenticating...
Credentials were rejected, please try again