Re: CF Login using configure.json file - never expire ?

Vinod Singh <vinoddandy@...>

Thanks, Dies Koper for prompt response!

It is really helpful :-)


On Sun, Jan 1, 2017 at 2:56 AM, Koper, Dies <diesk(a)>

Hi Vinod,

Your access and refresh tokens are stored in config.json.

Tokens are issued by UAA, there’s nothing you can do in config.json to
prevent them from expiring.

The cf CLI does however, since the latest release, support a way to
specify a custom client id and secret, and configure those with your
refresh token.

You can associate a client id with tokens that have a very long expiry

Check out the instructions here:

One use case for this is to use that in a CI environment, instead of
hard-coding your username and password in a script.


Dies Koper
Cloud Foundry Product Manager - CLI

*From:* Vinod Singh [mailto:vinoddandy(a)]
*Sent:* Sunday, January 01, 2017 7:43 PM
*To:* Discussions about Cloud Foundry projects and the system overall.
*Subject:* [cf-dev] CF Login using configure.json file - never expire ?


After successful login to Cloud Foundry, all credentials with org/space
details are stored in user's home directory/.cf/configure.json file.

Question - Is it possible to update this congigure.json file manually so
that my login to cloud foundry never expire ? I know it does not sound
reasonable from security perspective but I would like to do it from from my
Mac machine.

Currently everytime I have to run this script to login:
cf api
cf login -u vks(a) -p xxxxx -o Org -s Space

Any pointer please.



Join { to automatically receive all group messages.