[Dev] [Ballerina][Plugin-Intellij] Fix for issue #639

2017-10-11 Thread Raveen Rathnayake
Hi all,

Please review and merge PR[1].

[1]https://github.com/ballerinalang/plugin-intellij/pull/640

Thanks,
Raveen.
-- 
Raveen Savinda Rathnayake,
Software Engineering Intern,
WSO2 Inc.

*lean. enterprise. middleware  *
Web: www.WSO2.com Mobile : +94771144549  Blog : https://blog.raveen.me




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


Re: [Dev] Please review and merge PR

2017-10-11 Thread Isuranga Perera
Hi Johann,

Sorry for the mistake. I have sent two separate emails for the issue.

On Thu, Oct 12, 2017 at 11:55 AM, Johann Nallathamby 
wrote:

> Hi Isuranga,
>
> First of all thank you for your contribution to WSO2 Identity Server.
>
> However, can you please follow the following protocol in order to get your
> PRs merged faster.
>
> 1. Create one JIRA per issue. Make sure you give the description clearly.
> Add the PRs related to the issue in the JIRA.
> 2. Send a mail to dev with the subject indicating the issue you are fixing
> (prefix with "[IAM]" is recommended).
> 3. Describe the problem (can be the same as description of the JIRA).
> 4. Give the references to the JIRA and PRs.
> 5. Request to review and merge.
>
> In the above mail there is no mention of the issue neither in the subject
> nor body. This won't get the attention of the required individuals (IAM)
> since the dev mailing list is a global mailing list for all development
> queries in WSO2.
>
> Also there are two separate issues in this mail. Always stick to one mail
> per issue so the discussion is focussed on one issue only. You have already
> sent a mail for the balana initialization issue [1]. You can add relevant
> JIRA and PR to that. Please send a separate mail for the custom function
> issue.
>
> Thanks again for the contribution.
>
> [1] "[Dev][IS][XACML] Introducing a Custom functionId"
>
> Regards,
> Johann.
>
> On Thu, Oct 12, 2017 at 10:52 AM, Isuranga Perera <
> isurangamper...@gmail.com> wrote:
>
>> Can you please review and merge PR[1] and PR[2].
>>
>> [1] https://github.com/wso2/balana/pull/75
>> [2] https://github.com/wso2/carbon-identity-framework/pull/1112
>>
>> Best Regards
>> Isuranga Perera
>>
>
>
>
> --
> Thanks & Regards,
>
> *Johann Dilantha Nallathamby*
> Senior Lead Solutions Engineer
> 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


Re: [Dev] Please review and merge PR

2017-10-11 Thread Johann Nallathamby
Hi Isuranga,

First of all thank you for your contribution to WSO2 Identity Server.

However, can you please follow the following protocol in order to get your
PRs merged faster.

1. Create one JIRA per issue. Make sure you give the description clearly.
Add the PRs related to the issue in the JIRA.
2. Send a mail to dev with the subject indicating the issue you are fixing
(prefix with "[IAM]" is recommended).
3. Describe the problem (can be the same as description of the JIRA).
4. Give the references to the JIRA and PRs.
5. Request to review and merge.

In the above mail there is no mention of the issue neither in the subject
nor body. This won't get the attention of the required individuals (IAM)
since the dev mailing list is a global mailing list for all development
queries in WSO2.

Also there are two separate issues in this mail. Always stick to one mail
per issue so the discussion is focussed on one issue only. You have already
sent a mail for the balana initialization issue [1]. You can add relevant
JIRA and PR to that. Please send a separate mail for the custom function
issue.

Thanks again for the contribution.

[1] "[Dev][IS][XACML] Introducing a Custom functionId"

Regards,
Johann.

On Thu, Oct 12, 2017 at 10:52 AM, Isuranga Perera  wrote:

> Can you please review and merge PR[1] and PR[2].
>
> [1] https://github.com/wso2/balana/pull/75
> [2] https://github.com/wso2/carbon-identity-framework/pull/1112
>
> Best Regards
> Isuranga Perera
>



-- 
Thanks & Regards,

*Johann Dilantha Nallathamby*
Senior Lead Solutions Engineer
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


[Dev] Balana doesn't allow extended functionIDs at the time of policy parsing

