Re: [Dev] Issue while configuring LDAP for ES migration

2016-08-15 Thread Shakila Sivagnanarajah
Sorry mistyped the tag as 4.7.0. The correct tag is carbon-kernal (tag
v4.4.7).

On Tue, Aug 16, 2016 at 11:05 AM, Shakila Sivagnanarajah 
wrote:

> Hi all,
>
> I tried the above mentioned configuration [1] in wso2esb-5.0.0-BETA. I am
> able to login the carbon console using the specified admin user
> credentials (internala...@wso2.com and the corresponding password). But
> that configuration is not working for ES.
>
> I debugged the carbon-kernal (tag 4.7.0) and I share my findings here:
>
> The method authenticateInternal(userName, credential, domainProvided); throws
> 'org.wso2.carbon.user.core.UserStoreException’ exception like
> "InvalidOperationInvalid operation. User store is read only".
>
> Thank you.
>
> On Fri, Aug 12, 2016 at 6:34 PM, Shakila Sivagnanarajah 
> wrote:
>
>> Hi,
>>
>> I am working on ES migration to 2.1.0. The current store is 
>> wso2es-1.2.0-SNAPSHOT.
>> I am unable to login with the wso2 OT credentials if I use following LDAP
>> configuration [1]. By comparing the user-mgt.xml exist in
>> wso2es-1.2.0-SNAPSHOT [2] and wso2es-2.1.0-beta2 [1], I found that there
>> are some attributes are newly added [3] and some are removed [4].
>>
>> wso2es-1.2.0-SNAPSHOT contains - org.wso2.carbon.user.core_4.3.
>> 0.SNAPSHOT.jar
>> wso2es-2.1.0-beta2 contains- org.wso2.carbon.user.core_4.4.7.jar
>>
>> Can anyone help me to fix this?
>>
>> [1]
>>
>> 
>> 
>> 
>> true
>> admin
>> 
>> internala...@wso2.com
>> xxx
>> 
>> everyone 
>> true
>> jdbc/WSO2CarbonDB
>> 
>> > class="org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager">
>> > name="TenantManager">org.wso2.carbon.user.core.tenant.CommonHybridLDAPTenantManager
>> ldap://192.168.8.24:389
>> > name="ConnectionName">uid=internalapps.wso2.com,ou=user,dc=ldap,dc=wso2,dc=org
>> xxx
>> > name="UserSearchBase">ou=user,dc=ldap,dc=wso2,dc=org
>> mail
>> > name="UserNameSearchFilter">((objectClass=inetOrgPerson)(mail=?))
>> > name="UserNameListFilter">(objectClass=inetOrgPerson)
>> 
>> true
>> > name="GroupSearchBase">ou=group,dc=ldap,dc=wso2,dc=org
>> cn
>> > name="GroupNameSearchFilter">((objectClass=groupOfNames)(cn=?))
>> > name="GroupNameListFilter">(objectClass=groupOfNames)
>> member
>> false
>> > name="UsernameJavaRegEx">[a-zA-Z0-9._-|//]{3,30}$
>> ^[\S]{5,30}$
>> > name="RolenameJavaRegEx">[a-zA-Z0-9._-|//]{3,30}$
>> false
>> MD5
>> ,
>> 100
>> 100
>> true
>> true
>> 5000
>> 
>> 
>> > name="ReplaceEscapeCharactersAtUserLogin">true
>> 
>> > class="org.wso2.carbon.user.core.authorization.JDBCAuthorizationManager">
>> > name="AdminRoleManagementPermissions">/permission
>> true
>> false
>> 
>> 
>> 
>>
>> [2]
>>
>> 
>> 
>> 
>> true
>> admin
>> 
>> internala...@wso2.com
>> xxx
>> 
>> everyone 
>> jdbc/WSO2CarbonDB
>> 
>> > class="org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager">
>> > name="TenantManager">org.wso2.carbon.user.core.tenant.CommonHybridLDAPTenantManager
>> true
>> false
>> 100
>> > name="ConnectionURL">ldap://ldapmirror.wso2.org:389
>> > name="ConnectionName">uid=connectorstoreuser,ou=user,dc=ldap,dc=wso2,dc=org
>> y
>> MD5
>> > name="UserSearchBase">ou=user,dc=ldap,dc=wso2,dc=org
>> > name="UserNameListFilter">(objectClass=inetOrgPerson)
>> > name="UserNameSearchFilter">((objectClass=inetOrgPerson)(mail=?))
>> mail
>> true
>> > name="GroupSearchBase">ou=user,dc=ldap,dc=wso2,dc=org
>> > name="GroupNameListFilter">(objectClass=groupOfNames)
>> > name="GroupNameSearchFilter">((objectClass=groupOfNames)(cn=?))
>> cn
>> cn
>> > name="SharedGroupSearchBase">ou=SharedGroups,dc=wso2,dc=org
>> > name="SharedGroupNameListFilter">(objectClass=groupOfNames)
>> > name="SharedTenantNameListFilter">(objectClass=organizationalUnit)
>> ou
>> > name="SharedTenantObjectClass">organizationalUnit
>> member
>> true
>> > name="ReplaceEscapeCharactersAtUserLogin">true
>> 100
>> 100
>> false
>> 
>> > 
>> 

Re: [Dev] Issue while configuring LDAP for ES migration

2016-08-15 Thread Shakila Sivagnanarajah
Hi all,

I tried the above mentioned configuration [1] in wso2esb-5.0.0-BETA. I am
able to login the carbon console using the specified admin user
credentials (internala...@wso2.com and the corresponding password). But
that configuration is not working for ES.

I debugged the carbon-kernal (tag 4.7.0) and I share my findings here:

The method authenticateInternal(userName, credential, domainProvided); throws
'org.wso2.carbon.user.core.UserStoreException’ exception like
"InvalidOperationInvalid operation. User store is read only".

Thank you.

On Fri, Aug 12, 2016 at 6:34 PM, Shakila Sivagnanarajah 
wrote:

> Hi,
>
> I am working on ES migration to 2.1.0. The current store is 
> wso2es-1.2.0-SNAPSHOT.
> I am unable to login with the wso2 OT credentials if I use following LDAP
> configuration [1]. By comparing the user-mgt.xml exist in
> wso2es-1.2.0-SNAPSHOT [2] and wso2es-2.1.0-beta2 [1], I found that there
> are some attributes are newly added [3] and some are removed [4].
>
> wso2es-1.2.0-SNAPSHOT contains - org.wso2.carbon.user.core_4.3.
> 0.SNAPSHOT.jar
> wso2es-2.1.0-beta2 contains- org.wso2.carbon.user.core_4.4.7.jar
>
> Can anyone help me to fix this?
>
> [1]
>
> 
> 
> 
> true
> admin
> 
> internala...@wso2.com
> xxx
> 
> everyone 
> true
> jdbc/WSO2CarbonDB
> 
>  class="org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager">
>  name="TenantManager">org.wso2.carbon.user.core.tenant.CommonHybridLDAPTenantManager
> ldap://192.168.8.24:389
>  name="ConnectionName">uid=internalapps.wso2.com,ou=user,dc=ldap,dc=wso2,dc=org
> xxx
>  name="UserSearchBase">ou=user,dc=ldap,dc=wso2,dc=org
> mail
>  name="UserNameSearchFilter">((objectClass=inetOrgPerson)(mail=?))
>  name="UserNameListFilter">(objectClass=inetOrgPerson)
> 
> true
>  name="GroupSearchBase">ou=group,dc=ldap,dc=wso2,dc=org
> cn
>  name="GroupNameSearchFilter">((objectClass=groupOfNames)(cn=?))
>  name="GroupNameListFilter">(objectClass=groupOfNames)
> member
> false
>  name="UsernameJavaRegEx">[a-zA-Z0-9._-|//]{3,30}$
> ^[\S]{5,30}$
>  name="RolenameJavaRegEx">[a-zA-Z0-9._-|//]{3,30}$
> false
> MD5
> ,
> 100
> 100
> true
> true
> 5000
> 
> 
>  name="ReplaceEscapeCharactersAtUserLogin">true
> 
>  class="org.wso2.carbon.user.core.authorization.JDBCAuthorizationManager">
>  name="AdminRoleManagementPermissions">/permission
> true
> false
> 
> 
> 
>
> [2]
>
> 
> 
> 
> true
> admin
> 
> internala...@wso2.com
> xxx
> 
> everyone 
> jdbc/WSO2CarbonDB
> 
>  class="org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager">
>  name="TenantManager">org.wso2.carbon.user.core.tenant.CommonHybridLDAPTenantManager
> true
> false
> 100
>  name="ConnectionURL">ldap://ldapmirror.wso2.org:389
>  name="ConnectionName">uid=connectorstoreuser,ou=user,dc=ldap,dc=wso2,dc=org
> y
> MD5
>  name="UserSearchBase">ou=user,dc=ldap,dc=wso2,dc=org
>  name="UserNameListFilter">(objectClass=inetOrgPerson)
>  name="UserNameSearchFilter">((objectClass=inetOrgPerson)(mail=?))
> mail
> true
>  name="GroupSearchBase">ou=user,dc=ldap,dc=wso2,dc=org
>  name="GroupNameListFilter">(objectClass=groupOfNames)
>  name="GroupNameSearchFilter">((objectClass=groupOfNames)(cn=?))
> cn
> cn
>  name="SharedGroupSearchBase">ou=SharedGroups,dc=wso2,dc=org
>  name="SharedGroupNameListFilter">(objectClass=groupOfNames)
>  name="SharedTenantNameListFilter">(objectClass=organizationalUnit)
> ou
>  name="SharedTenantObjectClass">organizationalUnit
> member
> true
>  name="ReplaceEscapeCharactersAtUserLogin">true
> 100
> 100
> false
> 
>  
> class="org.wso2.carbon.user.core.authorization.JDBCAuthorizationManager">
>  name="AdminRoleManagementPermissions">/permission
> true
> 
> 
> 
>
> [3]
> 
> false
> [a-zA-Z0-9._-|//]{3,30}$ Property>
> ^[\S]{5,30}$
> [a-zA-Z0-9._-|//]{3,30}$ Property>
>  

Re: [Dev] [GSOC 16] Initial Project Progress

2016-08-15 Thread Isuru Haththotuwa
Hi Osura,

Can you please send an update on the current status?

On Mon, Aug 15, 2016 at 10:11 AM, Isuru Haththotuwa  wrote:

> Hi Osura,
>
> Few comments regarding the README:
>
>1. Need to mention how to configure the VM with the product pack and
>JDK for Azure
>2. There are lot of parameters in the template and parameters json
>files; please explain what a user needs to change there.
>3. The deploy script should be able to handle both standalone and
>distributed deployment pattern for the product. Refer to K8s repository as
>a reference [1]
>4. Highlights the commands that a user needs to issue clearly
>
> Please note a user should be able to deploy a WSO2 product in Azure by
> following the README. If we provide abstract and incomplete instructions,
> user experience will not be good.
>
> On Mon, Aug 15, 2016 at 9:05 AM, Osura Rathnayake 
> wrote:
>
>> Hi Imesh  /Isuru,
>>
>> Please accept my apologies for the delayed response.
>>
>> There is a MySQL instance in the Azure marketplace, we can straightaway
>> deploy that. It's a Ubuntu 16.04.1 LTS with MySQL installed. I think it's
>> better to use it as there won't be licensing issues with it.
>>
>> Please find the updated readme file in [1] which includes steps on how to
>> deploy WSO2 AS in Azure.
>>
>
>> About the undeploy.sh, should it remove the VM entirely or just the WSO2
>> AS instance?
>>
> Ideally we should be able to re-use the VM, so IMHO removing only the
> instance is ok.
>
> [1]. https://github.com/wso2/kubernetes-artifacts/tree/master/wso2as
>
>>
>> [1] https://github.com/osuran/azure-artifacts
>>
>> Thank you,
>>
>> On Sun, Aug 14, 2016 at 10:06 AM, Isuru Haththotuwa 
>> wrote:
>>
>>> Hi Osura,
>>>
>>> I see that you have updated the repo [1] with a deploy script for
>>> wso2as. Additionally we would need an undeploy script as well. What are the
>>> steps that I need to follow to deploy WSO2 AS on Azure? Can you please
>>> provide me a documentation link?
>>>
>>> [1]. https://github.com/osuran/azure-artifacts
>>>
>>> On Thu, Aug 11, 2016 at 10:22 AM, Isuru Haththotuwa 
>>> wrote:
>>>
 Hi Osura,

 Can you give an update on the latest status? I checked the github
 repositories under your account, but still can find only the membership
 scheme and a couple of templates. Did you add the scripts to
 deploy/undeploy the products? As we saw, its just a matter of copy pasting
 from the Azure management portal since the deployment script is auto
 generated.

 On Fri, Aug 5, 2016 at 10:56 AM, Imesh Gunaratne 
 wrote:

> On Fri, Aug 5, 2016 at 9:07 AM, Osura Rathnayake 
> wrote:
>
>> Hi Mentors,
>>
>> This is the progress so far.
>>
>> I have created a template, using which you can deploy 3 VMs, manager
>> node, worker node and a DB. This template can be used in any azure
>> subscription, you only have to do a template deployment using that
>> template. You have to pass the relevant VM images at the time of 
>> deployment
>> so for that I have created 5 VM images,
>>
>>1. WSO2 AS as manager
>>2. WSO2 AS as worker
>>3. WSO2 ESB as manager
>>4. WSO2 ESB as worker
>>5. DB
>>
>> ​Are you running a database server on a VM? On Azure it would be
> better to use their database service for creating databases otherwise
> managing databases on VMs would be difficult.
>
> These VM images are in my azure storage account so that prior to the
>> deployment, they have to be copied to the storage account of the 
>> customer.
>> Each VM image is approx 30 GB in size. Once you copied the images, you 
>> can
>> start the deployment using the template.
>> ​
>>
>
> ​Ideally we should have a configuration management system in place to
> manage this. It's an overhead to work with multiple VM images.
> ​
> ​
>
> Thanks
>
>
> --
> *Imesh Gunaratne*
> Software Architect
> WSO2 Inc: http://wso2.com
> T: +94 11 214 5345 M: +94 77 374 2057
> W: https://medium.com/@imesh TW: @imesh
> lean. enterprise. middleware
>
>
>


 --
 Thanks and Regards,

 Isuru H.
 +94 716 358 048* *



>>>
>>>
>>> --
>>> Thanks and Regards,
>>>
>>> Isuru H.
>>> +94 716 358 048* *
>>>
>>>
>>>
>>
>>
>> --
>> Regards,
>> Osura Rathnayake
>>
>
>
>
> --
> Thanks and Regards,
>
> Isuru H.
> +94 716 358 048* *
>
>
>


-- 
Thanks and Regards,

Isuru H.
+94 716 358 048* *
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [Gsoc2016] [PC] Web (Javascript / D3) based BPMN editor to support a subset of commonly used BPMN constructs

2016-08-15 Thread Heshan Jayasinghe
HI Chathura,

I completed both download and upload json file functionalities.now I am
working on few fixes that we discussed on last meeting.i will fix above
mention bugs too.

Thank You!

Regards,
Heshan Jayasinghe

On Mon, Aug 15, 2016 at 10:35 AM, Chathura Ekanayake 
wrote:

> Hi Heshan,
>
> It looks good so far.. However, there are few fixes to be done.
>
> - Properties box cannot be closed.
> - Circles in bending positions of edges have to be shown only when mouse
> gets over them
> - Gateways should allow multiple connection points (at least 4)
>
> Regards,
> Chathura
>
> On Fri, Aug 12, 2016 at 6:33 PM, Heshan Jayasinghe 
> wrote:
>
>> Hi All,
>> After 3 months contributing on Web based BPMN editor i completed
>> following tasks
>>
>>- drag and drop elements(start event/end event/gateway/task) from
>>tool box to drawing canvas
>>- display popup tool box with element(start event/end
>>event/gateway/task) on click event
>>- flow drawing to connect elements
>>- Implement element deleting functionality (using delete button in
>>toolbox)
>>
>> -delete only element if there no any flow connections
>> -delete element with flows if there any flows connected
>> to that element
>> -delete flows separately
>>
>>- drag elements in the Canvas to change position
>>- add flow button to toolbox and give flow drawing using toolbox
>>shortcut
>>- add property button to tool box and give change properties of the
>>elements one by one (properties changed according to to element so popup
>>window changed according to the element)
>>- add all sub elements to the toolbox and add all above
>>functionalities to those sub element (sub element icons changed with sub
>>element type)
>>
>>-  start events (default start events,error start
>> events,message start events,time start events)
>>-  end event (default end events,error end events,terminate
>> end events,cancel end events)
>>-  gateway (parallel gateway , exclusive gateway, inclusive
>> gateway ,event gateway )
>>-  task (user task, script task, mail task, manual task)
>>
>>- add task resizing functionality
>>- add text to task (user can change text of the task text entered in
>>the task element)
>>- change flow connections with element drag events (if we change
>>element position using drag and drop,flows connected to that element also
>>changed according to element new position)
>>- flow can be changed using multiple connection points
>>- create JSON array and record all date one by one inside that
>>array(element x/y coordinates,width,height,element type,element
>>subtype,properties,etc..)
>>- JSON array update x,y coordinates when we drag a element
>>
>> task on prosess
>>
>>- download json file
>>- upload json file and draw graph according to json file
>>
>>
>>
>>
>>
>>
>>
>> On Sat, Jul 30, 2016 at 11:46 PM, Heshan Jayasinghe 
>> wrote:
>>
>>> HI Hasitha,
>>>
>>> My git repo is up to date .please check develop
>>>  branch in
>>> GitHub.I completed task text and new flow drawing.now i am working on flow
>>> change with element drag events and text area resize with task resizing.
>>>  Thank you!
>>> regards,
>>> Heshan Jyasinghe
>>>
>>>
>>> On Thu, Jul 28, 2016 at 12:27 PM, Hasitha Aravinda 
>>> wrote:
>>>
 Heshan,

 Could you please update this mail with your current progress ? Also can
 you update the git repo with latest code base. It was last updated 23 days
 ago.

 Thanks,
 Hasitha.

 On Thu, Jul 14, 2016 at 9:25 AM, Heshan Jayasinghe 
 wrote:

> Hi,
> I added following element to BPMN tool box.I added only boundary
> events instead of Intermediate event because both look like same and last
> discussion we plan to come up with only boundary events.
> Intermediate event have
>   time catching event
>   Signal catching event
>   Message catching Event,etc.
> Boundary event have
>  Time Boundary Event
>  Error Boundary Event
>  Message Boundary Event
>  Signal Boundary Event,etc.
> Do I need to add both intermediate event and boundary event or only
> boundary event is enough?
> If there any changes in tool box please let me know.
>
> Start Event
>
>-  Start Event
>-  Time Event
>-  Message Start Event
>-  Error Start Event
>
> End Event
>
>-  End Event
>-  Error End Event
>-  Terminate End Even
>-  Cancel End Event
>
> Task
>
>-   User Task
>-   Script Task
>-   Mail Task
>-   Receive Task
>
> Boundary Event
>

Re: [Dev] Writing an OSGI Component to Create a Tenant during ESB Startup

2016-08-15 Thread Sanjiva Weerawarana
Guys how can a random tenant ID work? Isn't it necessary to use the same
tenant name that the user belongs to? Otherwise how will the data go into
the right space across all the artifacts (e.g. ESB things, APIs, ..) that
the user may have in the cloud?

On Thu, Aug 11, 2016 at 11:43 AM, Maheeka Jayasuriya 
wrote:

> Hi Kishanthan,
>
> Yes I tested by providing a random TenantID which were not available in
> the ESB pack earlier (screenshot attached). We are building the docker
> image from a vanilla ESB pack and hence there won't be any other tenants in
> the pack.
>
> ​
>  Screen Shot 2016-08-11 at 11.42.29 AM.png
> 
> ​
>
> Thanks,
> Maheeka
>
> Maheeka Jayasuriya
> Senior Software Engineer
> Mobile : +9450661
>
> On Thu, Aug 11, 2016 at 11:36 AM, Kishanthan Thangarajah <
> kishant...@wso2.com> wrote:
>
>> No, I may be wrong. This approach will work if the given tenant-id is not
>> taken already at the table level.
>>
>> On Thu, Aug 11, 2016 at 11:32 AM, Kishanthan Thangarajah <
>> kishant...@wso2.com> wrote:
>>
>>>
>>>
>>> On Thu, Aug 11, 2016 at 7:56 AM, Maheeka Jayasuriya 
>>> wrote:
>>>
 Hi Devs,


 We need to start an ESB in a docker container, with a capp deployed in
 tenant space. So in order to have the tenant space already created and to
 get the tenant initialized when the container is serving requests, we have
 tried out the following approach manually which works.


1.

Have the capp copied to [ESB_HOME]/repository/tenants/[tenantId]/
when building the docker image. This tenantId may not be incremental and
could be any number
2.

Run the docker and wait for ESB to start
3.

Invoke the TenantMgtAdminService’s addTenant method specifying the
‘tenantId’ and  other tenant details (username, password, etc)
4.

Invoke an API that is available in the copied capp (1) to
initialize the tenant


 Basically, we need to have the tenant space created during ESB server
 startup. Tenant could be initialized later for the first request. Therefore
 we started writing an OSGI declarative component which waits for
 TenantMgtServiceComponent and calls the TenantMgtAdminService to create the
 tenant. The capps will be already copied to the tenant space when building
 the docker image. Following is what we have tried so far.


1.

When trying to write a new OSGI component, say
TenantInitializerComponent, we wanted to add a TenantMgtServiceComponent
registered OSGI service as dependency. But there were no OSGI services
available in either of any tenant management components. Due to this we
were not able to get the TenantInitializerComponent activated.
2.

Since there were no OSGI services of TenantMgtServiceComponent
available, we tried by adding the dependencies of 
 TenantMgtServiceComponent
to TenantInitializerComponent as below.

 * @scr.reference name="org.wso2.carbon.tenant.mgt.listener.service"

 *interface="org.wso2.carbon.stratos.common.lis
 teners.TenantMgtListener"

 *cardinality="1..n" policy="dynamic"

 *bind="setTenantMgtListenerService"

 *unbind="unsetTenantMgtListenerService"

 * @scr.reference name="default.tenant.billing.service"

 *interface="org.wso2.carbon.stratos.common.Ten
 antBillingService"

 *cardinality="0..1" policy="dynamic"

 *bind="setTenantBillingService"

 *unbind="unsetTenantBillingService"

 TenantMgtListener is available in ESB and therefore set the cardinality
 to 1..n. TenantBillingService is not available in ESB and hence cardinality
 is 0..1.

 Following is the implementation in the TenantInitializerComponent’s
 activate method.

 TenantMgtAdminService tenantMgtAdminService = new
 TenantMgtAdminService();

 TenantInfoBean tenantInfoBean = new TenantInfoBean();

 tenantInfoBean.setActive(true);

 tenantInfoBean.setAdmin("admin");

 tenantInfoBean.setAdminPassword("admin123");

 tenantInfoBean.setFirstname("Maheeka");

 tenantInfoBean.setLastname("Maheeka");

 tenantInfoBean.setEmail("ad...@maheeka.com");

 tenantInfoBean.setTenantDomain("maheeka.com");

 tenantInfoBean.setSuccessKey("");

 tenantInfoBean.setTenantId(250);

>>>
>>> This may not work because, the tenant id is generated and returned by
>>> the tenant persister once a new tenant is persisted properly in DB. The
>>> tenant id is basically the row id in the table.
>>>
>>> Did 

Re: [Dev] [MB][C5] How to write unit tests to mock the user core?

2016-08-15 Thread Omindu Rathnaweera
+1 for using mockito.

@Jayanga, Malithi: I guess this is something we can use in CAAS and the
connectors, as we don't have unit test for the moment.

Regards,
Omindu.

On Mon, Aug 15, 2016 at 8:00 PM, Manuranga Perera  wrote:

> In UUF tests we are using mockito, its very convenient, please give it a
> try.
>
> On Mon, Aug 15, 2016 at 3:42 PM, Ramith Jayasinghe 
> wrote:
>
>> please disregard above noise!
>>
>> On Mon, Aug 15, 2016 at 3:36 PM, Ramith Jayasinghe 
>> wrote:
>>
>>> this needs to be a public email isn't it?
>>>
>>> On Mon, Aug 15, 2016 at 2:10 PM, Sajini De Silva 
>>> wrote:
>>>
 Hi,

 I have finished the first stage of MB authorization model for C5. Now I
 need to test the model by writing some test cases. Now user core is outside
 of MB how do we mock the user core in test cases. Is there any samples for
 this?

 Thanks,

 --
 Sajini De SIlva
 Senior Software Engineer; WSO2 Inc.; http://wso2.com ,
 Email: saj...@wso2.com
 Blog: http://sajinid.blogspot.com/
 Git hub profile: https://github.com/sajinidesilva

 Phone: +94 712797729


>>>
>>>
>>> --
>>> Ramith Jayasinghe
>>> Technical Lead
>>> WSO2 Inc., http://wso2.com
>>> lean.enterprise.middleware
>>>
>>> E: ram...@wso2.com
>>> P: +94 772534930
>>>
>>
>>
>>
>> --
>> Ramith Jayasinghe
>> Technical Lead
>> WSO2 Inc., http://wso2.com
>> lean.enterprise.middleware
>>
>> E: ram...@wso2.com
>> P: +94 772534930
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> With regards,
> *Manu*ranga Perera.
>
> phone : 071 7 70 20 50
> mail : m...@wso2.com
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Omindu Rathnaweera
Software Engineer, WSO2 Inc.
Mobile: +94 771 197 211
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Supporting registry based parameter values in all Inbound Endpoints

2016-08-15 Thread Nuwan Wimalasekara
Hi Gayan,

Please refer the documentation[1] for how to secure the parameters using
secure vault.

[1] https://docs.wso2.com/display/ESB500/Working+with+Passwords

Thanks,
Nuwanw

On Sat, Aug 13, 2016 at 8:35 AM, Chanaka Fernando  wrote:

> Please refer [1].
>
> [1] https://wso2.org/jira/browse/ESBJAVA-4715
>
> On Sat, Aug 13, 2016 at 12:04 AM, Gayan Gunarathne 
> wrote:
>
>> Are we support to use inbound endpoints with secure vault based
>> parameters in ESB 5.0.0? If then could you please share some pointers how
>> to use that?
>>
>> Thanks,
>> Gayan
>>
>> On Tue, Jun 28, 2016 at 5:31 PM, Kasun Indrasiri  wrote:
>>
>>> The other aspect is the outbound side. For instance, for outbound
>>> messaging we don't have a way to retries credentials from ESB secure vault?
>>>
>>> On Tue, Jun 21, 2016 at 10:20 AM, Kasun Indrasiri 
>>> wrote:
>>>
 Hi,

 $subject is quite important when it comes to developing inbound
 endpoints and bind them to specific environments (with the use of registry
 key values paris). Also, at the same time we need to get this integrated to
 secure vault based parameters which are encrypted.

 Thanks,
 Kasun

 --
 Kasun Indrasiri
 Software Architect
 WSO2, Inc.; http://wso2.com
 lean.enterprise.middleware

 cell: +94 77 556 5206
 Blog : http://kasunpanorama.blogspot.com/

>>>
>>>
>>>
>>> --
>>> Kasun Indrasiri
>>> Software Architect
>>> WSO2, Inc.; http://wso2.com
>>> lean.enterprise.middleware
>>>
>>> cell: +94 77 556 5206
>>> Blog : http://kasunpanorama.blogspot.com/
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>>
>> Gayan Gunarathne
>> Technical Lead, WSO2 Inc. (http://wso2.com)
>> Committer & PMC Member, Apache Stratos
>> email : gay...@wso2.com  | mobile : +94 775030545 <%2B94%20766819985>
>>
>>
>>
>
>
>
> --
> Thank you and Best Regards,
> Chanaka Fernando
> Senior Technical Lead
> m: +94 773337238
> https://wso2.com 
>
>
>
>
>
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Nuwan Wimalasekara
Associate Technical Lead
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware

phone: +94 71 668 4620
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [MB][C5] How to write unit tests to mock the user core?

2016-08-15 Thread Manuranga Perera
In UUF tests we are using mockito, its very convenient, please give it a
try.

On Mon, Aug 15, 2016 at 3:42 PM, Ramith Jayasinghe  wrote:

> please disregard above noise!
>
> On Mon, Aug 15, 2016 at 3:36 PM, Ramith Jayasinghe 
> wrote:
>
>> this needs to be a public email isn't it?
>>
>> On Mon, Aug 15, 2016 at 2:10 PM, Sajini De Silva  wrote:
>>
>>> Hi,
>>>
>>> I have finished the first stage of MB authorization model for C5. Now I
>>> need to test the model by writing some test cases. Now user core is outside
>>> of MB how do we mock the user core in test cases. Is there any samples for
>>> this?
>>>
>>> Thanks,
>>>
>>> --
>>> Sajini De SIlva
>>> Senior Software Engineer; WSO2 Inc.; http://wso2.com ,
>>> Email: saj...@wso2.com
>>> Blog: http://sajinid.blogspot.com/
>>> Git hub profile: https://github.com/sajinidesilva
>>>
>>> Phone: +94 712797729
>>>
>>>
>>
>>
>> --
>> Ramith Jayasinghe
>> Technical Lead
>> WSO2 Inc., http://wso2.com
>> lean.enterprise.middleware
>>
>> E: ram...@wso2.com
>> P: +94 772534930
>>
>
>
>
> --
> Ramith Jayasinghe
> Technical Lead
> WSO2 Inc., http://wso2.com
> lean.enterprise.middleware
>
> E: ram...@wso2.com
> P: +94 772534930
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
With regards,
*Manu*ranga Perera.

phone : 071 7 70 20 50
mail : m...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [PC] Undeploying a web app when activating a specific profile

2016-08-15 Thread Sameera Gunarathne
Hi all,

I tried to add two profiles for process publisher & store and process
analytics other than the default profile in Process Center. When I activate
the publisher-store profile, analytics related web app (analytics.war) is
deployed with other web apps and since there are no analytics features
available for this profile I get the following error:

ERROR {org.apache.catalina.core.ApplicationContext} -
 StandardWrapper.Throwable
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'analyticsServices': Cannot resolve reference to bean
'analyticsBean' while setting bean property 'serviceBeans' with key [0];
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'analyticsBean' defined in URL
[jndi:/localhost/analytics/WEB-INF/cxf-servlet.xml]: Instantiation of bean
failed; nested exception is java.lang.NoClassDefFoundError:
org/wso2/carbon/analytics/datasource/commons/exception/AnalyticsException
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.
resolveReference(BeanDefinitionValueResolver.java:328)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.
resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.
resolveManagedList(BeanDefinitionValueResolver.java:353)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.
resolveValueIfNecessary(BeanDefinitionValueResolver.java:153)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
tory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1327)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
tory.populateBean(AbstractAutowireCapableBeanFactory.java:1085)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
tory.doCreateBean(AbstractAutowireCapableBeanFactory.java:516)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
tory.createBean(AbstractAutowireCapableBeanFactory.java:455)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.
getObject(AbstractBeanFactory.java:293)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.
getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(
AbstractBeanFactory.java:290)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(
AbstractBeanFactory.java:192)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.
preInstantiateSingletons(DefaultListableBeanFactory.java:585)
at org.springframework.context.support.AbstractApplicationContext.
finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
at org.springframework.context.support.AbstractApplicationContext.refresh(
AbstractApplicationContext.java:425)
at org.apache.cxf.transport.servlet.CXFServlet.createSpringContext(
CXFServlet.java:151)
at org.apache.cxf.transport.servlet.CXFServlet.loadBus(CXFServlet.java:74)
at org.apache.cxf.transport.servlet.CXFNonSpringServlet.
init(CXFNonSpringServlet.java:76).

Is there a way I can prevent deploying or undeploy this web app when
activating a  specific profile which is not required analytics features?
Any help is appreciated.

Thanks,
Regards,
Sameera Gunarathne.
-- 
Sameera Gunarathne
Software Engineer, WSO2 Inc. http://wso2.com

Email: samee...@wso2.com
Mobile: +94714155561
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Running the MSF4J petstore sample using Docker compose?

2016-08-15 Thread Lakmal Warusawithana
+1 Azeez, it's very simple to use.

On Monday, August 15, 2016, Afkham Azeez  wrote:

> Hi folks,
> What do you think about $subject? It seems like it will simplify things
> quite a lot when it comes to running the sample. Thoughts welcome.
>
> Thanks
> Azeez
>
> --
> *Afkham Azeez*
> Director of Architecture; WSO2, Inc.; http://wso2.com
> Member; Apache Software Foundation; http://www.apache.org/
> * *
> *email:**az...@wso2.com* 
> * cell: +94 77 3320919blog:**http://blog.afkham.org*
> 
> *twitter:**http://twitter.com/afkham_azeez*
> 
> *linked-in:**http://lk.linkedin.com/in/afkhamazeez
> *
>
> *Lean . Enterprise . Middleware*
>


-- 
Sent from Gmail Mobile
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Running the MSF4J petstore sample using Docker compose?

2016-08-15 Thread Afkham Azeez
Hi folks,
What do you think about $subject? It seems like it will simplify things
quite a lot when it comes to running the sample. Thoughts welcome.

Thanks
Azeez

-- 
*Afkham Azeez*
Director of Architecture; WSO2, Inc.; http://wso2.com
Member; Apache Software Foundation; http://www.apache.org/
* *
*email:**az...@wso2.com* 
* cell: +94 77 3320919blog:**http://blog.afkham.org*

*twitter:**http://twitter.com/afkham_azeez*

*linked-in:**http://lk.linkedin.com/in/afkhamazeez
*

*Lean . Enterprise . Middleware*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [MB][C5] How to write unit tests to mock the user core?

2016-08-15 Thread Ramith Jayasinghe
please disregard above noise!

On Mon, Aug 15, 2016 at 3:36 PM, Ramith Jayasinghe  wrote:

> this needs to be a public email isn't it?
>
> On Mon, Aug 15, 2016 at 2:10 PM, Sajini De Silva  wrote:
>
>> Hi,
>>
>> I have finished the first stage of MB authorization model for C5. Now I
>> need to test the model by writing some test cases. Now user core is outside
>> of MB how do we mock the user core in test cases. Is there any samples for
>> this?
>>
>> Thanks,
>>
>> --
>> Sajini De SIlva
>> Senior Software Engineer; WSO2 Inc.; http://wso2.com ,
>> Email: saj...@wso2.com
>> Blog: http://sajinid.blogspot.com/
>> Git hub profile: https://github.com/sajinidesilva
>>
>> Phone: +94 712797729
>>
>>
>
>
> --
> Ramith Jayasinghe
> Technical Lead
> WSO2 Inc., http://wso2.com
> lean.enterprise.middleware
>
> E: ram...@wso2.com
> P: +94 772534930
>



-- 
Ramith Jayasinghe
Technical Lead
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

E: ram...@wso2.com
P: +94 772534930
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [MB][C5] How to write unit tests to mock the user core?

2016-08-15 Thread Ramith Jayasinghe
this needs to be a public email isn't it?

On Mon, Aug 15, 2016 at 2:10 PM, Sajini De Silva  wrote:

> Hi,
>
> I have finished the first stage of MB authorization model for C5. Now I
> need to test the model by writing some test cases. Now user core is outside
> of MB how do we mock the user core in test cases. Is there any samples for
> this?
>
> Thanks,
>
> --
> Sajini De SIlva
> Senior Software Engineer; WSO2 Inc.; http://wso2.com ,
> Email: saj...@wso2.com
> Blog: http://sajinid.blogspot.com/
> Git hub profile: https://github.com/sajinidesilva
>
> Phone: +94 712797729
>
>


-- 
Ramith Jayasinghe
Technical Lead
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

E: ram...@wso2.com
P: +94 772534930
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [Axis2][DSS] Pathparams in http POST request are not added to message context

2016-08-15 Thread Manuri Amaya Perera
Hi,

In DSS, when we send a POST request to a service with path parameters,
eg:
http://localhost:9763/services/DS1221/post/3
-H'Content-Type:application/xml'
-d'<_postpost_id>Jacktest'

where, the resource template in DSS is "post/{id}", the "id" parameter
doesn't get added to the message context at axis2 level. [1]

But for GET requests the path parameter is added.
eg: http://localhost:9763/services/DS1221/get/1


It seems, in XFormURLEncodedBuilder[2], which gets hit in the case of GET
request, path params are extracted from request, but
in ApplicationXMLBuilder[3] which gets hit in the case of POST request, it
doesn't happen.

This seems to be a bug, but could there be any reason behind not adding
this in ApplicationXMLBuilder?


[1] https://wso2.org/jira/browse/DS-1221

[2]
https://github.com/wso2/wso2-axis2/blob/master/modules/kernel/src/org/apache/axis2/builder/XFormURLEncodedBuilder.java#L99

[3]
https://github.com/wso2/wso2-axis2/blob/master/modules/kernel/src/org/apache/axis2/builder/ApplicationXMLBuilder.java


​Thanks,
Manuri​

-- 

*Manuri Amaya Perera*

*Software Engineer*

*WSO2 Inc.*

*Blog: http://manuriamayaperera.blogspot.com
*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Expose a health check endpoint in WSO2 products

2016-08-15 Thread Akila Ravihansa Perera
Hi,

Having a product specific health check endpoint would help deployments in
platforms like Kubernetes, DockerSwarm, Mesos etc. in which we can
configure a health check. The deployment platform will call to this
endpoint to query the status of the deployed service and re-spin the
instances if they are not healthy for a given period of time.

 It is basically another REST API service when queried will return HTTP
status code in the range of 200-300 if the internal components are
operating as expected.
For eg. in case of API-Gateway this can be an embedded dummy API so that we
can make sure Synapse transport is up and running. In case of
Identity-Server we can check the connection to userstores/DBs and expose
the status as a REST API.

Thanks.

-- 
Akila Ravihansa Perera
WSO2 Inc.;  http://wso2.com/

Blog: http://ravihansa3000.blogspot.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [MB][C5] How to write unit tests to mock the user core?

2016-08-15 Thread Sajini De Silva
Hi,

I have finished the first stage of MB authorization model for C5. Now I
need to test the model by writing some test cases. Now user core is outside
of MB how do we mock the user core in test cases. Is there any samples for
this?

Thanks,

-- 
Sajini De SIlva
Senior Software Engineer; WSO2 Inc.; http://wso2.com ,
Email: saj...@wso2.com
Blog: http://sajinid.blogspot.com/
Git hub profile: https://github.com/sajinidesilva

Phone: +94 712797729
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [ESB] Synapse Endpoint timeout handling configuration not honoured while VFS Lock aquire

2016-08-15 Thread Ruwan Abeykoon
Hi ESB team,
I observed the $subject while examining another issue in VFS transport.

I have done timeout handling on SMB file system with VFS file endpoint
following [1]
My SMB authentication has intermittent issue not authorizing file creation
for random calls. When it hits "acquireLock", the endpoint goes to VFS
default timeout, not my synapse timeout(which is no timeout).

[2016-08-15 12:01:23,469]  WARN - VFSTransportSender Couldn't get the lock
for the file : smb://xx":***@"yyy/zzz/file-out/Resp-1066.txt, retry : 1
scheduled after : 3

I do not think this is expected behaviour.

Close examination point to [2], which I think needs to be corrected. I do
not think we need the "wait till we get the lock" segment. I suggest to let
it fail fast when it can not acquire the lock.


WDYT?


[1]
http://miyurudw.blogspot.com/2012/02/disable-suspension-of-wso2-esb-synapse.html

[2]
https://github.com/wso2/wso2-synapse/blob/3a6b25a195bbeb95c638730d7678d7a7a8ffb831/modules/transports/core/vfs/src/main/java/org/apache/synapse/transport/vfs/VFSTransportSender.java#L429


Cheers,

Ruwan
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Stroring event data in tables in addition to display

2016-08-15 Thread Tharik Kanaka
Hi Aneela,

At the moment gadget generation framework provides to select realtime or
database provider. So if you select database provider it will not push data
like in realtime provider but refresh the gadget after configured time
interval.

When it comes to WSO2 DAS there is a batch provider option in gadget
generation where as you can directly configure a DAS event table. These
event tables will be maintained for persisted streams. CEP is used to for
real time processing and those streams are not meant to persist event but
you can persist streams in DAS which could be configured to get events from
a Siddhi Execution plan and create a gadget on that persisted streams event
table.

Regards,

On Sun, Aug 14, 2016 at 4:57 PM, Aneela Safdar  wrote:

> Hi,
>
> I have been doing  a project in wso2cep to take some log files, perform
> queries in execution plans and then direct results to dashboard where a bar
> chart is displaying them.
>
> In addition to just showing bars of events, now I want to store the data
> in db too so I could see what happened previously and so. Till now I have
> only worked with streams and there are few questions I need to ask before
> moving to tables.
>
>
>- Should I be installing and configuring a new database as there are
>some options given in documentation or I will be able to work with default
>database and configurations?
>- Do tables and streams both work side by side or I have to shift to
>one of them as when I create a gadget, it first asks me about source that
>is it a stream or table?
>
>
> Thanks,
>
> Regards,
> Aneela Safdar
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

*Tharik Kanaka*

WSO2, Inc | lean . enterprise . middleware

Email: tha...@wso2.com | Web: www.wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev