Autarchy of the Private Cave

Tiny bits of bioinformatics, [web-]programming etc

    • Archives

    • Recent comments

    Using Cytoscape from behind an HTTP proxy which requires authentication (authorization)

    14th September 2007

    Cytoscape 2.5.1 supports proxies, including HTTP proxies, but there is no support for HTTP proxies requiring authentication/authorization. It’s easy to use Cytoscape in the authentication-requiring proxy scenario; below is one possible method.

    Note, that exactly the same method can be used to allow any software, which supports proxies but not proxies with authentication, to be able to access the internet.

    First, let’s outline what we will do:

    1. get a proxy which supports on-the-fly modifying of HTTP headers. I used Proxomitron (which is a great tool, BTW!), and recommend using 4.5 June release. You need to have privileges sufficient for installing your local proxy of choice.
    2. you need to know the ip (or hostname) of your proxy, proxy port, and both user and password for that proxy

    First, install your proxy of choice. In this example, I installed Proxomitron.

    Second, you need to configure your local proxy and browser. With Proxomitron:

    1. launch proxomitron
    2. an eye in a triangle will appear in your taskbar. click it once to bring up the main window: Proxomitron main window
    3. you need to set the checkboxes as I did on the screenshot above
    4. click the ‘proxy’ button, and enter your proxie’s host and port (semicolon-separated): Proxomitron remote proxy window
    5. optionally, click ‘config’ in the main window and set desired options, including the default port for local connections (which is 8080 by default)
    6. configure your browser to use Proxomitron. Set proxy host to localhost, port to 8080 (default). More info on configuring browser proxy is available either in browser manual, or here for older browsers.

    Third, you need to know the authentication string sent to your organisation’s proxy server by your browser. You can see that string in the headers your browser sends out at each request. There are multiple ways to see headers. I recommend either using Live HTTP Headers FireFox add-on, or the Proxomitron’s “Log window”. You can also just calculate the hash.

    The string you are looking for should be similar to:
    Proxy-Authorization: Basic Yi5OLNrVa242Zw5rBzPpZxl1ZxBhDf==
    (it is the hash of your proxy user and password).

    Here is what you need to do to see this string using Proxomitron (assuming Proxomitron is already launched and main window open):

    1. launch Proxomitron
    2. click the ‘Log Window’ in Proxomitron main window
    3. now try accessing e.g. google.com in the browser configured to use Proxomitron. You should get usual HTTP authentication form, asking for username and password. Enter correct data here. Now look into the ‘HTTP Message Log’ window – you must be able to locate the string we are looking for:
      http log

    The last thing you need to do is to add a rule to your proxy to send the authentication header with every request.

    With Proxomitron, do this:

    1. click the ‘headers’ button:
      headers
    2. select the Proxy-Authorization filter, and click ‘edit’
    3. in the ‘Replacement text’ field, paste yours auth-string (“Basic ….”)
    4. OK, Apply. Do not forget to set the checkbox in the ‘Out’ column for the Proxy-Authorization rule.

    This should be all. Now just open Cytoscape, Edit=>Preferences=>Proxy Server, HTTP, localhost, 8080.

    This is it.

    Share

    One Response to “Using Cytoscape from behind an HTTP proxy which requires authentication (authorization)”

    1. user Says:

      Thanx!!!..Helped loads!!

    Leave a Reply

    XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>