Re: [Dev] Custom UserStore works on 5.1.0, 5.2.0 not working in 5.3.0 and 5.4.0-M1

2017-06-21 Thread Isura Karunaratne
Hi

On Wed, Jun 21, 2017 at 11:06 AM, Farasath Ahamed 
wrote:

>
>
>
>
> On Wed, Jun 21, 2017 at 11:03 AM, Isura Karunaratne 
> wrote:
>
>>
>>
>> On Tue, Jun 20, 2017 at 11:29 PM, Johann Nallathamby 
>> wrote:
>>
>>> If these two handlers are disabled by default there shouldn't be any
>>> problem. According to default identity-event.properties file they are
>>> disabled. How come they get triggered then?
>>>
>>
>> Yes. By default the account lock/disabled features are disabled. If it is
>> required to use account lock/disable features, there should be a way to
>> store user properties.
>>
>
> Looks like we haven't used the property to check whether the listener is
> enabled or disabled although we have defined in identity-event.properties.
> Therefore the handlers get fired on pre-authentications
>

Yes. This issue is fixed with https://wso2.org/jira/browse/IDENTITY-6091

Thanks
Isura.

>
>
>>
>> Also, if the um_user_attribute table is not there, most of the use cases
>> will be broken. (Add User/ Update User/ Get  Users ...). So, I think that
>> user store is incomplete.
>>
>> Thanks
>> Isura.
>>
>>
>>>
>>> On Tue, Jun 20, 2017 at 7:25 PM, Farasath Ahamed 
>>> wrote:
>>>
 Hi,

 The minimum requirement to write a custom JDBC user store manager so
 far (before IS 5.3.0) was to simply override the doAuthenticate() method.
 So a custom user store that was written for 5.0.0 worked without any
 modifications (may be dependency changes).

 But when we use the same code on IS 5.3.0, the custom user store
 implementations that only override the doAuthenticate() are broken because
 account disabled[1] and account locked[2] handlers introduced in IS 5.3.0.

 These two handlers call the getUserClaimValues() method of the
 userstore to retrieve some claims. Since we haven't overridden the method
 in custom userstore implementation it calls the super class. This leads to
 trying to find the claims from a non-existing table[3].

 One way to solve is to override the getUserClaimValues() method. But in
 the PoV of the extension developer, this would be an unnecessary step if
 the custom user store is just used for authentication only as explained in
 [4].

 Even in the official docs[5], we do not have any mention of having to
 implement the getUserClaimValues() method.

 What would be the correct and the most efficient way to resolve this?
 Appreciate your thoughts.



 [1] https://github.com/wso2-extensions/identity-event-handle
 r-account-lock/blob/master/components/org.wso2.carbon.identi
 ty.handler.event.account.lock/src/main/java/org/wso2/carbon/
 identity/handler/event/account/lock/AccountDisableHandler.java#L89

 [2] https://github.com/wso2-extensions/identity-event-handle
 r-account-lock/blob/master/components/org.wso2.carbon.identi
 ty.handler.event.account.lock/src/main/java/org/wso2/carbon/
 identity/handler/event/account/lock/AccountLockHandler.java#L186

 [3] https://wso2.org/jira/browse/IDENTITY-6074?focusedCommen
 tId=134555=com.atlassian.jira.plugin.system.issuetabpan
 els:comment-tabpanel#comment-134555

 [4] https://wso2.org/jira/browse/IDENTITY-6074




 Thanks,
 Farasath Ahamed
 Software Engineer, WSO2 Inc.; http://wso2.com
 Mobile: +94777603866
 Blog: blog.farazath.com
 Twitter: @farazath619 
 



>>>
>>>
>>> --
>>> Thanks & Regards,
>>>
>>> *Johann Dilantha Nallathamby*
>>> Senior Technical Lead - WSO2 Identity Server
>>> Governance Technologies Team
>>> WSO2, Inc.
>>> lean.enterprise.middleware
>>>
>>> Mobile - *+9476950*
>>> Blog - *http://nallaa.wordpress.com *
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>>
>> *Isura Dilhara Karunaratne*
>> Senior Software Engineer | WSO2
>> Email: is...@wso2.com
>> Mob : +94 772 254 810 <+94%2077%20225%204810>
>> Blog : http://isurad.blogspot.com/
>>
>>
>>
>>
>


