2

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

  • I tried apikey generated at https://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=&password=? where do I get this ??>&uaa_client_id=cf&uaa_client_secret=" http://iam.ng.bluemix.net/oidc/token" – Amit Joglekar Jun 07 '17 at 18:58
  • This is the bluemix documentation I am referring to: https://console.ng.bluemix.net/docs/containers/cs_cli_install.html#cs_api – Amit Joglekar Jun 07 '17 at 19:01

1 Answers1

2

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

Paul Webster
  • 10,614
  • 1
  • 25
  • 32