Skip to main content

Sauce Connect Proxy 5 operations and administration

Sauce Connect Proxy operations and administration involve everything required to install, configure, maintain and use secure connections.

Installation and Configuration

Administration

We recommend using a single Sauce Connect Proxy tunnel or tunnel pool for each test suite or build, and tearing it down at the end of your test. Your test automation framework should launch Sauce Connect Proxy before the test suite is triggered and shut it down when the suite finishes.

Security Considerations

We recommend using a config file or setting environment variables to hide sensitive information like your password (--access-key) and proxy credentials. This way, they won't be visible in the list of running processes.

Sauce Connect Proxy white paper contains an in-depth overview of the proxy and its security.

Shared Tunnels

Sauce Connect Proxy tunnel can be shared between multiple accounts in the same organization. To share a tunnel, start Sauce Connect Proxy with the --shared all flag. For most Sauce Labs customers, your access to shared tunnels is determined by the permissions of the user who creates them. Organization admins can create tunnels that any user on any team can use. Team admins can create tunnels that any member of their team can use. Team members cannot share tunnels they create with any other team member.

For more information about user roles and permissions, see User Roles.

In order to use a tunnel that an admin or team member shares with you, you'll need to add tunnelOwner to your test capabilities and specify that person's username.

Running Sauce Connect Proxy

Every Sauce Connect Proxy tunnel spins up a fresh virtual machine (VM) that is used only for your tests. Once the tunnel is closed, VMs are destroyed.

  1. Make sure that the directory containing the sc binary (or sc.exe, for Windows) is in the $PATH. Otherwise, you will have to specify the path to the binary in the command line, i.e. /path/to/sc
  2. Define environment variables containing sensitive data: your user name, access key, proxy authentication (if needed), etc.
SAUCE_USERNAME=<username>
SAUCE_ACCESS_KEY=<your access key>
  1. Start Sauce Connect Proxy
sc run --tunnel-name $SAUCE_TUNNEL_NAME --region <us-west|eu-central>

Or without environment variables:

sc run --username <your user> --access-key <your access key> --region <us-west|eu-central> --tunnel-name $SAUCE_TUNNEL_NAME

Monitoring Tunnels

See the monitoring overview

Service Management Tools

Running Sauce Connect Proxy as a service is recommended when your tests often require an active secure connection and, operationally, it's complicated to set up a tunnel just before each test suite. The following options are available:

More Information