Some questions about tokens - lifespan and uniqueness.

2593
3
12-12-2014 02:41 PM
SamJenkins1
New Contributor III

Is the expiry date of a token encoded in the token itself? I'd like to make a single very long-lived token (say a year), then shut the lifespan of my tokens back down (to say, a week). Will this invalidate the long-lived token?

Do tokens remain active until their expiry date, if I create a token with the same credentials, or will the earlier token become invalidated?

Can I cancel a token?

Can I get a list of active tokens? Inactive ones?

Thanks for your help.

Cheers

Sam

3 Replies
DanPatterson_Retired
MVP Emeritus

Sam   You may want to edit your post and "Move" it to an appropriate Place or Space so that you will get your target audience...otherwise you will get answers out of context ie subway tokens don't expire

RebeccaStrauch__GISP
MVP Emeritus

Sam, I can't answer all your questions re: changing the length, but I do know how you can "cancel" or deactivate tokens.  However, it will break ALL that were generated for that server. 

It can be reversed if you decide that isn't what you want to do (as long as you keep a copy as I mention in step 2), but also reverses for ALL of the tokens.  (I did this on 10.2.2 and should work on 10.3 ...but can't guarantee prior)

  1. Login to your ArcGIS Server Manager  http://localhost:6080/arcgis/manager
  2. Go to Security, then edit the Token Settings. ---> I recommend keeping a copy of the Shared Key in notepad or a txt file, in case you need to reverse what you are about to do <---
  3. if you change the Shared Key at all, all tokens based off the original key will break (probably need to restart the service).    For testing....just add or delete on character on the end...that will make it easier to restore if it doesn't work  .....btw, I recommend not testing on a production machine, if you have a choice.
  4. If you need to reverse this, use the original (saved) Shared Key.

On a related note, I know I was working on getting tokens to work about 6 months ago, and frustrated because in the creation dialog box I would give them a long life, and they were working.....next day or so, they weren't.  At least in 10.2.2, the shorter default value in the Edit Token Settings was overriding the value I was using when creating the token....and thus they were expiring before I expected.  Once we realized that (I was working with tech support) things worked better.

I'll be interested if someone else can answer the rest of the questions.

0 Kudos
SamJenkins1
New Contributor III

Thanks Rebecca,

I have a small enough number of long-lived tokens that changing the shared key would be an easy fix.

0 Kudos