FME Version
Introduction
The default access setting in FME Workbench for named database and web connections is Personal (FME Form 2024+) or Private (FME Form 2023 and below), both of which mean that named connections created by the current FME user are available only to the current user. If named connections need to be accessible to any user in a user group or organization, regardless of which user creates a given connection, it is necessary to move both the connection storage database and the public / shared key file associated with FME named connections to a shared folder location, and then manually enable connections sharing in FME Workbench.
Alternatively, if sharing only a few connections between users is required and no shared directory will be accessed or established, the connections to be shared 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 two main methods for sharing database and web connections in FME Form. Utilizing either of these two methods enables repeated use of established, standardized connections by multiple users across an organization, thereby easing the overall management of database and web connections.
Step-by-step Instructions
Two different methods for sharing named database and web connections will be described below. Method 1 is the recommended sharing method for most scenarios where named connections need to be accessible to multiple users, and where a shared directory can be accessed by all users involved. The instructions for Method 1 vary slightly based on the version of FME Form in use. If FME Form 2023.x or below is in use, follow the instructions specific to FME Form 2023.x. Where FME Form 2024.x or newer is in use, follow the instructions specific to FME Form 2024.x.
Method 2 is recommended when a shared directory cannot be established for all users who need access to database and web connections in FME Form.
Method 1: Make Connections Public via a Shared Directory
Before attempting this first sharing method, ensure you have full read-write permissions to a shared directory. Ensure all users who require access to connections shared via Method 1 also have shared permissions to this target shared directory.
1. Copy the Connection Storage File and Public Key File to a Shared Directory
By default, the named connections database and associated key files are stored to a given FME user's profile. For example, on a Windows system, the default path to these files is:
C:\Users\<username>\AppData\Roaming\Safe Software\FME
AppData is a hidden folder; it will only be visible if hidden folders have been enabled for the file management utility in use (such as Windows File Explorer).
Users can see their default connection and key file paths by opening FME Workbench and then navigating to Tools > FME Options > Default Paths.
For FME Workbench 2023.x and below, the Default Paths menu before sharing connections will look like:
For FME Workbench 2024.x and newer, the Default Paths menu before sharing connections will look like:
To make named database and web connections public or shared, you must first copy the existing named connections database and associated shared key file to a shared directory that your target user group has access to.
For FME 2023.x and below, access %AppData\Roaming\Safe Software\FME and copy the following two files:
- fme_connections.data
- fme_publicKey.jceks
Now, paste the two copied files into the shared directory
For FME 2024.x and newer, access %AppData\Roaming\Safe Software\FME in a file management utility, and copy the following two files:
- fme_userconnection.data
- fme_sharedKey.fmekey
The shared key file, fme_sharedKey.fmekey may not be present. If it's not present, just copy the fme_userconnection.data file on its own. The shared key will be created in Step 2, below.
Now, paste the copied file(s) into the target shared directory.
2. Change the Default Connection Storage Paths in FME Workbench
Open FME Workbench and navigate to Tools > FME Options > Default Paths.
For FME Workbench 2023.x and below, perform the following adjustments from the Default Paths menu:
- Select the Change drop-down menu at the bottom right of the Connection Storage parameter box
- Choose Data Path from the drop-down options presented
- In the Change Connection Storage dialog that opens, use the ellipses next to the Connection Data Directory parameter, and navigate to the shared directory where your fme_connections.data file was placed
- Use the ellipses next to the Public Key File parameter to navigate to your fme_publicKey file, which is now residing in your shared directory. Do not change the value of the Private Key File parameter.
- Select OK on the Change Connection Storage dialog to return to the Default Paths menu.
For FME Workbench 2024.x and newer, perform the following adjustments from the Default Paths menu:
- Select the Manage drop-down menu in the Connection Storage parameter group
- Choose Change Connection Storage
- In the Change Connection Storage dialog that opens, choose the Shared Database option for Database Accessibility
- Next, select the ellipses to the right of the Database Folder parameter that appears, and navigate to the target shared directory where the fme_userconnection.data file was placed
- The Key Folder parameter's value should auto-populate with the same shared directory file path chosen for the Database Folder parameter. If this does not occur, use the ellipses to the right of the Key Folder parameter, and navigate to the target shared directory
- You can optionally create a password for the fme_sharedKey.fmekey file by entering a value into the Key File Password parameter's text box.
- Choose OK on the Change Connection Storage dialog to return to the Default Paths menu. If you choose not to create a key file password, you will receive a warning that you must acknowledge.
3. Toggle the New Public / Shared Setting for Existing Web and Database Connections
Along the left-side navigation pane of FME Options, choose the Database Connections menu. The table of available data connections will now show a new field:
- Public (FME Form 2023 or below); or
- Shared (FME Form 2024+)
Share database connections by checking the Public or Shared box of any or all database connections listed in the Connections table. Each time a connection's visibility is changed from private/personal to public/shared (or the reverse), a message will appear in the Translation Log window, acknowledging this change. This message provides confirmation that the connection is now shared.
Repeat this process as necessary for established web connections by accessing the Web Connections menu of FME Options.
The Public or Shared field will only appear if the data paths specified in Step 2, above, point to a shared location visible to multiple users. If the default paths for the connections database and the shared key file have been changed in FME Workbench, but the Public or Shared field still does not appear in the Web or Database Connections menus, first verify that the target shared directory was correctly shared. Then, try adding the shared directory path to the Shared FME Folders list in the Default Paths menu of FME Options.
4. Establish Any New Database or Web Connections as Public or Private
From the Database Connections or Web Connections menu of FME Options, choose to add a new connection by selecting the plus (+) button just below the Connections table. In the Add Connection dialog that pops open, notice there is now a new Visibility parameter available, just below the Connection Name parameter. This new parameter allows you to set your new connection to Public or Shared as needed. If set to Public or Shared, the connection will be available to other users who have access to the shared directory and who have also adjusted their Default Paths values as per Step 2, above.
Method 2: Export Database or Web Connections as .xml Files
Exporting connections may be useful if they need to be shared amongst users, and a shared directory cannot be established. FME database and web connection definitions can instead be exported as .xml files. Then, copies of the exported .xml files can be provided to those users who require the connections. 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 Workbench, navigate to Tools > FME Options > Database Connections or Web Connections. Then, highlight the connection(s) to share, right-click, and select Export from the dialog that opens.
The Export Connections dialog will open. Select the ellipses to the right of the Export File parameter, and specify a name and location for the .xml file that will contain the connection details. You can also choose to include the credentials tied to the connection(s).
2. Importing the Database or Web Connections
The recipient of the exported .xml file can now import it locally from their own instance of FME Workbench. To import the .xml file, first save it locally. Next, open FME Workbench and navigate to Tools > FME Options > Database Connections or Web Connections, depending on the type of connection(s) being imported. In the Connections table that populates, right-click and select Import.
In the Connection File to Import dialog that opens, select the ellipses to the right of the File to Import parameter. Navigate to the locally saved connection .xml file, select Open, and then choose 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 appropriate connections table. If the selected connection already exists in your connections table, you will be prompted to overwrite it with the new connection.
FAQs
Do all users who will be granted access to shared connections via Method 1 need to complete Method 1 - Step 1?
No, completion of Method 1 - Step 1 is only required by one user. Typically, the user who would copy the connections database and key file into the shared directory would be an FME superuser, or the identified FME user who will manage the database and web connections for a given FME user group.
Once this identified FME user has completed Method 1—Step 1, all other users requiring access to the shared database and web connections should complete Method 1—Step 2, pointing their Default Paths in FME Workbench to the shared location.
May I still use Windows Task Scheduler to run workspaces if the workflow includes database and/or web connections?
Yes, but connections may need to be changed to public/shared if the user who authored the workspace differs from the user running Task Scheduler. When Task Scheduler is run under a different user than the user who authored the workspace, the connection(s) in the workspace must be shared with both users. For example, if running Task Scheduler as 'Default user', there are extra steps that are required and outlined in Working with Named Connection Files when running Windows Task Scheduler as 'Default User'. If the FME workspace was created by the same user running Task Scheduler, there is no need to make connections public/shared; they can be left as private/personal if that's preferred.
I would like to share my web connections with my colleagues, but I've used my own user credentials to authenticate a few of them. Can I still share these web connections?
Yes, but with a caveat. A shared web connection can only be associated with a single set of user credentials. If the resource you are connecting to requires unique credentials for each user, for example, Microsoft Entra user credentials, then each user must create their own web connection and authenticate it with their own user credentials.
For example, User A authenticates a shared connection with their own user credentials, and User B accesses the shared connection and reauthenticates it with their own user credentials. Now, User A's connection will no longer use User A's credentials, and dependent workflows may begin showing errors. So, for these connections, Method 1 described above will not suffice.
The underlying web service definition for such a connection can be shared amongst users by exporting - importing the web service definition as an .xml file. Web service definitions can be exported by highlighting the web service in Tools > FME Options > Web Connections > Manage Services, then choosing Export at the bottom right of the dialog. Other users could then import a copy of the exported web service .xml file to their own instance of FME Workbench, and then build their web connection from this imported web service.
I have a version of FME Form 2023 and a version of FME Form 2024 installed for my users, and I would like to follow Method 1 to share connections. How do I ensure that connections can be shared with my users for both of these versions of FME Form?
If users may be using shared connections in FME Form 2024.x or newer, and in FME Form 2023.x or below, the new shared directory should contain copies of the named connections database and shared key relevant for these versions of FME Form. In other words, the shared directory should have copies of:
- fme_connections.data
- fme_userconnection.data
- fme_publicKey.jceks
- fme_sharedKey.fmekey
Comments
0 comments
Please sign in to leave a comment.