0
votes

I need to know how to change the duration of an access_token on Snowflake? By default is 600 seconds.

https://docs.snowflake.com/en/sql-reference/sql/create-security-integration.html

Thank you, Daniela

1

1 Answers

0
votes

You can change the duration of an access_token with the parameter OAUTH_REFRESH_TOKEN_VALIDITY = <integer>.

Note: This only works if you set the parameter OAUTH_ISSUE_REFRESH_TOKENS = TRUE. With OAUTH_ISSUE_REFRESH_TOKENS = FALSE your duration is always 600 seconds and cannot be changed.

Example from docs:

create security integration oauth_kp_int
  type=oauth
  enabled=true
  oauth_client = custom
  oauth_client_type='CONFIDENTIAL'
  oauth_redirect_uri='https://localhost.com'
  oauth_issue_refresh_tokens = true
  oauth_refresh_token_validity = 86400
  pre_authorized_roles_list = 'MYROLE'
  blocked_roles_list = ('SYSADMIN')
  oauth_client_rsa_public_key='
  MIIBI
  ..
  ';