-- 

*Isura Dilhara Karunaratne*
Senior Software Engineer | WSO2
Email: is...@wso2.com
Mob : +94 772 254 810
Blog : http://isurad.blogspot.com/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Issue in Proxy service

2017-06-21 Thread Lipsa Pradhan
Thanks for the advice.

I had already tried this out. Actually now I am getting output using the
following endpoint :
"
https://localhost:8243/services/fetchEmpNewProxy.fetchEmpNewProxyHttpsSoap12Endpoint
"

But when I use 
"https://*[machine-name]*:8243/services/fetchEmpNewProxy.fetchEmpNewProxyHttpsSoap12Endpoint;
endpoint using the "machine-name" I am getting an error message that
"Enable to validate SSL certificate for https://
[machine-name]:8243/services/fetchEmpNewProxy.fetchEmpNewProxyHttpsSoap12Endpoint"

On Tue, Jun 20, 2017 at 12:19 PM, Nuwan Wimalasekara 
wrote:

> Hi Lipsa,
>
> In your service configuration, You have enabled only https transport as
> the transport of the service. You have to either enable to http transport
> for the service or send the https request instead of http request from the
> client.
>
> Thanks,
> Nuwanw
>
> On Tue, Jun 20, 2017 at 10:56 AM, Lipsa Pradhan  adnatesolutions.com> wrote:
>
>> Hello everyone,
>>
>> I had made a proxy service of one my dataservices. But I'm facing the
>> following error :
>>
>> 
>>   Expected transport is "https" but incoming 
>> transport found : "http" 
>> 
>>
>>
>> How to resolve this?
>>
>> Regards
>> Lipsa Pradhan
>>
>> ___
>> 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] [Carbon] Build fail in cerbon4-kernel source code.

2017-06-21 Thread KasunG Gajasinghe
We can use add this property into Jenkins. Adding @Maheshika. It's better
if we can do this in global-level instead of per job.

Thanks,
KasunG

On Wed, Jun 21, 2017 at 11:41 AM, Maduranga Siriwardena 
wrote:

> Using the java.util.Arrays.useLegacyMergeSort jvm parameter with the
> maven command like below solved the problem
>
> _JAVA_OPTIONS=-Djava.util.Arrays.useLegacyMergeSort=true mvn clean install
>
> Thanks Farasath and Jayanga for the solution.
>
> On Thu, Mar 24, 2016 at 4:01 PM, Aruna Karunarathna 
> wrote:
>
>>
>>
>> On Wed, Mar 23, 2016 at 7:08 PM, Maduranga Siriwardena <
>> madura...@wso2.com> wrote:
>>
>>> Any ideas how to resolve this issue?
>>>
>>
>> Hi Maduranga,
>>
>> I tried with both JDK 7 and 8 and the 4.4.x branch built without any
>> issue.
>>
>> Can you try building with a clean maven repo?
>>
>> Regards,
>> Aruna
>>
>>>
>>> Thanks,
>>> Maduranga
>>>
>>> On Tue, Sep 1, 2015 at 11:10 AM, Maduranga Siriwardena <
>>> madura...@wso2.com> wrote:
>>>
 Hi all,

 Anyone know how to fix this? I keep on getting this error

 Failed to execute goal org.apache.felix:maven-scr-plugin:1.7.4:scr
 (generate-scr-scrdescriptor) on project org.wso2.carbon.core: Execution
 generate-scr-scrdescriptor of goal 
 org.apache.felix:maven-scr-plugin:1.7.4:scr
 failed: Comparison method violates its general contract! -> [Help 1]

 Thanks,
 Maduranga

 On Fri, Jun 12, 2015 at 11:16 AM, Maduranga Siriwardena <
 madura...@wso2.com> wrote:

