Note
This parameter is available starting with V4.6.0.
Overview
Oauth2 tokens have an expiration date, so a scheduled task is used to periodically refresh them. The rest.oauth2_credential_refresh_interval parameter specifies the execution interval for this scheduled task.
Privilege requirements
Query parameters
The
systenant and all user tenants can query this parameter using theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview.Modify parameters.
Both the
systenant and user tenants can modify this parameter.
Attributes
Attribute |
Description |
|---|---|
| Parameter type | Time |
| Default Value | 10 minutes |
| Value range | [1s, 1d] |
| Modifiable | Yes, you can use the following methods to query data:ALTER SYSTEM SETStatement modification. |
| Whether to restart the OBServer node for the change to take effect | Yes, it takes effect after a restart. |
Usage instructions
Sets the periodic refresh interval for the OAuth2 cache. Setting it appropriately based on your token's expiration time can reduce cache invalidations. Reduce this value when the token has a short validity period, and increase it otherwise. It is recommended to set it to (1/3 to 1/6) of the OAuth2 token's validity period. Supported units are microseconds (us), milliseconds (ms), seconds (s), minutes (m), hours (h), and days (d). The default is seconds.
Configuration example
Set the Oauth2 cache refresh interval to 30 minutes.
obclient> ALTER SYSTEM SET rest_oauth2_credential_refresh_interval = "30m";
