Re: [Dev] [VOTE] Release WSO2 Carbon Kernel 4.4.17 RC4

2017-08-17 Thread Sathya Bandara
Hi all,

tested the following with WSO2 Identity server

basic user operations and role operations in primary and secondary
user-stores
configuring tenants (tenant creation, activation, deactivation)

Did not encounter any issues. Hence,
[+] Stable - go ahead and release.

Thanks,
Sathya

On Thu, Aug 17, 2017 at 6:27 PM, Muhammed Shariq  wrote:

> Hi,
>
> This is the 4th release candidate of WSO2 Carbon Kernel 4.4.17.
>
> This release fixes the following issues:
> https://github.com/wso2/carbon-kernel/milestone/15?closed=1
>
> Please download and test your products with Kernel 4.4.17 RC4 and vote.
> The vote will be open for 72 hours or as long as needed.
>
> Maven staging repository:
> *https://maven.wso2.org/nexus/content/repositories/orgwso2carbon-1191/
> *
>
> The tag to be voted upon:
> *https://github.com/wso2/carbon-kernel/releases/tag/v4.4.17-rc4
> *
>
> [ ] Broken - Do not release (explain why)
> [ ] Stable  - Go ahead and release
>
> --
> Thank you,
> Platform Team.
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Sathya Bandara
Software Engineer
WSO2 Inc. http://wso2.com
Mobile: (+94) 715 360 421 <+94%2071%20411%205032>

<+94%2071%20411%205032>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [VOTE] Release WSO2 Carbon Kernel 4.4.17 RC4

2017-08-17 Thread Muhammed Shariq
Hi,

This is the 4th release candidate of WSO2 Carbon Kernel 4.4.17.

This release fixes the following issues:
https://github.com/wso2/carbon-kernel/milestone/15?closed=1

Please download and test your products with Kernel 4.4.17 RC4 and vote. The
vote will be open for 72 hours or as long as needed.

Maven staging repository:
*https://maven.wso2.org/nexus/content/repositories/orgwso2carbon-1191/
*

The tag to be voted upon:
*https://github.com/wso2/carbon-kernel/releases/tag/v4.4.17-rc4
*

[ ] Broken - Do not release (explain why)
[ ] Stable  - Go ahead and release

--
Thank you,
Platform Team.
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Getting error in Integration Cloud

2017-08-17 Thread Manjula Rathnayake
Hi Kanapriya,

I am not sure why below URL contains both hostname and IP pair.
TargetHandler Exception occurred while reading the response  Remote Address
: wso2438.crm5.dynamics.com/66.119.154.20:443

thank you.

On Thu, Aug 17, 2017 at 6:16 PM, Kanapriya Kuleswararajan <
kanapr...@wso2.com> wrote:

