Making Database and Web Connections Public

Liz Sanderson
Liz Sanderson
  • Updated

FME Version

  • FME 2022.1

Introduction

The default setting in FME Workbench for database and web connections is private, as connections stored in the default path location are available only to the current user. If connections need to be accessible to any user in an organization, it is necessary to move both the connection storage file and the public key file of a database or web connection to a shared location, and then manually enable the Public setting for these connections.

Alternatively, if sharing only a few connections between users are required and no shared directory will be accessed or established, the relevant connection storage files and public key files may be exported to an .xml file and then imported locally to a different user profile, or imported to another system altogether. This article describes these two methods for making database and web connections public, thereby enabling repeated use of established connections by multiple users across an organization. 

Note that a shared web connection can only be associated with a single set of credentials. If the web application you are connecting to requires unique credentials for each user, for example Microsoft Azure, then each user must create their own web connection. The underlying web service definition can also be exported as .xml and imported by different users who can then choose it when creating their web connection.

Note: following these steps may solve issues with Windows Task Scheduler as seen in this article.

 

Step-by-step Instructions

We begin this look at making web and database connections public with a method that makes use of a shared directory.  Before attempting this first method, ensure you have access to and can navigate to a shared directory.
 

Method 1: Make Connections Public via a Shared Directory

1. Copy the Connection Storage File and Public Key File to a Shared Directory

By default, connection files and key files are stored in %AppData%\Safe Software\FME folder.  You can see these default connection and key file paths in FME Options, accessible via the Tools tab in FME Workbench. 

DefaultPaths.jpg


As noted in the associated documentation, if you have existing connections that you wish to make public, you must copy the existing fme_connections.data connection file and fme_publicKey.jceks key file to a shared directory that your target user group has access to.

To accomplish this, first navigate to the default storage location in your File Explorer. Copy the fme_connections.data and fme_publicKey.jceks files therein. 

copythese.jpg


Paste these files into your shared directory.

pastethemhere.jpg
 

2. Change the Default Connection Storage Paths

Open FME Workbench and go to Tools > FME Options > Default Paths. Select the Change button below the Connection Storage details, then select Data Path.

thechangebutton.jpg

In the Change Connection Storage dialog that opens, select the ellipses next to Connection Data Directory and Public Encryption Key. Point these parameters to the new location of the connection file and public key file in the shared directory, respectively.
 

change_default_paths.jpg

 

3. Toggle the New Public Setting for Extant Web and/or Database Connections 

In FME Options, select the Database Connections menu. The table of available data connections will now show a Public field. Make database connections public by checking the Public box of any or all database connections listed.

DBconnectionspublic.jpg 

Repeat this process as necessary for the web connections located in the Web Connections menu of FME Options.


webconnectionspublic.jpg


Note: the Public field will only appear if the Connection Storage data paths specified in Step 2, above, is a shared location visible to multiple users. If the default paths for Connection Storage have been changed and the Public field still does not appear, try adding the shared directory path to Shared FME Folders in the Default Paths menu of FME Options, as below:

sharedfolderadd.jpg

 


4. Establish Any New Database or Web Connections as Public or Private

Add a new database or web connection as you normally would.  Notice there is now a Visibility parameter available in the Add <Database or Web> Connection dialog.  This parameter allows you to set your new connection to Public or to the user profile running FME (private).  If set to Public, the connection will be available to other users who have access to the shared directory now pointed to by the default connection storage paths.
 

newconnectionvis.jpg

 

Method 2: Export Database or Web Connections as .xml Files

Exporting connections may be useful if they are to be shared without the use of a shared directory. Instead, the connections can be exported as .xml files and passed to other users. Recipients of these .xml connections can then import them using their own local instance of FME Workbench.


1. Exporting the Database or Web Connections to .xml Files

 In FME Options, select the Web Connections or Database Connections menu at left.  Then, highlight the connections you would like to share, right-click and select Export from the dialog that opens.

exportconnection.jpg


The Export Connections dialog will open.  Select the ellipses next to the Export File parameter, and specify a name and location for the .xml file which will contain the connection details.

exportname.jpg


2. Importing the Database or Web Connections

The recipient of the exported .xml file can now import it as a connection locally from their own instance of FME Workbench.  First, save the .xml locally.  Next, in FME Options, select either Data Connections or Web Connections at left.  In the table of connections, right-click and select Import

import.jpg

In the dialog that opens, select the ellipses next to the Files to Import parameter. Point to the connection .xml file and select Open, and then OK. A list of available connections exported to the selected .xml displays; select the connections you would like to import and click OK. Your imported connection should now be visible in the web/database connections table. If the selected connection(s) already exist(s) in your connections table, you will be prompted to overwrite the existing connection with the new connection.


Note: if a task scheduler is used to deploy workspaces which use connection files, the visibility of the connections may need to be changed. If the FME workspace was created with the same user as the task scheduler is run with, there is no need to make connections public. However, if the task scheduler is run as a different user as was used to create the workspace, the connection visibility must be public. If running as 'Default user', there are extra steps which are required and outlined in Working with Named Connection Files when running Windows Task Scheduler as 'Default User'.

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.