2017-10-11 Thread Isuranga Perera
Hi All,

Even though Balana load custom functions from the config file.It doesn't
use them at the time of parsing policies. This is because it always uses
only standard functions at the time of parsing policies. Issue created at
[2].

Please review and merge PR[1]

[1] https://github.com/wso2/balana/pull/75
[2] https://wso2.org/jira/browse/IDENTITY-6672

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


[Dev] Please review and merge PR

2017-10-11 Thread Isuranga Perera
Can you please review and merge PR[1] and PR[2].

[1] https://github.com/wso2/balana/pull/75
[2] https://github.com/wso2/carbon-identity-framework/pull/1112

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


Re: [Dev] APIM 2.1 Endpoint Authorization

2017-10-11 Thread Bhathiya Jayasekara
HI Javier,

You can write a custom handler[1] for this. Within the handler, you can
access the current resource like this.

String resourceString = (String) synCtx.getProperty("API_ELECTED_RESOURCE");

You can access all transport headers like this.

Map headers = (Map) ((Axis2MessageContext) messageContext).
getAxis2MessageContext().
getProperty(org.apache.axis2.context.MessageContext.TRANSPORT_HEADERS);

Hope this helps.

[1] https://docs.wso2.com/display/AM210/Writing+Custom+Handlers

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


[Dev] APIM 2.1 Endpoint Authorization

2017-10-11 Thread Vazquez-Hidalgo, Javier
Hello,

I would like to implement endpoint authorization at the gateway level, services 
will use OpenID Connect to authenticate a user so my plan is to include an 
authorization claim in the JWT token. Assume there is a mapping between 
permissions and URI's.  My question is how can I extend the APIM to perform 
this check when the request comes in?

Thanks,
Javier

If you wish to unsubscribe from receiving commercial electronic messages from 
TD Bank Group, please click here or go to the following web address: 
www.td.com/tdoptout
Si vous souhaitez vous désabonner des messages électroniques de nature 
commerciale envoyés par Groupe Banque TD veuillez cliquer ici ou vous rendre à 
l'adresse td.com/tddesab

NOTICE: Confidential message which may be privileged. Unauthorized 
use/disclosure prohibited. If received in error, please go to www.td.com/legal 
for instructions.
AVIS : Message confidentiel dont le contenu peut être privilégié. 
Utilisation/divulgation interdites sans permission. Si reçu par erreur, prière 
d'aller au www.td.com/francais/avis_juridique pour des instructions.
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Couldn't authenticate the Tiqr by scanning QR code with enrolled user

2017-10-11 Thread Kanapriya Kuleswararajan
Hi All,

I just went through some resources of Tiqr and found out that they make the
current version of tiqr supports the OCRA suite of authentication
protocols. It's security is based on AES 256-bit encryption and the
SHA-family of hash functions. Seems like, based on these changes of
authentication mechanism, We couldn't authenticate the user, even-though
able to scan the QR code as in the above screen shot which I shared in the
initial thread.
AFAIU, we have to make/re-write the tiqr-client to support this
authenticaton mechanism to make this current app to work.
So , for the timing we are deprecated the tiqr authenticator from the store
and moved the documentation to the private space.

[1] https://apkpure.biz/org.tiqr.authenticator/tiqr
[2] https://www.rcdevs.com/solutions/tokens/tiqr/
[3]
https://www.rcdevs.com/docs/howtos/tiqr_quick_start/tiqr_quick_start/#1-introduction

Thanks

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


On Tue, Oct 10, 2017 at 10:13 AM, Kanapriya Kuleswararajan <
kanapr...@wso2.com> wrote:

