Does the X-Auth-Token expires?

Asked by Nick Fytros on 2014-01-09

I used: curl -v -H 'X-Storage-User: test:tester' -H 'X-Storage-Pass: testing'
and i got an answer with the X-Auth-Token and X-Storage-Url .
I can create meta and containers etc.
When i tried to list my account metadata after 2 days with the command:
 curl -v -H 'X-Storage-User: iot:ioter' -H 'X-Storage-Pass: iot'
i responded with 401 unauthorized. My X-Auth-Token from above was not valid anymore and i had to run:
 curl -v -H 'X-Storage-User: test:tester' -H 'X-Storage-Pass: testing' again to get a new one.
Is this normal?
Also i cannot create any other account with: curl -v -H 'X-Storage-User: test1:tester1' -H 'X-Storage-Pass: testing1' .
Only the test:tester with pass testing. Everything else i put returns 401 unauthorized.


Question information

English Edit question
OpenStack Object Storage (swift) Edit question
No assignee Edit question
Solved by:
Last query:
Last reply:
Samuel Merritt (torgomatic) said : #1

Token expiration depends on the auth system. It looks like you're using tempauth here, and tempauth tokens expire after 1 day (by default; it's configurable).

Nick Fytros (fitros16) said : #2

Ok, got it. Will read more for tempauth then but can you tell me where can i configure that? At the proxy-server.conf?

Best NMarcos (nelsonmarcos) said : #3

Hi Nick!

Reading the file I found this line:
        self.token_life = int(conf.get('token_life', 86400))

The second parametrs looks like
86400 / 3600 = 24 hours

I'm almost sure you just have to change this value.

Nick Fytros (fitros16) said : #4

Thank you very much. It worked!