ARTIFACTORY: How to refresh the Conan CLI access token

ARTIFACTORY: How to refresh the Conan CLI access token

AuthorFullName__c
Roja R M
articleNumber
000005833
ft:sourceType
Salesforce
FirstPublishedDate
2023-07-30T08:05:00Z
lastModifiedDate
2023-08-03T09:02:35Z
VersionNumber
4

By default the Conan CLI access token has been set to one-month expiry by design and we will not be able to refresh. In order to overcome this behavior, we can update the Artifactory configuration using the below steps.

  1. Navigate to $JFROG_HOME/artifactory/var/etc/artifactory/ and add the below properties in the artifactory.system.properties file. 
    artifactory.artifactory.tokens.expiration.timeSecs = 31536000
    Note:- Here we are mentioning the value in seconds and the above value is for 1 year.
  2. Save the file and restart the Artifactory server. If your server on HA, we will need to perform a rolling restart of nodes . Perform a login to the newly created conan repository. 
      > conan user -p <password> -r vj-conan1 admin            Changed user of remote 'vj-conan1' from 'None'            (anonymous) to 'admin'

In the below screenshot, the token is being generated for 1 year after performing a login.

User-added image

Disclaimer: It is not recommended to increase the token expiry time as it might lead to an uncertain security issue rather you can create new tokens.