> Hi Thusitha,
>
> I have tried to build both master branch and release-4.4.0 branch.
>
> I have java version "1.7.0_80" and Apache Maven 3.0.5
>
> On Fri, Jun 12, 2015 at 11:05 AM, Thusitha Thilina Dayaratne <
> thusit...@wso2.com> wrote:
>
>> Hi Maduranga,
>>
>> If you are trying to build the master branch from github use JDK7  or
>> 8 with maven 3.0.x.
>> This will help you https://docs.wso2.com/disp
>> lay/Carbon440/Installation+Prerequisites
>>
>> Thanks
>>
>> On Fri, Jun 12, 2015 at 10:57 AM, Thusitha Thilina Dayaratne <
>> thusit...@wso2.com> wrote:
>>
>>> Hi Madhuranga,
>>>
>>> I just checkout the master branch and built without any issues.
>>> May be some compatible issues with maven and jdk versions?
>>>
>>> Thanks
>>>
>>> On Fri, Jun 12, 2015 at 10:39 AM, Maduranga Siriwardena <
>>> madura...@wso2.com> wrote:
>>>
 Hi all,

 I tried to build carbon4-kernel and I got the below error.

 *Failed to execute goal org.apache.felix:maven-scr-plugin:1.7.4:scr
 (generate-scr-scrdescriptor) on project org.wso2.carbon.core: Execution
 generate-scr-scrdescriptor of goal
 org.apache.felix:maven-scr-plugin:1.7.4:scr failed: Comparison method
 violates its general contract!*

 Such a problem is reported in apache felix plugin version 1.7.4
 [1]. So I changed the version of the maven scr plugin to 1.8.0 and if I
 resume the build, it build successfully.

 But if I build the code again from the beginning, I get below error
 from *org.wso2.carbon.registry.core* which is built before
 *org.wso2.carbon.core*.

 *[ERROR] Bundle
 org.wso2.carbon:org.wso2.carbon.registry.core:bundle:4.4.1-SNAPSHOT : 
 Input
 file does not exist:
 target/scr-plugin-generated/OSGI-INF/serviceComponents.xml*

 Seems to be it is not generating the OSGI-INF. Any help how to
 build source successfully?

 [1] https://issues.apache.org/jira/browse/FELIX-3571

 Thank you.
 --
 Maduranga Siriwardena
 Software Engineer
 WSO2 Inc.

 email: madura...@wso2.com
 mobile: +94718990591

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


>>>
>>>
>>> --
>>> Thusitha Dayaratne
>>> Software Engineer
>>> WSO2 Inc. - lean . enterprise . middleware |  wso2.com
>>>
>>> Mobile  +94712756809
>>> Blog  alokayasoya.blogspot.com
>>> Abouthttp://about.me/thusithathilina
>>>
>>>
>>
>>
>> --
>> Thusitha Dayaratne
>> Software Engineer
>> WSO2 Inc. - lean . enterprise . middleware |  wso2.com
>>
>> Mobile  +94712756809
>> Blog  alokayasoya.blogspot.com
>> Abouthttp://about.me/thusithathilina
>>
>>
>
>
> --
> Maduranga Siriwardena
> Software Engineer
> WSO2 Inc.
>
> email: madura...@wso2.com
> mobile: +94718990591
>



 --
 Maduranga Siriwardena
 Software Engineer
 WSO2 Inc.

 email: madura...@wso2.com
 mobile: 

Re: [Dev] [Carbon] Build fail in cerbon4-kernel source code.

2017-06-21 Thread Maduranga Siriwardena
Using the java.util.Arrays.useLegacyMergeSort jvm parameter with the maven
command like below solved the problem

_JAVA_OPTIONS=-Djava.util.Arrays.useLegacyMergeSort=true mvn clean install

Thanks Farasath and Jayanga for the solution.

On Thu, Mar 24, 2016 at 4:01 PM, Aruna Karunarathna  wrote:

>
>
> On Wed, Mar 23, 2016 at 7:08 PM, Maduranga Siriwardena  > wrote:
>
>> Any ideas how to resolve this issue?
>>
>
> Hi Maduranga,
>
> I tried with both JDK 7 and 8 and the 4.4.x branch built without any issue.
>
> Can you try building with a clean maven repo?
>
> Regards,
> Aruna
>
>>
>> Thanks,
>> Maduranga
>>
>> On Tue, Sep 1, 2015 at 11:10 AM, Maduranga Siriwardena <
>> madura...@wso2.com> wrote:
>>
>>> Hi all,
>>>
>>> Anyone know how to fix this? I keep on getting this error
>>>
>>> Failed to execute goal org.apache.felix:maven-scr-plugin:1.7.4:scr
>>> (generate-scr-scrdescriptor) on project org.wso2.carbon.core: Execution
>>> generate-scr-scrdescriptor of goal 
>>> org.apache.felix:maven-scr-plugin:1.7.4:scr
>>> failed: Comparison method violates its general contract! -> [Help 1]
>>>
>>> Thanks,
>>> Maduranga
>>>
>>> On Fri, Jun 12, 2015 at 11:16 AM, Maduranga Siriwardena <
>>> madura...@wso2.com> wrote:
>>>
 Hi Thusitha,

 I have tried to build both master branch and release-4.4.0 branch.

 I have java version "1.7.0_80" and Apache Maven 3.0.5

 On Fri, Jun 12, 2015 at 11:05 AM, Thusitha Thilina Dayaratne <
 thusit...@wso2.com> wrote:

> Hi Maduranga,
>
> If you are trying to build the master branch from github use JDK7  or
> 8 with maven 3.0.x.
> This will help you https://docs.wso2.com/display/Carbon440/
> Installation+Prerequisites
>
> Thanks
>
> On Fri, Jun 12, 2015 at 10:57 AM, Thusitha Thilina Dayaratne <
> thusit...@wso2.com> wrote:
>
>> Hi Madhuranga,
>>
>> I just checkout the master branch and built without any issues.
>> May be some compatible issues with maven and jdk versions?
>>
>> Thanks
>>
>> On Fri, Jun 12, 2015 at 10:39 AM, Maduranga Siriwardena <
>> madura...@wso2.com> wrote:
>>
>>> Hi all,
>>>
>>> I tried to build carbon4-kernel and I got the below error.
>>>
>>> *Failed to execute goal org.apache.felix:maven-scr-plugin:1.7.4:scr
>>> (generate-scr-scrdescriptor) on project org.wso2.carbon.core: Execution
>>> generate-scr-scrdescriptor of goal
>>> org.apache.felix:maven-scr-plugin:1.7.4:scr failed: Comparison method
>>> violates its general contract!*
>>>
>>> Such a problem is reported in apache felix plugin version 1.7.4 [1].
>>> So I changed the version of the maven scr plugin to 1.8.0 and if I 
>>> resume
>>> the build, it build successfully.
>>>
>>> But if I build the code again from the beginning, I get below error
>>> from *org.wso2.carbon.registry.core* which is built before
>>> *org.wso2.carbon.core*.
>>>
>>> *[ERROR] Bundle
>>> org.wso2.carbon:org.wso2.carbon.registry.core:bundle:4.4.1-SNAPSHOT : 
>>> Input
>>> file does not exist:
>>> target/scr-plugin-generated/OSGI-INF/serviceComponents.xml*
>>>
>>> Seems to be it is not generating the OSGI-INF. Any help how to build
>>> source successfully?
>>>
>>> [1] https://issues.apache.org/jira/browse/FELIX-3571
>>>
>>> Thank you.
>>> --
>>> Maduranga Siriwardena
>>> Software Engineer
>>> WSO2 Inc.
>>>
>>> email: madura...@wso2.com
>>> mobile: +94718990591
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Thusitha Dayaratne
>> Software Engineer
>> WSO2 Inc. - lean . enterprise . middleware |  wso2.com
>>
>> Mobile  +94712756809
>> Blog  alokayasoya.blogspot.com
>> Abouthttp://about.me/thusithathilina
>>
>>
>
>
> --
> Thusitha Dayaratne
> Software Engineer
> WSO2 Inc. - lean . enterprise . middleware |  wso2.com
>
> Mobile  +94712756809
> Blog  alokayasoya.blogspot.com
> Abouthttp://about.me/thusithathilina
>
>


 --
 Maduranga Siriwardena
 Software Engineer
 WSO2 Inc.

 email: madura...@wso2.com
 mobile: +94718990591

>>>
>>>
>>>
>>> --
>>> Maduranga Siriwardena
>>> Software Engineer
>>> WSO2 Inc.
>>>
>>> email: madura...@wso2.com
>>> mobile: +94718990591
>>>
>>
>>
>>
>> --
>> Maduranga Siriwardena
>> Software Engineer
>> WSO2 Inc.
>>
>> email: madura...@wso2.com
>> mobile: +94718990591
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
>
> *Aruna Sujith Karunarathna *
> WSO2, Inc | lean. enterprise. middleware.
> #20, Palm Grove,