> Hi Manjula,
>
> Please find the attached log file below :
>
>
>
> Kanapriya Kuleswararajan
> Software Engineer | WSO2
> Mobile : - 0774894438
> Mail : - kanapr...@wso2.com
> LinkedIn : - https://www.linkedin.com/in/kanapriya-kules-94712685/
> 
>
> On Thu, Aug 17, 2017 at 6:14 PM, Manjula Rathnayake 
> wrote:
>
>> Hi Kanapriya,
>>
>> As per your explanation, it seems to be an intermittent issue. Can you
>> attach the complete log file?
>>
>> thank you.
>>
>> On Thu, Aug 17, 2017 at 6:08 PM, Kanapriya Kuleswararajan <
>> kanapr...@wso2.com> wrote:
>>
>>> Hi All,
>>>
>>> I have tried a sample scenario which is discussed in [1] in integration
>>> cloud.
>>> The scenario works fine in local environment , but sometimes I observed
>>> following error in integration cloud.
>>>
>>> Please find the log below:
>>>
>>> [2017-08-17 11:16:03,665]  INFO - LogMediator Custom Log = Queried from
>>> salesforce
>>> [2017-08-17 11:16:20,203]  WARN - TargetHandler Exception occurred while
>>> reading the response  Remote Address : wso2438.crm5.dynamics.com/66.1
>>> 19.154.20:443
>>> [2017-08-17 11:16:20,204]  WARN - MultitenantMessageReceiver Tenant
>>> domain is not available in tenant request message context, hence it might
>>> not be set in the thread local carbon context
>>> [2017-08-17 11:16:20,233] ERROR - NativeWorkerPool Uncaught exception
>>> org.apache.axis2.engine.AxisError: ServiceContext in OperationContext
>>> does not match !
>>> at org.apache.axis2.context.MessageContext.setOperationContext(
>>> MessageContext.java:1404)
>>> at org.wso2.carbon.core.multitenancy.MultitenantMessageReceiver
>>> .processResponse(MultitenantMessageReceiver.java:144)
>>> at org.wso2.carbon.core.multitenancy.MultitenantMessageReceiver
>>> .receive(MultitenantMessageReceiver.java:82)
>>> at org.apache.synapse.transport.passthru.TargetErrorHandler$1.r
>>> un(TargetErrorHandler.java:139)
>>> at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.r
>>> un(NativeWorkerPool.java:172)
>>> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPool
>>> Executor.java:1142)
>>> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo
>>> lExecutor.java:617)
>>> at java.lang.Thread.run(Thread.java:745)
>>>
>>> If I get this error , then couldn't continue the flow of scenario.
>>>
>>> What Could be the reason for this?
>>>
>>> [1] [Architecture] ESB connector smaple scenario - Integrate Salesforce
>>> REST with Microsoft dynamics CRM (Account/Contact)
>>>
>>> Thanks
>>> Kanapriya Kuleswararajan
>>> Software Engineer | WSO2
>>> Mobile : - 0774894438
>>> Mail : - kanapr...@wso2.com
>>> LinkedIn : - https://www.linkedin.com/in/kanapriya-kules-94712685/
>>> 
>>>
>>
>>
>>
>> --
>> Manjula Rathnayaka
>> Technical Lead
>> WSO2, Inc.
>> Mobile:+94 77 743 1987 <+94%2077%20743%201987>
>>
>
>


-- 
Manjula Rathnayaka
Technical Lead
WSO2, Inc.
Mobile:+94 77 743 1987
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Getting error in Integration Cloud

2017-08-17 Thread Manjula Rathnayake
Hi Kanapriya,

As per your explanation, it seems to be an intermittent issue. Can you
attach the complete log file?

thank you.

On Thu, Aug 17, 2017 at 6:08 PM, Kanapriya Kuleswararajan <
kanapr...@wso2.com> wrote:

> Hi All,
>
> I have tried a sample scenario which is discussed in [1] in integration
> cloud.
> The scenario works fine in local environment , but sometimes I observed
> following error in integration cloud.
>
> Please find the log below:
>
> [2017-08-17 11:16:03,665]  INFO - LogMediator Custom Log = Queried from
> salesforce
> [2017-08-17 11:16:20,203]  WARN - TargetHandler Exception occurred while
> reading the response  Remote Address : wso2438.crm5.dynamics.com/66.1
> 19.154.20:443
> [2017-08-17 11:16:20,204]  WARN - MultitenantMessageReceiver Tenant domain
> is not available in tenant request message context, hence it might not be
> set in the thread local carbon context
> [2017-08-17 11:16:20,233] ERROR - NativeWorkerPool Uncaught exception
> org.apache.axis2.engine.AxisError: ServiceContext in OperationContext
> does not match !
> at org.apache.axis2.context.MessageContext.setOperationContext(
> MessageContext.java:1404)
> at org.wso2.carbon.core.multitenancy.MultitenantMessageReceiver
> .processResponse(MultitenantMessageReceiver.java:144)
> at org.wso2.carbon.core.multitenancy.MultitenantMessageReceiver
> .receive(MultitenantMessageReceiver.java:82)
> at org.apache.synapse.transport.passthru.TargetErrorHandler$1.r
> un(TargetErrorHandler.java:139)
> at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.
> run(NativeWorkerPool.java:172)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPool
> Executor.java:1142)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo
> lExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
>
> If I get this error , then couldn't continue the flow of scenario.
>
> What Could be the reason for this?
>
> [1] [Architecture] ESB connector smaple scenario - Integrate Salesforce
> REST with Microsoft dynamics CRM (Account/Contact)
>
> Thanks
> Kanapriya Kuleswararajan
> Software Engineer | WSO2
> Mobile : - 0774894438
> Mail : - kanapr...@wso2.com
> LinkedIn : - https://www.linkedin.com/in/kanapriya-kules-94712685/
> 
>



