How to set expiration time for X-Auth-Token (auth token)

asked 2020-07-31 07:45:04 -0600

dmisim gravatar image

Hi! I'm using openstack swift auth v1 Can't find any infromation about how to set expiration time for auth token. Please, help!

edit retag flag offensive close merge delete



I know about two authentication mechanisms, temp auth (not recommended for production) and Keystone. The former doesn't seem to be documented very well.

What is Swift Auth?

Bernd Bausch gravatar imageBernd Bausch ( 2020-07-31 19:51:36 -0600 )edit

Thanks, Bernd, i meant Tempauth (auth v1). Do you know how i can change token_life within the code? (python) Because, as you said, it's not well documented and all i found is just an info about default expiration time.

dmisim gravatar imagedmisim ( 2020-08-01 00:57:27 -0600 )edit

In the code? I think it's easier to just change the configuration value. Besides, when you update, code will be replaced.

In any case, grep -r token_life SWIFT_CODE_ROOT_DIRECTORY tells you where the string appears in the code, and you just modify it there.

Bernd Bausch gravatar imageBernd Bausch ( 2020-08-01 01:25:01 -0600 )edit

There is old documentation for proxy-server.conf: Still valid I think.

You can also use codesearch:

Bernd Bausch gravatar imageBernd Bausch ( 2020-08-01 01:26:34 -0600 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2020-07-31 20:07:39 -0600

updated 2020-07-31 20:07:52 -0600

To set the token expiration time, tempauth uses token_life in the proxy server config file, whereas Keystone uses expiration in keystone.conf.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2020-07-31 07:45:04 -0600

Seen: 76 times

Last updated: Jul 31 '20