> Hi Malaka
>
>>
>> TIQR has changed the mobile app recently and seems they have deprecated
>> the support for previous versions.
>>
>> Can we deprecate the current authinticator? Can we also checking with
>> TIQR team the possibility to upgrade?
>>
>> +1 for deprecate the current authenticator and will do the needfull.
> BTW we have used simplesamlphp [1] to deals with tiqr authentication.
> Seems we have re-write or modify this client as well to support with latest
> tiqr mobile application.
>
> [1] https://github.com/simplesamlphp/simplesamlphp/tree/v1.14.16
>
>> [1] http://privacyidea.readthedocs.io/en/latest/configuration/to
>> kens/tiqr.html#tiqr
>>
>> On Mon, Oct 9, 2017 at 7:00 PM, Malaka Silva  wrote:
>>
>>> ​Hi Kanapriya,
>>>
>>> We need to investigate if TIQR has done and api change with the new app.
>>> If so we need to deprecate the current authenticator.​
>>>
>>> On Mon, Oct 9, 2017 at 3:27 PM, Shakila Sasikaran 
>>> wrote:
>>>
 Hi Kanapriya,

 You can refer the repo [1].

 [1] https://github.com/simplesamlphp/simplesamlphp

 Thanks

 On Mon, Oct 9, 2017 at 3:04 PM, Shakila Sasikaran 
 wrote:

> Hi Kanapriya,
>
> It seems they released new version of tiqr mobile application and this
> issue comes on this latest one. We may need to modify the tiqr client to
> support the latest version.
>
> Thanks
>
> On Mon, Oct 9, 2017 at 2:22 PM, Kanapriya Kuleswararajan <
> kanapr...@wso2.com> wrote:
>
>> Hi All,
>>
>> I have tried with Tiqr authenticator [1] as mentioned [2] , I
>> couldn't authenticate the enrolled user by scanning the QR code. I got
>> response as below in the mobile app once I scanned the QR code.
>>
>> Please note that I connected my phone to the same WiFi network on
>> which my tiqr-client is running.
>>
>> [image: Inline image 1]
>>
>> @Shakila : Do you have any idea on this, What could be the reason for
>> this?
>>
>>
>> [1] https://store.wso2.com/store/assets/isconnector/details/9470
>> 9865-ea3f-478b-bb4d-6f12da1e8274
>> [2] https://docs.wso2.com/display/ISCONNECTORS/Configuring+Tiqr+
>> Authenticator
>>
>>
>> Thanks
>> Kanapriya Kuleswararajan
>> Software Engineer | WSO2
>> Mobile : - 0774894438 <077%20489%204438>
>> Mail : - kanapr...@wso2.com
>> LinkedIn : - https://www.linkedin.com/in/kanapriya-kules-94712685/
>> 
>>
>
>
>
> --
> Shakila Sasikaran
> Software Engineer
> Mobile :+94 (0) 77 526 6848 <+94%2077%20526%206848>
> shak...@wso2.com
> WSO2, Inc.
> lean . enterprise . middleware
> http://www.wso2.com/
>



 --
 Shakila Sasikaran
 Software Engineer
 Mobile :+94 (0) 77 526 6848 <077%20526%206848>
 shak...@wso2.com
 WSO2, Inc.
 lean . enterprise . middleware
 http://www.wso2.com/

>>>
>>>
>>>
>>> --
>>>
>>> Best Regards,
>>>
>>> Malaka Silva
>>> Associate Director / Architect
>>> M: +94 777 219 791 <077%20721%209791>
>>> Tel : 94 11 214 5345
>>> Fax :94 11 2145300 <011%202%20145300>
>>> Skype : malaka.sampath.silva
>>> LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
>>> Blog : http://mrmalakasilva.blogspot.com/
>>>
>>> WSO2, Inc.
>>> lean . enterprise . middleware
>>> https://wso2.com/signature
>>> http://www.wso2.com/about/team/malaka-silva/
>>> 
>>> https://store.wso2.com/store/
>>>
>>> Don't make Trees rare, we should keep them with care
>>>
>>
>>
>>
>> --
>>
>> Best Regards,
>>
>> Malaka Silva
>> Associate Director / Architect
>> M: +94 777 219 791 <+94%2077%20721%209

Re: [Dev] Unit Test for AS400 PCML Connector

2017-10-11 Thread Janani Thangavel
Hi,

Actually the error [1] is happened when create the object for
ProgramCallDocument
[2], even though I mocked [3] . Based on the offline discussion with
Hemika, It's seems like the mocking is not working. Can any one please
advise me on this?

[1]org.apache.synapse.SynapseException: Unable to connect to AS400 server:
A parse error occurred.

