ARTIFACTORY: How to fix "Missing identity field in config" while converting s3 to s3-storage-v3 template in binarystore.xml

ARTIFACTORY: How to fix "Missing identity field in config" while converting s3 to s3-storage-v3 template in binarystore.xml

AuthorFullName__c
David Shin
articleNumber
000006043
ft:sourceType
Salesforce
FirstPublishedDate
2024-03-05T08:47:48Z
lastModifiedDate
2024-03-05
VersionNumber
2

When attempting to start Artifactory after converting to the s3-storage-v3 template, you might encounter the following error:

[Time_Stamp] [jfrt ] [ERROR] [f9e72c98abfab815] [ctoryContextConfigListener:126] [art-init ] - Application could not be initialized: Missing identity field in config.

This error is triggered if the binarystore.xml file uses the <roleName> tag, indicating that IAM Role is utilized for the authentication mechanism in the s3-storage-v3 template.
For instance, the configuration might look like this:

<config version="2">
    <chain template="s3-storage-v3"/>
    <provider id="s3-storage-v3" type="s3-storage-v3">
        <endpoint>http://s3.amazonaws.com</endpoint>
        <roleName>[Role Name] </roleName>
        <path>[ENTER PATH HERE]</path>
        <bucketName>[ENTER BUCKET NAME HERE]</bucketName>
    </provider>
</config>

As you are aware, the s3-storage-v3 template supports two authentication methods:
  • Basic credentials - these require the identity and credential parameters, as shown in the table below.
  • Default Amazon Provider Chain credentials - this method employs a default Amazon Provider chain that searches for credentials in the following order:
  1. System property-based credentials
  2. Credentials profiles file
  3. Credentials delivered through the Amazon ECS container service
  4. Instance profile credentials delivered through the Amazon ECS metadata service
To utilize IAM Role, you should select the "Credentials delivered through the Amazon ECS container service" method, which corresponds to the number 3 bullet in the Default Amazon Provider Chain credentials.
To achieve this, set the <useInstanceCredentials>true</useInstanceCredentials> as follows:
<config version="2">
    <chain template="s3-storage-v3"/>
    <provider id="s3-storage-v3" type="s3-storage-v3">
        <endpoint>http://s3.amazonaws.com</endpoint>
        <path>[ENTER PATH HERE]</path>
        <bucketName>[ENTER BUCKET NAME HERE]</bucketName>
        <useInstanceCredentials>true</useInstanceCredentials>
    </provider>
</config>
Detailed information can be found here

By following these steps, you can resolve the startup issue in Artifactory after converting s3 to the s3-storage-v3 template.