Currently we only have Kerberos Vault and Kerberos Hub integration implemented. However we would like to embrace other 3rd party tools such as Google Drive, Storj, Minio, Dropbox and others. With this open issue, we would like to request help from our community to implement more storage/persistence providers. We'll discuss here what is required to contribute to this feature.
Supported persistence:
How to contribute
A detailed description is found below, describing the different parts that need to be added and modified. However a good PR (#96) can be found here.
Machinery (Golang/Backend/API)
Before implementing a new function make sure we know all the credentials/information that is required for creating a new provider. Have a look at the ./machinery/src/models/Config.go file, and add the additional information that you require. Also note that you'll need a new short name for your provider. For example Storj > storj or Dropbox > dropbox.
Create a new file in the machinery project: machinery/src/cloud.
Implement a single upload function with following function description. The function expects a configuration object which holds the credentials of the relevant provider, and the fileName which refers to the file that we want to upload. The return statement (bool, bool, error) defines if the upload was successful, if the file can be removed from disk (it might be that we need to try again false or we don't need to upload it anymore true), and if any error occurred.
func UploadDropbox(configuration *models.Configuration, fileName string) (bool, bool, error) {
Add a verify function, that will test if the configuration is working. This is called from the front-end by click the Verify connection button.
func VerifyDropbox(config models.Config, c *gin.Context) {
Once implemented we need to adapt the upload logic in ./machinery/src/cloud/Cloud.go. Extend the if statement and add your new function.
if config.Cloud == "s3" {
uploaded, configured, err = UploadS3(configuration, fileName)
} else if config.Cloud == "kstorage" {
uploaded, configured, err = UploadKerberosVault(configuration, fileName)
} else if config.Cloud == "dropbox" {
uploaded, configured, err = UploadDropbox(configuration, fileName)
} else if config.Cloud == "gdrive" {
// Todo: implement gdrive upload
UI (Front-end)
Open the ui/src/pages/Settings/Settings.jsx file. Most of the work is done here.
- Append the
storageTypes array with the new provider.
- Add the required input fields to use the provider.
- Provide translations in the
ui/public/locales/ folder, make sure your labels/translation is copied to all the different translation files.
Currently we only have Kerberos Vault and Kerberos Hub integration implemented. However we would like to embrace other 3rd party tools such as Google Drive, Storj, Minio, Dropbox and others. With this open issue, we would like to request help from our community to implement more storage/persistence providers. We'll discuss here what is required to contribute to this feature.
Supported persistence:
How to contribute
A detailed description is found below, describing the different parts that need to be added and modified. However a good PR (#96) can be found here.
Machinery (Golang/Backend/API)
Before implementing a new function make sure we know all the credentials/information that is required for creating a new provider. Have a look at the
./machinery/src/models/Config.gofile, and add the additional information that you require. Also note that you'll need a newshort namefor your provider. For exampleStorj>storjorDropbox>dropbox.Create a new file in the
machineryproject:machinery/src/cloud.Implement a single upload function with following
functiondescription. The function expects aconfigurationobject which holds the credentials of the relevant provider, and thefileNamewhich refers to the file that we want to upload. The return statement(bool, bool, error)defines if the upload was successful, if the file can be removed from disk (it might be that we need to try againfalseor we don't need to upload it anymoretrue), and if any error occurred.Add a verify function, that will test if the configuration is working. This is called from the front-end by click the
Verify connectionbutton.Once implemented we need to adapt the upload logic in
./machinery/src/cloud/Cloud.go. Extend theifstatement and add your new function.UI (Front-end)
Open the
ui/src/pages/Settings/Settings.jsxfile. Most of the work is done here.storageTypesarray with the new provider.ui/public/locales/folder, make sure your labels/translation is copied to all the different translation files.