-- 
Manjula Rathnayaka
Technical Lead
WSO2, Inc.
Mobile:+94 77 743 1987
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Getting error in Integration Cloud

2017-08-17 Thread Kanapriya Kuleswararajan
Hi All,

I have tried a sample scenario which is discussed in [1] in integration
cloud.
The scenario works fine in local environment , but sometimes I observed
following error in integration cloud.

Please find the log below:

[2017-08-17 11:16:03,665]  INFO - LogMediator Custom Log = Queried from
salesforce
[2017-08-17 11:16:20,203]  WARN - TargetHandler Exception occurred while
reading the response  Remote Address : wso2438.crm5.dynamics.com/66.
119.154.20:443
[2017-08-17 11:16:20,204]  WARN - MultitenantMessageReceiver Tenant domain
is not available in tenant request message context, hence it might not be
set in the thread local carbon context
[2017-08-17 11:16:20,233] ERROR - NativeWorkerPool Uncaught exception
org.apache.axis2.engine.AxisError: ServiceContext in OperationContext does
not match !
at org.apache.axis2.context.MessageContext.setOperationContext(
MessageContext.java:1404)
at org.wso2.carbon.core.multitenancy.MultitenantMessageReceiver.
processResponse(MultitenantMessageReceiver.java:144)
at org.wso2.carbon.core.multitenancy.MultitenantMessageReceiver.receive(
MultitenantMessageReceiver.java:82)
at org.apache.synapse.transport.passthru.TargetErrorHandler$1.
run(TargetErrorHandler.java:139)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$
1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(
ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(
ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

If I get this error , then couldn't continue the flow of scenario.

What Could be the reason for this?

[1] [Architecture] ESB connector smaple scenario - Integrate Salesforce
REST with Microsoft dynamics CRM (Account/Contact)

Thanks
Kanapriya Kuleswararajan
Software Engineer | WSO2
Mobile : - 0774894438
Mail : - kanapr...@wso2.com
LinkedIn : - https://www.linkedin.com/in/kanapriya-kules-94712685/

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


Re: [Dev] [DAS] Reading data from stream inside the siddhi

2017-08-17 Thread Mohanadarshan Vivekanandalingam
Hi Sajith,

You can achieve above with Analytics Event table. Please refer below
resources as reference.

https://github.com/wso2/analytics-apim/blob/master/
features/org.wso2.analytics.apim.feature/src/main/
resources/template-manager/executionplans/APIMAnalytics-
AbnormalAccessTokenRefresh.siddhiql

https://docs.wso2.com/display/DAS310/Understanding+Event+
Streams+and+Event+Tables#UnderstandingEventStreamsandEventTables-
AnalyticseventtableAnalyticseventtable

Thanks,
Mohan


On Wed, Aug 16, 2017 at 12:45 PM, Sajith Abeywardhana 
wrote:

> Hi,
>
> How to read the data from the already stored stream(com.xxx.sensor.
> notification.configuration.stream) when the below siddhi query get
> executed. Query is getting executed when data is arriving to the 
> *com.xxx.sensor.event.data.stream
> *stream.
>
>
> /* Enter a unique ExecutionPlan */
> @Plan:name('light-sensor-notification-execution-plan')
>
> @Plan:trace('true')
>
> @Import('com.xxx.sensor.event.data.stream:1.0.0')
> define stream input_sensor_data_event_stream (BS_ID string, PIR int, SOUND
> int, LIGHT int, A_T double,
> EVENT_TIME long, FROM_TIME long, TO_TIME long, DAY_OF_WEEK string,
> TIME_AS_24_HOUR string);
>
> @Import('com.xxx.sensor.notification.configuration.stream:1.0.0')
> define stream notification_configuration_stream (sensorType string,
> deviceKey string, fromTime string, toTime string, datOfWeek string,
> detectionStatus string, slot int, reArmTime int);
>
> @Export('com.mitrai.notification.sending.stream:1.0.0')
> define stream output_sensor_data_events_stream (DEVICE_KEY string,
> SENSOR_TYPE string, SENSOR_VALUE int, DAY_OF_WEEK string,
> TIME_AS_24_HOUR string, FROM_TIME string, TO_TIME string, SLOT int,
> RE_ARM_TIME int, DETECTION_STATUS string);
>
>
> from input_sensor_data_event_stream#window.length(1) as evt unidirectional
> join notification_configuration_stream#window.time(5 min) as conf
> on evt.BS_ID == conf.deviceKey
> select BS_ID as DEVICE_KEY, "light" as SENSOR_TYPE, LIGHT as SENSOR_VALUE,
> DAY_OF_WEEK as DAY_OF_WEEK,
> TIME_AS_24_HOUR as TIME_AS_24_HOUR, "0600" as FROM_TIME, "0830" as
> TO_TIME, 1 as SLOT,
> 20 as RE_ARM_TIME, "temp" as DETECTION_STATUS
> insert into output_sensor_data_events_stream;
>
> Thanks,
> Sajith.
>



-- 
*V. Mohanadarshan*
*Associate Tech Lead,*
*Data Technologies Team,*
*WSO2, Inc. http://wso2.com  *
*lean.enterprise.middleware.*

email: mo...@wso2.com
phone:(+94) 771117673
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Disabling hostname verification on Kernel 4.4.17-SNAPSHOT

2017-08-17 Thread Vidura Nanayakkara
​​Hi,

On Thu, Aug 17, 2017 at 7:49 AM, Chandana Napagoda 
wrote:

> Hi
>
> Could you please point the fix you have made to address this issue?
>

​As Shariq mentioned, *org.wso2.ignoreHostnameVerification *property was
removed from Kernel 4.4.17 onwards. With PR [1], commons-httpclient library
coming from kernel will handle host name verification by itself.  The
property  *org.wso2.ignoreHostnameVerification* is replaced by
*httpclient.hostnameVerifier*. The possible values for
*httpclient.hostnameVerifier *is as described below:

   - DefaultAndLocalhost - Verify host name without being strict with
   sub-domains (*.foo.com is allowed to match with a.b.foo.com) and also
   allow local host
   - AllowAll - Allows all hosts
   - Strict - Verify all hosts while being strict with sub-domains (*.
   foo.com is not allowed to match with a.b.foo.com)

Example: httpclient.hostnameVerifier="Strict"

By default, host name verification will happen for all hosts without being
strict with sub-domains (*.foo.com is allowed to match with a.b.foo.com)

Since host name verification is handled by the commons-httpclient library
coming from the kernel (with PR [1]), other components do not need to worry
about handling host name verification. For instance, handling host name
verification is removed from the jaggery component in PR [2].

[1] https://github.com/wso2/wso2-commons-httpclient/pull/5
[2] https://github.com/wso2/jaggery/pull/174/


>
> Regards,
> Chandana
>
> On Thu, Aug 17, 2017 at 7:20 AM, Muhammed Shariq  wrote:
>
>> On Wed, Aug 16, 2017 at 11:45 PM, Kishanthan Thangarajah <
>> kishant...@wso2.com> wrote:
>>
>>>
>>>
>>> On Wed, Aug 16, 2017 at 9:48 PM, Nuwandi Wickramasinghe <
>>> nuwan...@wso2.com> wrote:
>>>
 Hi all,

 With the latest IS pack built with kernel 4.4.17-SNAPSHOT, we can
 successfully turn off the hostname verification with
 *-Dhttpclient.hostnameVerifier=AllowAll*.

>>>
>>> What was the original issue? Farasath has followed the same steps (IS
>>> with 4.4.17-SNAPSHOT) and mentioned that the above property was not working
>>> according to the mail above.
>>>
>>>
 Need to do some code changes from Identity Server side to make the
 newly introduced property effective for some components.

>>>
>>> What are the code changes? This property is only used in httpclient
>>> coming from kernel. So why changes are required at IS side?
>>>
>>
>> Prior to kernel 4.4.17 there was a property 
>> *-Dorg.wso2.ignoreHostnameVerification=true
>> *that was used to disable hostname verification. IINM, the issue here is
>> some components use this property to disable hostname verification, but
>> since it's that property has been removed since 4.4.17 that might be
>> causing some issue, so they are investigating on IS side.
>>
>> Nuwandi / Fara - correct me if I am wrong.
>>
>>>
>>>
 Since no improvement is needed from kernel side, can we please go ahead
 with the kernel 4.4.17 release?

 *-Dhttpclient.hostnameVerifier *is only applicable since 4.4.17, but
 our documentation says it's applicable from 4.4.10 ([1]). Better to fix the
 documentation as well. Reopened [2] since the doc need to be corrected.

 [1] https://docs.wso2.com/display/ADMIN44x/Enabling+HostName
 +Verification
 [2] https://wso2.org/jira/browse/DOCUMENTATION-4071

 thanks
 Nuwandi

 On Wed, Aug 16, 2017 at 5:39 PM, Farasath Ahamed 
 wrote:

>
>
>
> On Tue, Aug 15, 2017 at 8:22 PM, Farasath Ahamed 
> wrote:
>
>> Tested with Kernel 4.4.16, -Dhttpclient.hostnameVerifier=AllowAll
>> parameter is honoured and worked fine.
>>
>
> I had an offline discussion with Chandana and Thusitha and go to know
> that *-Dhttpclient.hostnameVerifier=AllowAll* is not supported in
> kernel as of now (upto 4.4.16) and will be supported in 4.4.17.  Therefore
> my earlier conclusion saying that kernel 4.4.16 parameter is honoured is
> incorrect. But our documentation says that we support this from 4.4.11
> which need to be corrected immediately :)
>
> But going throught the startup script we do have a parameter
> *-Dorg.wso2.ignoreHostnameVerification=true* in kernel 4.4.16. Did a
> quick search and this parameter was used in Kernel 4.4.6 to disable
> hostname verification. Therefore I think that is how I was able to get my
> scenario working with a hostname without changing certs (ie. turn off
> hostname verification).
>
> But even though we have the necessary fixes to support 
> *-Dhttpclient.hostnameVerifier=AllowAll
> *in kernel 4.4.17 with commons-httpclient_3.1.0.wso2v6 orbit it
> doesn't seem to honour the *-Dhttpclient.hostnameVerifier *parameter.
>
> I did a quick debug with commons-httpclient_3.1.0.wso2v6 and the
> method to verify hostname[1] was never hit :(
>

Re: [Dev] Display the roles of a custom user store for Identity Server

2017-08-17 Thread Thomas LEGRAND
Hello,

I really don't understand why my "external" roles don't appear in the list
and why no role methods are called in my connector because, when I
configure a LDAP one, I can see the roles retrieved from the LDAP are
listed with the internal ones.

I set the log level to DEBUG to see that the LDAP user store is calling the
internal role retrieval method before checking if the user exists:

[2017-08-17 11:18:00,647] DEBUG
{org.wso2.carbon.user.core.common.AbstractUserStoreManager} -  Retrieving
internal roles for user name :  a.bresson and search filter *
[2017-08-17 11:18:00,648] DEBUG
{org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager} -  Searching
for user a.bresson

But in my case, the user check method isn't even called!

If I continue with the logs, I can see that:

[2017-08-17 11:18:00,653] DEBUG
{org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager} -  Reading
roles with the memberOfProperty Property: memberOf

Following this source code [1], it seems that it executes the method to
retrieve the external roles. On my side, in my own connector, that does not
even go there because it doesn't even check if the user exists.

What am I missing?

Regards,

Thomas

[1]
https://github.com/biliroy/carbon4-kernel/blob/master/core/org.wso2.carbon.user.core/src/main/java/org/wso2/carbon/user/core/ldap/ReadOnlyLDAPUserStoreManager.java#L1724

2017-08-16 9:56 GMT+02:00 Thomas LEGRAND :

> Hello everybody,
>
> I am writing a custom user store for the Identity Server and I
> successfully retrieved my list of users from my database. But when I try to
> display the roles of a user by clicking on the "View Roles" button [1],
> only the internal roles are displayed.
> I implemented the methods doGetExternalRoleListOfUser(),
> doGetDisplayNamesForInternalRole(), doGetSharedRoleListOfUser() to log
> something on the INFO level but nothing happens.
>
> Can someone tell me which method to implement?
>
> Regards,
>
> Thomas
>
> [1] [image: Images intégrées 1]
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] The input stream for an incoming message is null - EI 6.1.1

2017-08-17 Thread Melodias
Does anybody have any idea what can be wrong?



--
View this message in context: 
http://wso2-oxygen-tank.10903.n7.nabble.com/The-input-stream-for-an-incoming-message-is-null-EI-6-1-1-tp150692p151091.html
Sent from the WSO2 Development mailing list archive at Nabble.com.
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev