How To: Encrypt the SDE password in the Metadata Server configuration file (PTKWeblink.cfg)
Certain site security policies require passwords in plain text configuration files to be encrypted.
The Metadata Server, a component of GPT 9.3, has a configuration file (PTWeblink.cfg) that has an SDE Workspace tag containing connection information to the database. This information is stored by default in plain text.
Instructions provided describe how to encrypt the SDE password in the Metadata Server configuration file.
Locate the PTKWeblink.cfg file in the /etc directory under the MetadataServer installation directory.
Open PTKWeblink.cfg in a text editor.
Scroll through the file and note that there are two (2) entries for an <SDEWORKSPACE> tag (approximately lines 37 and 130).
Add the following attribute within the SDEWORKSPACE tag: encrypted="true" in *both* instances of the SDEWORKSPACE tag (ref: ArcIMS Webhelp - SDEWORKSPACE).
Expand 'ArcSDE' from the 'Data Sources' tree and double-click 'Add ArcSDE Connection'.
Fill out the 'ArcSDE Connection' form entering:
a) Server: The server name hosting your SDE data source
b) Instance: i. If connecting to an ArcSDE Application service, then enter the ArcSDE port using the pattern "port:<sde port>", for example, "port:5151". ii. If making a direct connection to an SDE geodatabase, then enter the direct connection instance string, for example, "sde:sqlserver:<server-name>".
c) Enter the database, username, and password information.
d) Click the 'Test Connection' button.
e) If the Test Connection worked, then proceed with the next step, otherwise review the connection parameters and try again.
f) Click OK.
Select a layer from the 'Catalog' window and click the 'Add Layers' button.
Close the 'Catalog' window.
Select 'Save Project' from the 'File' menu.
Save the file, for example, 'sdeconnection.axl', and then open it in a text editor.
Locate the SDEWORKSPACE tag within the AXL file.
Notice that the 'encrypted' attribute is set to 'true'.
Copy the password string. It will now be a 16-character uppercase string.
Re-open the PTKWeblink.cfg file and replace the password string in each SDEWORKSPACE tag with the 16-character string that was copied from the 'sdeconnection.axl' file.
Save and close the PTKWeblink.cfg file.
Restart the Metadata Server service.
Check that there are no errors in Metadata Server log files.
Restart the GPT Web application in Tomcat and the HTTP server.
Check that the GPT Portal Web application search is working correctly.