Giter Club home page Giter Club logo

Comments (4)

ericvw avatar ericvw commented on May 25, 2024

@yupinghu, please update with your findings and status. Just a reminder :).

from blpapi-http.

yupinghu avatar yupinghu commented on May 25, 2024

Whoops, forgot this was here. :)

The core part of authorization is the Identity object. It contains the authorization info and is passed into every BLPAPI request; the request will take into account what the Identity is entitled to and the response will reflect that (possibly will result in an error response if the Identity is not authorized properly for that request).

To correctly populate the Identity, you use Session::sendAuthorizationRequest. When this request completes successfully, the Identity object will have been altered to reflect this (and when used in future requests, will do the right thing). The Request object passed to sendAuthorizationRequest needs to specify enough info to be able to authorize the user. This consists of either a UUID & IP address (e.g. for SAPI, this is where the user is logged in to the Terminal), or a token (e.g. for BPIPE).

The UUID/IP address mechanism assumes you're logged into the Terminal and know how to get that info, which is not the use case for the http server. So we'll want to use tokens. I'll get to token generation below, but the high level point is that authorization basically boils down to getting a valid token. I'm working on changes that, given a token, will take care of the rest.

(Currently the developer's guide (2.54) has conflicting info. The BPIPE examples use tokens to authorize the user, but the schema section suggests that this is deprecated. Given that we plan on using this token mechanism, we should investigate what the replacement for this is, if it's deprecated, or update the dev guide to not call it deprecated.)

Right now, the only ways I can see of getting a token are using Windows login info, or by generating a MSG to the user containing the token string. The first one obviously doesn't work for us, and the latter is not a good user experience. In the short run, it's good enough for developing the authorization code in the http server, but we'll need to think about how the user will actually input the token.

from blpapi-http.

yupinghu avatar yupinghu commented on May 25, 2024

Anyway that's the overview of how it works. My changes that implement this will have docs/examples that should make it more clear what's going on, and I'll close this issue at that time.

from blpapi-http.

yupinghu avatar yupinghu commented on May 25, 2024

bloomberg/blpapi-node#37 adds support for authorization requests.

from blpapi-http.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.