Swift Auth Token Length And Constraints

asked 2017-08-31 15:33:11 -0500

Ameer gravatar image

updated 2017-09-05 14:19:11 -0500

I'm working on a product that implements Swift object APIs with a proprietary backend for storing the data. We support different types of Openstack authentication modes v1, v2, and Keystone. I know that in the documentation (https://docs.openstack.org/swift/latest/) it says:

The token can be passed into Swift using the X-Auth-Token or the X-Storage-Token header. Both have the same format: just a simple string representing the token. Some auth systems use UUID tokens, some an MD5 hash of something unique, some use “something else” but the salient point is that the token is a string which can be sent as-is back to the auth system for validation.

I wanted to understand if for a typical Swift client:

  1. Would there be any expectation of limits, such as the token string should be only N characters long?
  2. If a client re-authenticates, is there any expectation that the client expects to the same token for the same user for a period of time?

Thanks, Ameer

edit retag flag offensive close merge delete