In this Knowledge Base article, we will be working on how we can federate the Deployed By, Deployment Date, and Modified Date for the Federated Repositories.
In the earlier versions of Artifactory before 7.90.5, the federated repositories only federates the metadata and artifacts and the deployment details were not federated. Also, in the Deployed By field the username is set to token is it was not feasible/possible to identify who deployed the file. Below is the screenshot for reference.
Therefore, in order to overcome this behavior and show the user in the target server who has deployed the artifact in the source server, we have a system property that will also federate the
Created date, Deployed by, and the Modified Date to the target instances.
Hence, helping us maintain integrity across both servers.
The property that needs to be added in the artifactory.system.properties file is mentioned below:-
In Artifactory version 7.90.5 and 7.90.6, below propert needs to be added:-
artifactory.federated.mirror.events.metadata.enabled=true
Starting from 7.90.7, the property name is changed/enhanced to below:-
artifactory.federated.mirror.events.upload.info.propagate.enabled=true
Once the property is added both in the source and target servers, we will see that in the General tab of the federated artifact, the username(the user who deployed the artifact in the source server) will be displayed along with the keyword Federated, which helps identify that particular artifact is federated one.
Below are the screenshots from the Source and Target Server.
Source Server:-
The artifact rebar3-1.x.csv is deployed by the admin user and the artifact has its own Created and last modified date.
Target Server:-
The artifact rebar3-1.x.csv is deployed by the admin but as the artifact is federated from another server the federated keyword is appended with it.
Additionally, the Created and Last Modified Date is the same for artifacts in both servers.
For more information on Federated Repositories, please refer to the below articles.