SyncGTS provides a client API for programmatically syncing with the trust fabric, this allows developers to integrate SyncGTS into applications and other software projects. In this guide we will provide example code for syncing with the trust fabric programmatically.
SyncGTS is configured through an XML configuration file herein referred to as the Sync Description. The default Sync Description file can be found in SYNC_GTS_HOME/ext/resource/sync-description.xml. SyncGTS is pre-configured to work with the Target Grid you specified during installation and in most cases does not need to be modified.
In order for SyncGTS to sync with a GTS service, it is required that the local environment trust the GTS service being synced with. In other words Globus must trust the certificate authority that issued the GTS Service's credentials. Globus can configured to trust a certificate authority by placing a copy of the certificate authority's certificate in the directory USER_HOME/.globus/certificates. The file copied must be in PEM format and have a .[0-9] extension. For example if you CA's certificate is name cacert.pem, then is must be copied to USER_HOME/.globus/certificates as cacert.0 .
SyncGTS is pre-configured to trust the Trust Fabric Certificate Authoirty of the Target Grid you specified during installation. The default trust roots are contained in the directory, SYNC_GTS_HOME/ext/resources/certificates. If the GTS you are syncing with has credentials issued by one of the default trust roots you MUST copy the contents of SYNC_GTS_HOME/ext/resources/certificates to USER_HOME/.globus/certificates.
The example code below syncs with the trust fabric once using a specified SyncDescription:
The example code below syncs with the trust fabric repeatedly in the background using a specified SyncDescription: