We are using stargate rest api, which is a wrapper over DataStax Enterprise for Cassandra DB. For accessing the data in the DB, we had get a token from the stargate's auth service first. I wonder how long does this token remain active. Is there a timeline, or does it expire after certain interval of inactivity? Please suggest.
Asked
Active
Viewed 188 times
1 Answers
3
By default this token will persist for 30 minutes on a sliding window. This means that if you
create a token and then wait 29 minutes before using it to authenticate a request to any of the
APIs the time to live will be reset to 30 minutes. Likewise, if you wait 31 minutes after
creating the token to use it then you'll receive an error because the token no longer exists. The
length of time that the token persists can be configured using the stargate.auth_tokenttl
system
property. As example start up configuration that would set the tokens to persist for 100 seconds
would be as follows.
JAVA_OPTS='-Dstargate.auth_tokenttl=100' ./starctl \
--developer-mode --cluster-name test --cluster-version 3.11 --enable-auth

dwettlaufer
- 378
- 1
- 5
-
I would like to make the token to live for 14 days (=14*24*60*60) in prod. Our stargate is only accessed from internal applications. Do you think we will meet any issue because of that? – David Oct 10 '21 at 17:12
-
That should be fine. Although you might want to be careful how often your applications are creating new tokens so that the table doesn’t grow unexpectedly. – dwettlaufer Oct 11 '21 at 03:48