Forum Discussion
ST_Wong
Cirrus
Apr 19, 2018Security of credentials in iControl/REST api
Hi all,
I'm newbie to iControl. It's useful and we hope to use it in daily provisioning, probably using python. However, we've to either use username/password or X-F5-Auth-Token which is not e...
Satoshi_Toyosa1
Apr 20, 2018Ret. Employee
The default token timeout is 20 min (1200s). You can make it shorter by patch-ing the timeout field if that's what you want. The sample below changes the timeout of the to 10s.
curl -sk https://localhost/mgmt/shared/authz/tokens/ \
-H "X-F5-Auth-Token: " -H "Content-type: applicaiton/json" \
-X PATCH -d '{"timeout" : 10}'Or you can remove the token after you finish the task(s): e.g.,
curl -sk https://localhost/mgmt/shared/authz/tokens/ -H "X-F5-Auth-Token: " \
-X DELETEIf you want to avoid a hard-coded user/pass pair in your code, why don't you make it prompt?
>>> import sys
>>> user = sys.stdin.readline()
foo <<< entered
>>> print(user)
fooHelp guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
