Using tranSMART R-interface through a proxy

28 views
Skip to first unread message

Annick....@sanofi.com

unread,
Oct 20, 2017, 9:31:34 AM10/20/17
to transmar...@googlegroups.com

Hello,

I am trying to connect to the tranSMART public server using the R-interface from behind a firewall. I can get the token through O-Auth. However afterwards I am facing a proxy issue (error 407) to establish the connection.  By the way I get the same behavior with any tranSMART server outside of my company network.

Here is what I do in R (in a Windows 7 64-bit computer) and what I get:

> domain="http://postgres-test.transmartfoundation.org/transmart"

> options(verbose=TRUE)

> connectToTransmart(domain)

Unable to refresh authentication: no refresh token

No access token specified. Please visit the following url to authenticate this RClient  (enter nothing to cancel):

 

http://postgres-test.transmartfoundation.org/transmart/oauth/authorize?response_type=code&client_id=api-client&client_secret=api-client&redirect_uri=http%3A%2F%2Fpostgres-test.transmartfoundation.org%2Ftransmart%2Foauth%2Fverify

 

And paste the verifier token here:

S1clD2

* timeout on name lookup is not supported

* Hostname in DNS cache was stale, zapped

*   Trying XXX.XXX.XX.XX...

* TCP_NODELAY set

* Connected to PROXY.PHARMA.AVENTIS.COM (XXX.XXX.XX.XX) port XXXX (#16)

* Proxy auth using Basic with user 'xxxxxxx'

* Server auth using Basic with user 'api-client'

> POST http://postgres-test.transmartfoundation.org/transmart/oauth/token?grant_type=authorization_code&client_id=api-client&client_secret=api-client&code=S1clD2&redirect_uri=http://postgres-test.transmartfoundation.org/transmart/oauth/verify HTTP/1.1

Host: postgres-test.transmartfoundation.org

Proxy-Authorization: Basic ZnIyMDcyNjpDaW4xMTExLg==

Authorization: Basic YXBpLWNsaWVudDphcGktY2xpZW50

User-Agent: libcurl/7.53.1 r-curl/2.6 httr/1.2.1

Accept-Encoding: gzip, deflate

Proxy-Connection: Keep-Alive

Cookie: BCSI-CS-6d6d81e7a0eceb17=2

Accept: application/json, text/xml, application/xml, */*

Content-Type: application/x-www-form-urlencoded

Content-Length: 0

 

< HTTP/1.1 407 Proxy Authentication Required

< Proxy-Authenticate: NEGOTIATE

< Proxy-Authenticate: NTLM

< Cache-Control: no-cache

< Pragma: no-cache

< Content-Type: text/html; charset=utf-8

* HTTP/1.1 proxy connection set close!

< Proxy-Connection: close

* Replaced cookie BCSI-CS-6d6d81e7a0eceb17="2" for domain postgres-test.transmartfoundation.org, path /, expire 0

< Set-Cookie: BCSI-CS-6d6d81e7a0eceb17=2; Path=/

< Connection: close

< Content-Length: 821

<

* Closing connection 16

POST body:

 

 

Server response:

<HTML><HEAD>

<TITLE>Access Denied</TITLE>

</HEAD>

<FONT face="Helvetica">

<big><strong></strong></big><BR>

</FONT>

<blockquote>

<TABLE border=0 cellPadding=1 width="80%">

<TR><TD>

<FONT face="Helvetica">

<big>Access Denied (authentication_failed)</big>

<BR>

<BR>

</FONT>

</TD></TR>

<TR><TD>

<FONT face="Helvetica">

Your credentials could not be authenticated: "". You will not be permitted access until your credentials can be verified.

</FONT>

</TD></TR>

<TR><TD>

<FONT face="Helvetica">

This is typically caused by an incorrect username and/or password, but could also be caused by network problems.

</FONT>

</TD></TR>

<TR><TD>

<FONT face="Helvetica" SIZE=2>

<BR>

For assistance, contact your network support team.

</FONT>

</TD></TR>

</TABLE>

</blockquote>

</FONT>

</frameset></HTML>

 

 

Authentication failed, could not parse server response of type text/html; charset=utf-8. status code 407:

Unable to refresh authentication: no refresh token

Error in connectToTransmart(domain) :

  Connection unsuccessful. Type: ?connectToTransmart for help.

>

Does anyone know how to get it to work by any chance?

Thanks in advance,

Annick

Reply all
Reply to author
Forward
0 new messages