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


Vinod Singh <vinoddandy@...>
 

Thanks, Dies Koper for prompt response!

It is really helpful :-)

Regards,
Vinod

On Sun, Jan 1, 2017 at 2:56 AM, Koper, Dies <diesk(a)fast.au.fujitsu.com>
wrote:

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
date.

Check out the instructions here: https://github.com/
cloudfoundry/cli/issues/919#issuecomment-268699211.

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



Regards,

Dies Koper
Cloud Foundry Product Manager - CLI





*From:* Vinod Singh [mailto:vinoddandy(a)gmail.com]
*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 ?



Hi,

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 https://api.mycf.com
cf login -u vks(a)xxx.com -p xxxxx -o Org -s Space

Any pointer please.

Regards,

Vinod

Join {cf-dev@lists.cloudfoundry.org to automatically receive all group messages.