Advice on Configuration of FTP Blob Store - Registering Store With mssqlrbs.rbs_sp_add_blob_store

Mar 12, 2010 at 1:42 AM


I would like to create an FTP based provider using the sample as a base, but I need to store the FTP location, username, password, proxy, etc. and I wantded to know which set of configurations I should store this information in and an potential example of registering this information.

Examples:  To access blobs that are stored on an FTP server, I would need the FTP server name, username, password, a boolean value indicating if a proxy needs to be used, proxy address, proxy port, etc. and I think that would be placed in the "Core" configuration...however I am not sure how to specify this when registering the provider.  I am also not sure if this is the correct level to place this configuration, e.g. perhaps the extended configuration is a better place or perhaps the ftp serer name should be listed as the blob_store_location value.


        /// <param name="commonConfiguration">
        /// Configuration information that is understood by RBS client library.
        /// ConfigItems present are: BackEndBlobStoreVersion and BlobStoreLocation.
        /// </param>
        /// <param name="coreConfiguration">
        /// Configuration information that is specific to the provider.
        /// "Core" configuration consists of configuration that is required to access
        /// existing blobs in the backend blob store.
        /// This is optional and present only if specified in the blob store entry in the database.
        /// </param>
        /// <param name="extendedConfiguration">
        /// Configuration information that is specific to the provider.
        /// without having access to the database controlling the blob.
        /// "Extended" configuration consists of configuration that is not needed to access
        /// existing blobs, but is needed for other operations, such as create pool, store blob etc.
        /// This is optional and may not be present. This is because extended configuration
        /// is not included in Blob Locators, which can be used to access a blob.
        /// </param>


        <blob_store_type> File </blob_store_type> 
        <backend_blob_store_version> </backend_blob_store_version> 
        <min_provider_version_supported> </min_provider_version_supported> 
        <blob_store_location> @LOCATION@ </blob_store_location> 
            <config_item key = "pool_capacity" value = "@CAPACITY@" />



Mar 16, 2010 at 1:29 AM
Edited Mar 16, 2010 at 9:33 PM

Hi jgill,

The sample file provider is a good place to start from to understand the basics of writing a provider and registering it – both on the server (database) and on the client (CLR machine.config). The server-side registration is covered in RegisterFileProvider.sql and the client-side registration in FileProviderConfiguration.xml.

  1. FTP Server Name: blob_store_location is the ideal place for this.
  2. Proxy address, port, Boolean etc.: core configuration is the right place for these items since you need access to them for reading as well as writing blobs. If there are some items that you only need while writing new blobs (e.g. pool_capacity only comes into play while writing new blobs) then you can use extended config.
  3. Username/password: There are a couple of options here based on your needs:
    1. You can store them in core configuration like above. However the password will not be encrypted.
    2. You can store them as credentials. RBS allows you to store credentials for every (DB user SID, blob store) combination. The credentials have two parts: credential_name which is stored in clear-text and credential_secret which is stored encrypted. The advantage of using credentials is that the password (secret) is handled with utmost care – it is stored encrypted in the DB, transferred to the client on an encrypted channel and stored in the client machine’s memory in encrypted form. You can take a look at stored procs [mssqlrbs].[rbs_sp_set_blob_store_credential], [mssqlrbs].[rbs_sp_get_blob_store_credentials] and [mssqlrbs].[rbs_sp_delete_blob_store_credential]. However, the disadvantage with this approach is that if you have multiple DB users (different User SIDs) that need to use the same blob store, then you will need to add one credential for each user (the credential is your FTP username+password – they can all be the same or different – its upto you).

Let us know if you have any more questions.


Mar 16, 2010 at 9:22 PM

Thanks Pradeep.  I will try my hand at an FTP based provider this week.