Hi Sanjiva,

On Sat, May 21, 2016 at 7:19 AM, Sanjiva Weerawarana <[email protected]>
wrote:

> How does the webapp manage sessions and security credentials for the
> remote HTTP API right now?
>

​Both webapps in BPS use jaggery to invoke backend services or rest APIs. ​
​
HumanTask-explorer uses JSession to authenticate HumanTask admin services.

In BPMN-explorer, we maintain a server side session containing security
credentials. From Jaggery, we invoke BPMN Rest API and use above session
details to authenticate BPMN rest API using basic auth.

Thanks,
Hasitha.
​


>
> We know we need to do something for this for UUF .. we delayed it as a
> temporary measure. IIRC also we've had issues previously with session
> timeout mismatches and with security creds being not carefully handled so
> we need to make sure this is done right (or at least better) this time.
>
> So, what do you guys do right now for these two aspects of making a remote
> call from the server?
>
> Sanjiva.
>
> On Fri, May 20, 2016 at 11:28 AM, Nandika Jayawardana <[email protected]>
> wrote:
>
>> In case of BPS, what we develop is similar to a web application which
>> should be independent of the BPS backend. Idea is that this component has
>> to be packaged into PC ( process center ) as well as BPS. Hence, native
>> OSGi call's is not sufficient for our requirement.
>>
>> Regards
>> Nandika
>>
>> On Fri, May 20, 2016 at 11:17 AM, Rasika Perera <[email protected]> wrote:
>>
>>> Hi,
>>>
>>> We have came up with this best practise. There are basically two
>>> scenarios;
>>>
>>> 1. When the back-end is belongs to your product(eg. calling BPS runtime).
>>>
>>> We assume that you have written your JAX-RS based on an OSGi service.
>>> JAX-RS will *not* hold any business logic and act as API interface(Facade
>>> Pattern). In this case making a network call(AJAX) from UI to your own VM
>>> is discouraged. You should use callOsgiService() function on the server
>>> side Js.
>>>
>>> 2. When the back-end is external(eg. calling Twitter API).
>>>
>>> Here we don't provide any server side feature for handling HTTP calls
>>> because this will again abuse and use to call own VM back-ends. You can
>>> simply write AJAX calls from UI using $.ajax() in jquery or XMLHttpRequest
>>> in client-side Js.
>>>
>>> * In the edge cases that you really need to make HTTP calls from the
>>> server side Js, you can initiate; apache commons 'HttpClient' or
>>> java.net 'URLConnection' through Nashorn.
>>>
>>> * Also you might still need to write JAX-RS APIs for your OSGi services
>>> for customers.
>>>
>>> Thanks,
>>> Rasika
>>>
>>> On Fri, May 20, 2016 at 10:42 AM, Chathura Ekanayake <[email protected]>
>>> wrote:
>>>
>>>> So there is not separation between UI back-end and the actual server
>>>> (e.g. BPS runtime)? i.e. both always run in the same jvm?
>>>>
>>>> On Thu, May 19, 2016 at 11:47 PM, Manuranga Perera <[email protected]>
>>>> wrote:
>>>>
>>>>> Yes, you will be able to call OSGi services.
>>>>>
>>>>> On Thu, May 19, 2016 at 12:53 PM, Hemika Kodikara <[email protected]>
>>>>> wrote:
>>>>>
>>>>>> Hi All,
>>>>>>
>>>>>> For clarification, does this mean we will be able to invoke a service
>>>>>> side function(through nashorn) upon client request ? As in when a user
>>>>>> clicks a button, we can call a server side function ?
>>>>>>
>>>>>> Regards,
>>>>>> Hemika
>>>>>>
>>>>>> Hemika Kodikara
>>>>>> Software Engineer
>>>>>> WSO2 Inc.
>>>>>> lean . enterprise . middleware
>>>>>> http://wso2.com
>>>>>>
>>>>>> Mobile : +94777688882
>>>>>>
>>>>>> On Thu, May 19, 2016 at 3:43 PM, SajithAR Ariyarathna <
>>>>>> [email protected]> wrote:
>>>>>>
>>>>>>> Hi Sudharma,
>>>>>>>
>>>>>>> In the browser (client-side), you can do AJAX calls to the necessary
>>>>>>> REST APIs. However, doing HTTP requests from UI backend (which runs on 
>>>>>>> the
>>>>>>> server-side) to REST APIs (which also runs on the server-side) is not
>>>>>>> recommended. Instead of that you should call OSGi services. Calling OSGI
>>>>>>> services from server-side JS will be available in the next milestone of 
>>>>>>> UUF.
>>>>>>>
>>>>>>> Thanks.
>>>>>>>
>>>>>>> On Thu, May 19, 2016 at 2:21 PM, Sudharma Subasinghe <
>>>>>>> [email protected]> wrote:
>>>>>>>
>>>>>>>> Hi all,
>>>>>>>>
>>>>>>>> I am working on developing BPMN explorer ui using Unified UI
>>>>>>>> Framework.
>>>>>>>>
>>>>>>>> The existing BPMN explorer ui is for BPS which has built on C4 and
>>>>>>>> it is used Jaggery. So, I am working on BPMN explorer ui for BPS which 
>>>>>>>> is
>>>>>>>> to be released on C5.
>>>>>>>>
>>>>>>>> We need to implement business logics in backend. For example, I
>>>>>>>> need to send request to backend from browser, and from backend to BPS. 
>>>>>>>> Is
>>>>>>>> there functionality to achieve it in UUF?
>>>>>>>>
>>>>>>>> Any idea on this is appreciated.
>>>>>>>>
>>>>>>>> Thanks
>>>>>>>> Sudharma
>>>>>>>>
>>>>>>>> --
>>>>>>>> Sudharma Subasinghe,
>>>>>>>> Software Engineer,
>>>>>>>> WSO2 Inc.
>>>>>>>> Email: [email protected] <[email protected]>
>>>>>>>> Mobile : +94 710 565 157 <%2B94%20718%20210%20200>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Sajith Janaprasad Ariyarathna
>>>>>>> Software Engineer; WSO2, Inc.;  http://wso2.com/
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Architecture mailing list
>>>>>>> [email protected]
>>>>>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> With regards,
>>>>> *Manu*ranga Perera.
>>>>>
>>>>> phone : 071 7 70 20 50
>>>>> mail : [email protected]
>>>>>
>>>>> _______________________________________________
>>>>> Dev mailing list
>>>>> [email protected]
>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> Dev mailing list
>>>> [email protected]
>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>
>>>>
>>>
>>>
>>> --
>>> With Regards,
>>>
>>> *Rasika Perera*
>>> Software Engineer
>>> M: +94 71 680 9060 E: [email protected]
>>> LinkedIn: http://lk.linkedin.com/in/rasika90
>>>
>>> WSO2 Inc. www.wso2.com
>>> lean.enterprise.middleware
>>>
>>> _______________________________________________
>>> Dev mailing list
>>> [email protected]
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Nandika Jayawardana
>> WSO2 Inc ; http://wso2.com
>> lean.enterprise.middleware
>>
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Sanjiva Weerawarana, Ph.D.
> Founder, CEO & Chief Architect; WSO2, Inc.;  http://wso2.com/
> email: [email protected]; office: (+1 650 745 4499 | +94  11 214 5345)
> x5700; cell: +94 77 787 6880 | +1 408 466 5099; voip: +1 650 265 8311
> blog: http://sanjiva.weerawarana.org/; twitter: @sanjiva
> Lean . Enterprise . Middleware
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
--
Hasitha Aravinda,
Senior Software Engineer,
WSO2 Inc.
Email: [email protected]
Mobile : +94 718 210 200
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to