Defining proxy server settings

Occasionaly, the SDK tools might need to communicate with the Signing Authority Service to allow it to create debug tokens and sign your app. If your computer connects to the Internet through a proxy server, the tools might need some additional information to communicate with the Signing Authority Service.

The command-line tools allow you to add proxy server information to the commands to facilitate this communication. However, if you choose to, you can save your proxy server settings within the SDK web tool. When you provide and save this information, the tools automatically append these settings to commands whenever they need to communicate through the proxy server. This behavior affects both the web tool and the command-line tools.

When you save your proxy settings, the SDK web tool does not encrypt any password settings you set. This value is saved in human-readable text. If you require a proxy server password and do not want to risk having this value exposed, you should use the command-line tools and add the proxy options as necessary.

Define proxy settings using the SDK web tool

To define proxy settings:

  1. Open BlackBerry WebWorks <version>. A new browser window opens, displaying the BlackBerry 10 WebWorks SDK web tool.
  2. In the navigation panel, click Global Settings.
  3. In the Proxy host field, specify the network server that provides the proxy service. The value can be an IP address or a fully qualified domain name.
  4. In the Proxy port field, specify the port number on your proxy server through which the tool should communicate with the Signing Authority Service.
  5. In the Proxy username field, specify your username on the proxy server, if your proxy server requires authentication.
  6. In the Proxy password field, specify your password on the proxy server, if your proxy server requires authentication.

    The password is saved as unencrypted plain text.

  7. Click Save.

When the proxy settings are saved in the web tool, both the SDK web tool and the command-line tools use these settings whenever communication through the proxy server is necessary.

Include proxy server settings from the command line

During the creation of a debug token or during the signing process, your computer needs connects to the Signing Authority Service. If your computer connects to the Internet through a proxy server, you may need to add some additional options to your commands to allow the tools to communicate with the Signing Authority Service. These options are appended to the blackberry-signer or blackberry-debugtokenrequest commands.

If you define your proxy server settings within the SDK web tool, you won't have to add the proxy options to your commands; once defined, the settings are appended to the CLI commands automatically.

The following table describes the proxy options available:

Options

Description

-proxyhost <host>

The network server that provides the proxy service. The value can be an IP address or a fully qualified domain name.

-proxyport <port>

The port number on your proxy server through which blackberry-signer or blackberry-debugtokenrequest should communicate with the Signing Authority Service.

-proxyusername

<user name>

Your username on the proxy server, if your proxy server requires authentication.

-proxypassword

<password>

Your password on the proxy server, if your proxy server requires authentication.

Signing an app with a proxy server

To sign your app with a proxy server:

  1. From the command line, navigate to the cordova-blackberry/bin/dependencies/bb-tools/bin subfolder of your BlackBerry 10 WebWorks SDK installation folder.
  2. Run the blackberry-signer command, and append the proxy options to the standard blackberry-signer options. You would use the following syntax:
    blackberry-signer -proxyhost <host> -proxyport <port> -bbidtoken <bbid_token_file> 
          –storepass <keystore_pw> <BAR_filename>

    The following table describes the standard blackberry-signer options used above:

    option

    Description

    -bbidtoken <bbid_token_file>

    Your BlackBerry ID token .csk file. For information on how to request this file, see Request your BlackBerry ID token.

    -storepass <keystore_pw>

    The keystore password. You define this password when you request your BlackBerry ID token.

    <BAR_filename>

    The file name of the signed .bar file.

For example:

blackberry-signer -proxyhost 192.168.1.1 -proxyport 80 -bbidtoken bbidtoken.csk 
      –storepass MySecretPassword1 MyApp.bar

Creating a debug token with a proxy server

To create a debug token with a proxy server:

  1. From the command line, navigate to the cordova-blackberry/bin/dependencies/bb-tools/bin subfolder of your BlackBerry 10 WebWorks SDK installation folder.
  2. Run the blackberry-debugtokenrequest command, and append the proxy options to the standard blackberry-debugtokenrequest options. You would use the following syntax:
    blackberry-debugtokenrequest -proxyhost <host> -proxyport <port>  
        -storepass <keystore_pw> -devicepin <device PIN> 
        <debug_token_file_name.bar>

    If you have multiple devices you want to test on, list their PINs in a file, and use the following command:

    blackberry-debugtokenrequest -proxyhost <host> -proxyport <port>  
        -storepass <keystore_pw> -devicepinlist <device_PIN_list_file> 
        <debug_token_file_name.bar>

    The following table describes the standard blackberry-debugtokenrequest options used above:

    option

    Description

    -storepass <keystore_pw>

    The keystore password. You define this password when you request your BlackBerry ID token.

    -devicepin <device PIN>

    The PIN of the BlackBerry 10 device on which you want to install this debug token.

    -devicepinlist <device_PIN_list_file>

    The name of a file containing the PINs of the BlackBerry 10 devices on which you want to install this debug token. For example, the contents of a file called device_PINs.txt might appear as follows:

    12G34H56 2K672HVP 221Q2958

    You would specify it like using the following syntax:

    -devicepinlist device_PINs.txt
    <debug_token_file_name.bar>

    The file name of the debug token .bar file.

    The debug token file must end with .bar. If you specify the name of an existing file, blackberry-debugtokenrequest deletes the existing file before creating the debug token.

    If you specify a path that does not include a file name, blackberry-debugtokenrequest deletes the directory you specify and does not create a debug token.

  3. Install the debug token on a BlackBerry 10 device:
    1. Determine the development IP address. You can view the development IP address on your device by opening Settings>Security and Privacy>Development Mode.
    2. From the command line, navigate to the cordova-blackberry/bin/dependencies/bb-tools/bin subfolder of your BlackBerry 10 WebWorks SDK installation folder.
    3. Run the blackberry-deploy command to install the debug token on your device:
      blackberry-deploy -installDebugToken <path_to_debug_token> 
          -device <development_IP_Address> -password <device_pw>

Last modified: 2014-12-04



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus