Resolution

ARTIFACTORY: How can I extract the expiration date in license key

AuthorFullName__c
David Shin
articleNumber
000005282
ft:sourceType
Salesforce
FirstPublishedDate
2022-05-22T11:18:03Z
lastModifiedDate
2024-03-10T07:44:23Z
VersionNumber
3
Aritfactory license key is encrypted by Base64.
You can use base64 --decode basically. You may use the following command to see the expiration date for each license key.
echo "license_strings_xxx" | base64 -d | grep license | cut -d: -f2 | base64 -d | grep product | cut -d: -f2 | while read -r line; do echo $line | base64 -d; done | grep expires

For HA node, of course, you can delete the expired license through UI or You can use the following REST APIs

To see the license information in HA mde,
curl -u admin localhost:8081/artifactory/api/system/licenses
{
  {
    "type" : "Enterprise Plus",
    "validThrough" : "Jun 7, 2022",
    "licensedTo" : "XXXXXX",
    "licenseHash" : "a86e7880c1b3xxxxxxxxxxxxxcec4",
    "nodeId" : "Not in use",
    "nodeUrl" : "Not in use",
    "expired" : true
  }, {
    "type" : "Enterprise Plus",
    "validThrough" : "Sep 5, 2022",
    "licensedTo" : "JFrog TEST",
    "licenseHash" : "3ae60bd20dd5cxxxxxxxxxxxxxxxxe4",
    "nodeId" : "art1",
    "nodeUrl" : "172.100.11.4:8082/artifactory",
    "expired" : false
  }
   ....
}

To delete the expired license with licenseHash;
curl -u admin -XDELETE localhost:8081/artifactory/api/system/licenses?licenseHash=a86e7880c1b3xxxxxxxxxxxxxcec4