2
votes

I have a federated (corporate) id for IBM bluemix. I want non-browser access to a Bluemix client / API. I am trying to use this POST command (using curl) - POST http://iam.ng.bluemix.net/oidc/token ; but I get following error and message: "errorCode":"BXNIM0608E" "errorMessage":"You cannot authenticate with username and password, as you are a federated user"

Then I came across this post: https://developer.ibm.com/devops-services/2016/06/23/whats-federated-authentication-and-how-does-it-affect-me/

As mentioned at beginning of it, I need to use "IBM Bluemix Continuous Delivery" website (IBM Bluemix DevOps) to get the access token.

Can you please let me know where exactly on that website I can get the access token?

Regards, Amit

1
I tried apikey generated at console.ng.bluemix.net/iam/?env_id=ibm:yp:us-south#/apikeys, but that didn't work either. This is the command I am trying: "curl -X POST -H "Content-Type: application/x-www-form-urlencoded" -H "Authorization: Basic Yng6Yng=" -d "grant_type=password&response_type=cloud_iam,uaa&username=<my federated bluemix id>&password=<?? where do I get this ??>&uaa_client_id=cf&uaa_client_secret=" iam.ng.bluemix.net/oidc/token" - Amit Joglekar
This is the bluemix documentation I am referring to: console.ng.bluemix.net/docs/containers/… - Amit Joglekar

1 Answers

2
votes

It seems you need to follow the instructions for IAM at https://console.ng.bluemix.net/docs/iam/apikeys.html#manapikey

That's where you can generate your API keys. I then found instructions to use the key to login as mentioned in https://console.ng.bluemix.net/docs/cli/reference/cfcommands/index.html#cf_login

bash$ cf login -u apikey -p $API_TOKEN