Rblp / Rblpapi

R package interfacing the Bloomberg API from https://www.bloomberglabs.com/api/
Other
166 stars 75 forks source link

Authentication of BPIPE using the .pk files #318

Closed rclauss closed 3 years ago

rclauss commented 3 years ago

When authenticating a connection to the Cloud BPIPE environment there is the requirement to use .pk authentication files. I do not see that functionality in the code anywhere. Is this available?

armstrtw commented 3 years ago

can you pls post the c++ api which includes the .pk auth? I'm not familiar with this requirement of BPIPE. I thought the apis were exactly the same as a direct terminal connection.

rclauss commented 3 years ago

ZFP

This is right from the ZFP (Zero Foot Print) connection documentation from Bloomberg that is dated August 2018.

armstrtw commented 3 years ago

can you pls post the c++ function signature for the function in the api that you wish to use that requires loading this file?

rclauss commented 3 years ago

I apologize I am not entirely sure what you mean but it would be in using the Subscription function of the API. This is not a requirement when using the terminal (blpConnect()) or when using my own server which hosts a dev BPIPE where I can easily make a connection with a host and a port and an appName. This is only a requirement when accessing BPIPE via the Cloud solution.

armstrtw commented 3 years ago

if what you are trying to do is not part of the c++ api, then we cannot expose it from our R interface.

rclauss commented 3 years ago

This issue relates to the connection to the API -- so it is not function specific. Once I have made the connection to the Cloud BPIPE then I could use any function I want. This issue only relates to creating the connection object.

armstrtw commented 3 years ago

Here is where we create the session object: https://github.com/Rblp/Rblpapi/blob/d33de7e25655cb4904317f715487fdeb53974501/src/blpConnect.cpp#L55

can you post how to create the session object in c++ with a .pk file?

I'm really doing my best to try to help you, but you have to do a little more work to help us understand what you are trying to do.

Please take a look at blpapi_session.h and explain to us how you want to include the use of a .pk file in the process of creating a session / connection.

rclauss commented 3 years ago

Ok -- I do not use C++ so I cannot post how to create the session object. The .pk files are provided by Bloomberg in the customer portal once the application is created and then are referenced when creating options for Authentication.

In the Bloomberg supported Python SDK it would become part of the authentication options as follows:

options = {} options['events'] = ['TRADE', 'BID', 'ASK']

options['conditionCodes'] = False

options['auth'] = "AuthenticationMode=APPLICATION_ONLY;ApplicationAuthenticationType=APPNAME_AND_KEY;ApplicationName="

sessionOptions = blpapi.SessionOptions()

**sessionOptions.setServerHost("cloudpoint1.bloomberg.com")

sessionOptions.setServerPort(8194)

tlsOptions = blpapi.TlsOptions.createFromFiles(clientCredentialsFilename=r'<path to .pk12 file>.pk12',

                                   trustedCertificatesFilename=r<path to .pk7 file>.pk7',

                                   clientCredentialsPassword='<password>')**

sessionOptions.setAuthenticationOptions(options['auth'])

sessionOptions.setTlsOptions(tlsOptions)

I can just use the Python SDK I was just hoping to keep everything in R since I really like what you guys put together and how easy it is to use.

Lastly here is a screen shot of the Bloomberg Data Demo tool that is used for testing connection and there is a space for the use of .pk files that must be populated in order to make a connection to the Cloud BPIPE service.

image

armstrtw commented 3 years ago

ambiguous feature request