at org.apache.synapse.mediators.AbstractMediator.handleException(
AbstractMediator.java:325)
at org.wso2.carbon.connector.pcml.AS400CallProgram.connect(
AS400CallProgram.java:158)
at org.wso2.carbon.connector.pcml.test.unit.AS400CallProgramUnitTest.
testAS400CallProgram(AS400CallProgramUnitTest.java:86)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.testng.internal.MethodInvocationHelper.invokeMethod(
MethodInvocationHelper.java:80)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:673)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:842)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1166)
at org.testng.internal.TestMethodWorker.invokeTestMethods(
TestMethodWorker.java:125)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
at org.testng.TestRunner.runWorkers(TestRunner.java:1178)
at org.testng.TestRunner.privateRun(TestRunner.java:757)
at org.testng.TestRunner.run(TestRunner.java:608)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
at org.testng.SuiteRunner.run(SuiteRunner.java:240)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1158)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1083)
at org.testng.TestNG.run(TestNG.java:999)
at org.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:72)
at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:127)
Caused by: com.ibm.as400.data.PcmlException: A parse error occurred.
at com.ibm.as400.data.ProgramCallDocument.loadSourcePcmlDocumentFromStre
am(ProgramCallDocument.java:1435)
at com.ibm.as400.data.ProgramCallDocument.(
ProgramCallDocument.java:265)
at org.wso2.carbon.connector.pcml.AS400CallProgram.connect(
AS400CallProgram.java:92)
... 25 more
Caused by: com.ibm.as400.data.ParseException: Premature end of file.
1 error detected parsing pcml document.

at com.ibm.as400.data.PcmlSAXParser.(PcmlSAXParser.java:231)
at com.ibm.as400.data.ProgramCallDocument.loadSourcePcmlDocumentFromStre
am(ProgramCallDocument.java:1427)
... 27 more
[2]https://github.com/jananithangavel/esb-connector-pcml/
blob/master/src/main/java/org/wso2/carbon/connector/pcml/AS4
00CallProgram.java#L91
[3]https://github.com/jananithangavel/esb-connector-pcml/
blob/2f3f9585225750c6f009a039ef716a520ca2bdf3/src/test/java/
org/wso2/carbon/connector/pcml/test/unit/AS400CallProgramUnitTest.java#L79

Janani Thangavel
Associate Software Engineer
WSO2 Inc : http://wso2.org

Mobile   : +94771856427 <+94%2077%20185%206427>

On Wed, Oct 11, 2017 at 12:25 PM, Hemika Kodikara  wrote:

> Hi Janani,
>
> The actual backend call happens at line [1]. So if you can mock that
> backend call, then you should be fine.
>
> The ProgramCallDocument is basically an PCML file(XML structure)
> representing the inputs and outputs of a program in the AS400. Its only an
> object. It does not make any backend calls.
>
> See "Sample 1" [2] for an actually PCML document.
>
> [1] - https://github.com/jananithangavel/esb-connector-pcml/
> blob/master/src/main/java/org/wso2/carbon/connector/pcml/AS4
> 00CallProgram.java#L110
> [2] - https://docs.wso2.com/display/ESBCONNECTORS/Working+with+
> Call+Operation+in+AS400
>
> Regards,
> Hemika
>
> Hemika Kodikara
> WSO2 Inc.
> lean . enterprise . middleware
> http://wso2.com
>
> Mobile : +9477762 <+94%2077%20768%208882>
>
> On Wed, Oct 11, 2017 at 11:42 AM, Janani Thangavel 
> wrote:
>
>> Adding Hemika.
>>
>> Janani Thangavel
>> Associate Software Engineer
>> WSO2 Inc : http://wso2.org
>> 
>> Mobile   : +94771856427 <+94%2077%20185%206427>
>>
>> On Wed, Oct 11, 2017 at 11:40 AM, Janani Thangavel 
>> wrote:
>>
>>> Hi All,
>>>
>>> Currently I'm working on the unit testing [1] for AS400 pcml connector. 
>>> Inside
>>> the pcml connector we are creating a instance for ProgramCallDocument
>>> [2]. It calls actual back end Server. So, I'm trying to mock
>>> that ProgramCallDocument as follow [3]. Even if I mock, It calls the actual
>>> back end service and get the error