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:
- System property-based credentials
- Credentials profiles file
- Credentials delivered through the Amazon ECS container service
- Instance profile credentials delivered through the Amazon ECS metadata service
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.