Product |
Version |
Spotfire Services |
All Versions |
Keywords:
Spotfire, Data Functions, TERR (Spotfire Enterprise Runtime for R), Spotfire Service for R, Spotfire Service for Python, Proxy Configuration, External API, Environment Variables, Windows, Linux.
Description:
When using Spotfire Data Functions such as TERR (Spotfire Enterprise Runtime for R), Spotfire Service for R, or Spotfire Service for Python to connect to external APIs, customers may encounter issues with internet traffic being blocked by organizational proxy servers. Spotfire does not provide separate proxy configuration profiles for these data functions. This article provides a solution to configure proxy settings using environment variables on Windows and Linux systems to ensure seamless connectivity for API calls.
Solution:
For Windows:
To configure proxy settings for Spotfire Data Functions on Windows, follow these steps:
1. Set environment variables:
- Open the Start Menu, search for "Environment Variables," and select "Edit the system environment variables."
- In the System Properties window, click on the "Environment Variables" button.
- Under the "System variables" section, click "New" to add the following variables:
Variable name:HTTP_PROXY
Variable value:http://username:password@your_proxy:port
Variable name:HTTPS_PROXY
Variable value:https://username:password@your_proxy:port
- Replace
username
,password
,your_proxy
, andport
with your organization's proxy details.
2. Encrypting Passwords (Optional)
- To avoid storing plaintext passwords in environment variables, consider using Windows Credential Manager to securely store your proxy credentials.
- Use a script or tool to retrieve the credentials from the Credential Manager and set the environment variables programmatically.
For Linux:
To configure proxy settings for Spotfire Data Functions on Linux, follow these steps:
1. Set environment variables:
- Open a terminal and edit the shell configuration file (e.g.,
.bashrc
,.bash_profile
, or.zshrc
) using a text editor likenano
orvim
. - Add the following lines to the file:
export HTTP_PROXY=http://username:password@your_proxy:port
export HTTPS_PROXY=https://username:password@your_proxy:port - Replace
username
,password
,your_proxy
, andport
with your organization's proxy details.
Save the file and reload the shell configuration by running:
source ~/.bashrc # or the appropriate file for your shell
2. Encrypting Passwords (Optional)
-
On Linux, you can use tools like
openssl
orgnome-keyring
to securely store and retrieve proxy credentials. -
Use a script to decrypt the credentials and set the environment variables dynamically.
Additional Documentation and References:
Here are the official documentation links for the relevant Spotfire products:
Spotfire Service for R:
https://docs.tibco.com/products/spotfire-service-for-r-1-21-1
Spotfire Enterprise Runtime for R (TERR):
https://docs.tibco.com/products/spotfire-enterprise-runtime-for-r-server-edition-1-21-1
Spotfire Service for Python:
https://docs.tibco.com/products/spotfire-service-for-python-1-21-1
General Spotfire Data Functions Documentation:
https://docs.tibco.com/pub/spotfire_server/latest/doc/html/TIB_sfire_server_tsas_admin_help/server/topics/data_function_overview.html
Windows Credential Manager Guide:
https://support.microsoft.com/en-us/windows/using-credential-manager-to-store-credentials-1b5c916a-6a16-889f-8581-fc16e8165ac0
Linux Environment Variables Guide:
Using OpenSSL for password encryption on Linux:
https://www.openssl.org/docs/man1.1.1/man1/openssl-enc.html
By following these steps, you can ensure that Spotfire Data Functions can connect to external APIs through your organization's proxy without encountering internet traffic issues.