Does SQ server cache tokens?

Last year I asked about the SQ server interacting with AD (Do revoked tokens persist in SonarQube?). I have a followup question as we’re trying to diagnose some network issues.

Basically, the previous discussion told me that the server goes to AD whenever it needs to authenticate using AD creds sent to it (i.e., does not cache AD creds). The recommendation was to use tokens whenever possible.

So presumably these are stored in the SQ server’s database. Does the server try to cache them for speed? I realize that pretty much anything you ask SQ for will require going off to the DB, which in our case is on a separate server. But does it try to save going to the DB just to authenticate a token by caching tokens, at least short-term?

Hi,

Yes, SQ tokens are stored in the SQ DB (until revocation, as previously established). There is no local caching. SonarQube and its DB are supposed to be close to each other on the network.

 
Ann

Thanks! That’ll help us isolate networking issues. So when using a token is fast, but using LDAP is slow, I can take that to infer that SQ’s connection to its DB is fine while its connection to the LDAP server (or the LDAP server itself) is the problem.

1 Like