Re: [Dev] How to send subject in a XACML request

2017-11-01 Thread Godwin Shrimal
Hi Dinali,

XML request format is clear and I guess we have enough information
regarding that. I am referring to JSON format on how to send subject.


Thanks
Godwin

On Tue, Oct 31, 2017 at 10:24 PM, Dinali Dabarera  wrote:

> Hi Godwin,
>
> As you mentioned in your offline chats, there is no mention about "how to
> send the subject in the XACML Request" in our Docs.
>
> I did a small research on XACML spec and figured out we could send the
> subject in the XACML request as follows,
>
> I changed the sample request on my blog [1] with the Subject attribute as
> follows
>
> Request:
>
>  xmlns="urn:oasis:names:tc:xacml:3.0:core:schema:wd-17">
>   Category="urn:oasis:names:tc:xacml:3.0:subject-category:access-subject">
>AttributeId="urn:oasis:names:tc:xacml:1.0:subject:subject-id">
>   DataType="urn:oasis:names:tc:xacml:1.0:data-type:rfc822Name">b...@simpsons.com
>   
>
>  Category="urn:oasis:names:tc:xacml:3.0:attribute-category:action">
>  AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id" 
> IncludeInResult="false">
>  DataType="http://www.w3.org/2001/XMLSchema#string;>read
> 
> 
>  Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource">
>  AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" 
> IncludeInResult="false">
>  DataType="http://www.w3.org/2001/XMLSchema#string;>http://127.0.0.1/service/very_secure/
>  
> 
> 
> 
>
> I will update XACML docs with this information.
> Please let me know if you have any concerns on this! I hope this is what
> you expected.
>
> [1] https://medium.com/@gdrdabarera/how-entitlement-
> management-works-with-rest-api-via-xacml-in-wso2-identity-server-5-3-0-
> 7a60940d040c
>
> Thank you!
> Dinali
> ​
> -
> *Dinali Rosemin Dabarera*
> Software Engineer
> WSO2 Lanka (pvt) Ltd.
> Web: http://wso2.com/
> Email : gdrdabar...@gmail.com
> LinkedIn 
> Mobile: +94770198933 <+94%2077%20019%208933>
>
>
>
>
> 
>
>
>
>
>
>
>
>
>
>
>
>
>
>


-- 
*Godwin Amila Shrimal*
Associate Technical Lead
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: *+94772264165*
linkedin: *https://www.linkedin.com/in/godwin-amila-2ba26844/
*
twitter: https://twitter.com/godwinamila

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


[Dev] [SP]Incremental processing not working with SP + RDBMS

2017-11-01 Thread Sriskandarajah Suhothayan
Hi Charini

Please look into this.

The attached Siddhi file is not compiling with RDBMS Aggregation.

Thanks
Suho

-- 

*S. Suhothayan*
Associate Director / Architect
*WSO2 Inc. *http://wso2.com
* *
lean . enterprise . middleware


*cell: (+94) 779 756 757 | blog: http://suhothayan.blogspot.com/
twitter: http://twitter.com/suhothayan
 | linked-in:
http://lk.linkedin.com/in/suhothayan *


Sweet-Factory-Analytics-Usecase-3.siddhi
Description: Binary data
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [IS 5.3.0] How to configure OIDC claims globally?

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

I've been trying to return claims embedded in the "id_token" (JWT) but it only 
works if I configure them in the Service Provider -> Claim Configuration 
section.

Is there a way to configure them globally for all service providers?


Regards,
Javier Vazquez





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 www.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


[Dev] Correct way to Add users and Roles via an API

2017-11-01 Thread Ushani Balasooriya
Hi IAM team,

I am trying to implement a thirdparty web app to manage users and roles
functionalities as explained in this blog post [1] Solution 26.

According to the solution, it says,

*"The WSO2 Identity Server exposes a set of REST endpoints as well as
SOAP-based services for user management, the web app just need to talk to
these endpoints, without having to deal directly with underlying user
stores (LDAP, AD, JDBC)."*

This [2] is the only document I can find as the available API for user role
management.

Please verify whether my below understandings are correct to proceed with
this solution.

1. Since WSO2IS does not provide any REST API for user/role management,
there will not be a particular API where I can use as endpoint in my third
party application.
Therefore my web app should use a class as explained in this [2] document.

2. We should not consider SCIM as REST endpoint to manage users since it is
used to provision users to external system. Therefore I cannot treat SCIM
as a REST endpoint which can use to add users and roles.


[1]
https://medium.facilelogin.com/thirty-solution-patterns-with-the-wso2-identity-server-16f9fd0c0389

[2]
https://docs.wso2.com/display/IS530/Managing+Users+and+Roles+with+APIs#ManagingUsersandRoleswithAPIs-addRole()

Thanks,
-- 
*Ushani Balasooriya*
Associate Technical Lead - EE;
WSO2 Inc; http://www.wso2.com/.
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Correct way to Add users and Roles via an API

2017-11-01 Thread Isura Karunaratne
On Wed, Nov 1, 2017 at 8:01 PM Farasath Ahamed  wrote:

> On Wed, Nov 1, 2017 at 7:38 PM, Ushani Balasooriya 
> wrote:
>
>> Hi IAM team,
>>
>> I am trying to implement a thirdparty web app to manage users and roles
>> functionalities as explained in this blog post [1] Solution 26.
>>
>> According to the solution, it says,
>>
>> *"The WSO2 Identity Server exposes a set of REST endpoints as well as
>> SOAP-based services for user management, the web app just need to talk to
>> these endpoints, without having to deal directly with underlying user
>> stores (LDAP, AD, JDBC)."*
>>
>> This [2] is the only document I can find as the available API for user
>> role management.
>>
>> Please verify whether my below understandings are correct to proceed with
>> this solution.
>>
>> 1. Since WSO2IS does not provide any REST API for user/role management,
>> there will not be a particular API where I can use as endpoint in my third
>> party application.
>> Therefore my web app should use a class as explained in this [2]
>> document.
>>
>> 2. We should not consider SCIM as REST endpoint to manage users since it
>> is used to provision users to external system. Therefore I cannot treat
>> SCIM as a REST endpoint which can use to add users and roles.
>>
>
No. As Farasath explains, we do support both inbound and outbound SCIM
provisioning.

You can treat SCIM endpoint as a well defined standard way to manage users
from a third party application.

IS 5.3.0 onwards identity server supports both SCIM 1.1 and SCIM2.0 (as a
connector)

Thanks
Isura.



> IMO this is not entirely correct.
> SCIM inbound connector is used to provision users *in to* Identity Server
> and the SCIM outbound connector can be used provision user to external
> systems as you explained.
>
> SCIM inbound connector exposes a REST endpoint through which you can do
> CRUD operation on users/groups. This can be considered as a REST endpoint
> to manage users. Both SCIM and our SOAP APIs talk to the same underlying
> user-core impelementation to achieve CRUD on users (user stores).
>
> Moreover SCIM simply provides a RESTful layer over our usercore
> funcionality. So I don't see why we should not consider SCIM as a REST API
> to manage users.
> Infact we have customers using SCIM to achieve user registration, user
> profile update etc.
>
>>
>>
>> [1]
>> https://medium.facilelogin.com/thirty-solution-patterns-with-the-wso2-identity-server-16f9fd0c0389
>>
>> [2]
>> https://docs.wso2.com/display/IS530/Managing+Users+and+Roles+with+APIs#ManagingUsersandRoleswithAPIs-addRole()
>>
>> Thanks,
>> --
>> *Ushani Balasooriya*
>> Associate Technical Lead - EE;
>> WSO2 Inc; http://www.wso2.com/.
>>
>>
>> --

*Isura Dilhara Karunaratne*
Associate Technical Lead | 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] Error occurred while generating keys for Default application

2017-11-01 Thread Sanjeewa Malalgoda
Hi Gayan,
I cannot recall fixing something like this. But can we check same with
updated pack as well.
We dont see same behavior in default pack with H2.

Thanks,
sanjeewa.

On Wed, Nov 1, 2017 at 11:54 AM, Gayan Gunawardana  wrote:

> Hi All,
>
> I got this exception first time only when generating keys for Default
> application.
>
> Environment:
>
>- IS as KM IS-5.3.0 and APIM-2.1.0
>- DB postgres-10
>- Without patches or wum updates
>
> Other applications works fine. If I delete Default application and create
> new one with same name it works.
> Appreciate your input.
>
> [2017-10-31 20:53:13,463] ERROR - 
> ApplicationRegistrationSimpleWorkflowExecutor
> Error occurred when updating the status of the Application creation process
> org.wso2.carbon.apimgt.api.APIManagementException: Application
> 'DefaultApplication' is already registered.
> at org.wso2.carbon.apimgt.impl.dao.ApiMgtDAO.createApplicationR
> egistrationEntry(ApiMgtDAO.java:293)
> at org.wso2.carbon.apimgt.impl.workflow.ApplicationRegistration
> SimpleWorkflowExecutor.complete(ApplicationRegistrati
> onSimpleWorkflowExecutor.java:77)
> at org.wso2.carbon.apimgt.impl.workflow.ApplicationRegistration
> SimpleWorkflowExecutor.execute(ApplicationRegistratio
> nSimpleWorkflowExecutor.java:54)
> at org.wso2.carbon.apimgt.impl.APIConsumerImpl.requestApprovalF
> orApplicationRegistration(APIConsumerImpl.java:2789)
> at org.wso2.carbon.apimgt.impl.UserAwareAPIConsumer.requestAppr
> ovalForApplicationRegistration(UserAwareAPIConsumer.java:36)
> at org.wso2.carbon.apimgt.hostobjects.APIStoreHostObject.
> jsFunction_getApplicationKey(APIStoreHostObject.java:385)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce
> ssorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
> thodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
> at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:386)
> at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime
> .java:52)
> at org.jaggeryjs.rhino.store.modules.subscription.c4._c_anonymo
> us_2(/store/modules/subscription/key.jag:39)
> at org.jaggeryjs.rhino.store.modules.subscription.c4.call(/stor
> e/modules/subscription/key.jag)
> at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRunti
> me.java:2430)
> at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.
> java:269)
> at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObjec
> t.java:97)
> at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime
> .java:42)
> at org.jaggeryjs.rhino.store.modules.subscription.c0._c_anonymo
> us_10(/store/modules/subscription/module.jag:35)
> at org.jaggeryjs.rhino.store.modules.subscription.c0.call(/stor
> e/modules/subscription/module.jag)
> at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime
> .java:52)
> at org.jaggeryjs.rhino.store.site.blocks.subscription.subscript
> ion_add.ajax.c0._c_anonymous_1(/store/site/blocks/
> subscription/subscription-add/ajax/subscription-add.jag:240)
> at org.jaggeryjs.rhino.store.site.blocks.subscription.subscript
> ion_add.ajax.c0.call(/store/site/blocks/subscription/
> subscription-add/ajax/subscription-add.jag)
> at org.mozilla.javascript.optimizer.OptRuntime.call0(OptRuntime
> .java:23)
> at org.jaggeryjs.rhino.store.site.blocks.subscription.subscript
> ion_add.ajax.c0._c_script_0(/store/site/blocks/subscription
> /subscription-add/ajax/subscription-add.jag:3)
> at org.jaggeryjs.rhino.store.site.blocks.subscription.subscript
> ion_add.ajax.c0.call(/store/site/blocks/subscription/
> subscription-add/ajax/subscription-add.jag)
> at org.mozilla.javascript.ContextFactory.doTopCall(ContextFacto
> ry.java:394)
> at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime
> .java:3091)
> at org.jaggeryjs.rhino.store.site.blocks.subscription.subscript
> ion_add.ajax.c0.call(/store/site/blocks/subscription/
> subscription-add/ajax/subscription-add.jag)
> at org.jaggeryjs.rhino.store.site.blocks.subscription.subscript
> ion_add.ajax.c0.exec(/store/site/blocks/subscription/
> subscription-add/ajax/subscription-add.jag)
> at org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(Rhi
> noEngine.java:567)
> at org.jaggeryjs.scriptengine.engine.RhinoEngine.exec(RhinoEngi
> ne.java:273)
> at org.jaggeryjs.jaggery.core.manager.WebAppManager.exec(WebApp
> Manager.java:588)
> at org.jaggeryjs.jaggery.core.manager.WebAppManager.execute(Web
> AppManager.java:508)
> at org.jaggeryjs.jaggery.core.JaggeryServlet.doPost(JaggeryServ
> let.java:29)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
> 

Re: [Dev] Usage of "tocommonauth" property in OAuth2 Authorize Endpoint

2017-11-01 Thread Aparna Karunarathna
Hi Isura, Ishara,

During the perf test cycles, we have observed some test failures in OAuth2
flows with tocommonauth=true parameter and AFAIR Johan explained there was
mail to revert it back use the commonauth endpoint.

Regards,
Aparna.

On Sat, Oct 28, 2017 at 10:45 AM, Ishara Karunarathna 
wrote:

> Hi Isura,
>
>
>
> On Fri, Oct 27, 2017 at 7:43 PM, Isura Karunaratne  wrote:
>
>> Hi all,
>>
>> If the "tocommonauth" property value is true, the authentication response
>> from the login page will forward to the commonauth endpoint through OAuth2
>> Authorize Endpoint.
>>
>>
>>- IIRC, this was done to reduce the number of redirection in OAuth
>>flow, but I think it is better to handle all the login response from the
>>commonauth endpoint.
>>
>> This is used in SAML flow as well to reduce the redirections.
>
>>
>>- Do we need to continue supporting this or shall we remove this?
>>
>>
>> At the moment In IS components we are not setting this parameter, but
> there are some other components Eg App manager using this (may be customers
> might have implemented authenticators with this parameter).
> Do you see any issues supporting this ?
> If not I think its better to keep this.
>
> -Ishara
>
>> String isToCommonOauth = 
>> request.getParameter(FrameworkConstants.RequestParams.TO_COMMONAUTH);
>>
>> if ("true".equals(isToCommonOauth) && flowStatus == null) {
>> try {
>> return sendRequestToFramework(request, response);
>> } catch (ServletException | IOException e) {
>> log.error("Error occurred while sending request to authentication 
>> framework.");
>> return 
>> Response.status(HttpServletResponse.SC_INTERNAL_SERVER_ERROR).build();
>> }
>> }
>>
>>
>>
>> Thanks
>> Isura.
>>
>> --
>>
>> *Isura Dilhara Karunaratne*
>> Associate Technical Lead | WSO2
>> Email: is...@wso2.com
>> Mob : +94 772 254 810 <+94%2077%20225%204810>
>> Blog : http://isurad.blogspot.com/
>>
>>
>>
>>
>
>
> --
> Ishara Karunarathna
> Associate Technical Lead
> WSO2 Inc. - lean . enterprise . middleware |  wso2.com
>
> email: isha...@wso2.com,   blog: isharaaruna.blogspot.com,   mobile:
> +94717996791 <071%20799%206791>
>
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Regards,*

*Aparna Karunarathna.*


*Associate Technical Lead - QAWSO2 Inc.Mobile: 0714002533*

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


[Dev] WSO2 Enterprise Integrator 6.1.1-update8 Released!

2017-11-01 Thread Gihan Anuruddha
Hi All,

The WSO2 Integration team is pleased to announce the release of Enterprise
Integrator 6.1.1-update8. It is available for download from here
.

*Tasks/Bug Fixes and Improvements*
https://github.com/wso2/product-ei/issues?utf8=%E2%9C%93=is%3Aissue%20milestone%3A6.1.1-update8%20is%3Aclosed%20

*​**​Documentation*​
​https://docs.wso2.com/display/EI611/​


*List of Open Issues*
https://github.com/wso2/product-ei/labels/Type%2FBug

*Mailing Lists*
Join our mailing lists and correspond with the developers directly.
Developer List : dev@wso2.org | Subscribe  | Mail
Archive 
WSO2 Architecture List: architect...@wso2.org
User Forum : StackOverflow


*Reporting Issues*
We encourage you to report issues, improvements and feature requests
regarding WSO2 Integrator through WSO2 EI GIT
 Issues.

~ The WSO2 Integration Team ~

-- 
W.G. Gihan Anuruddha
Associate Technical Lead | WSO2, Inc.
M: +94772272595
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Correct way to Add users and Roles via an API

2017-11-01 Thread Farasath Ahamed
On Wed, Nov 1, 2017 at 7:38 PM, Ushani Balasooriya  wrote:

> Hi IAM team,
>
> I am trying to implement a thirdparty web app to manage users and roles
> functionalities as explained in this blog post [1] Solution 26.
>
> According to the solution, it says,
>
> *"The WSO2 Identity Server exposes a set of REST endpoints as well as
> SOAP-based services for user management, the web app just need to talk to
> these endpoints, without having to deal directly with underlying user
> stores (LDAP, AD, JDBC)."*
>
> This [2] is the only document I can find as the available API for user
> role management.
>
> Please verify whether my below understandings are correct to proceed with
> this solution.
>
> 1. Since WSO2IS does not provide any REST API for user/role management,
> there will not be a particular API where I can use as endpoint in my third
> party application.
> Therefore my web app should use a class as explained in this [2] document.
>
> 2. We should not consider SCIM as REST endpoint to manage users since it
> is used to provision users to external system. Therefore I cannot treat
> SCIM as a REST endpoint which can use to add users and roles.
>

IMO this is not entirely correct.
SCIM inbound connector is used to provision users *in to* Identity Server
and the SCIM outbound connector can be used provision user to external
systems as you explained.

SCIM inbound connector exposes a REST endpoint through which you can do
CRUD operation on users/groups. This can be considered as a REST endpoint
to manage users. Both SCIM and our SOAP APIs talk to the same underlying
user-core impelementation to achieve CRUD on users (user stores).

Moreover SCIM simply provides a RESTful layer over our usercore
funcionality. So I don't see why we should not consider SCIM as a REST API
to manage users.
Infact we have customers using SCIM to achieve user registration, user
profile update etc.

>
>
> [1] https://medium.facilelogin.com/thirty-solution-patterns-
> with-the-wso2-identity-server-16f9fd0c0389
>
> [2] https://docs.wso2.com/display/IS530/Managing+Users+and+
> Roles+with+APIs#ManagingUsersandRoleswithAPIs-addRole()
>
> Thanks,
> --
> *Ushani Balasooriya*
> Associate Technical Lead - EE;
> WSO2 Inc; http://www.wso2.com/.
>
>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Correct way to Add users and Roles via an API

2017-11-01 Thread Ushani Balasooriya
Thanks Farsath and Isura for the clarification.

On 1 Nov 2017 8:24 pm, "Isura Karunaratne"  wrote:

>
> On Wed, Nov 1, 2017 at 8:01 PM Farasath Ahamed  wrote:
>
>> On Wed, Nov 1, 2017 at 7:38 PM, Ushani Balasooriya 
>> wrote:
>>
>>> Hi IAM team,
>>>
>>> I am trying to implement a thirdparty web app to manage users and roles
>>> functionalities as explained in this blog post [1] Solution 26.
>>>
>>> According to the solution, it says,
>>>
>>> *"The WSO2 Identity Server exposes a set of REST endpoints as well as
>>> SOAP-based services for user management, the web app just need to talk to
>>> these endpoints, without having to deal directly with underlying user
>>> stores (LDAP, AD, JDBC)."*
>>>
>>> This [2] is the only document I can find as the available API for user
>>> role management.
>>>
>>> Please verify whether my below understandings are correct to proceed
>>> with this solution.
>>>
>>> 1. Since WSO2IS does not provide any REST API for user/role management,
>>> there will not be a particular API where I can use as endpoint in my third
>>> party application.
>>> Therefore my web app should use a class as explained in this [2]
>>> document.
>>>
>>> 2. We should not consider SCIM as REST endpoint to manage users since it
>>> is used to provision users to external system. Therefore I cannot treat
>>> SCIM as a REST endpoint which can use to add users and roles.
>>>
>>
> No. As Farasath explains, we do support both inbound and outbound SCIM
> provisioning.
>
> You can treat SCIM endpoint as a well defined standard way to manage users
> from a third party application.
>
> IS 5.3.0 onwards identity server supports both SCIM 1.1 and SCIM2.0 (as a
> connector)
>
> Thanks
> Isura.
>
>
>
>> IMO this is not entirely correct.
>> SCIM inbound connector is used to provision users *in to* Identity
>> Server and the SCIM outbound connector can be used provision user to
>> external systems as you explained.
>>
>> SCIM inbound connector exposes a REST endpoint through which you can do
>> CRUD operation on users/groups. This can be considered as a REST endpoint
>> to manage users. Both SCIM and our SOAP APIs talk to the same underlying
>> user-core impelementation to achieve CRUD on users (user stores).
>>
>> Moreover SCIM simply provides a RESTful layer over our usercore
>> funcionality. So I don't see why we should not consider SCIM as a REST API
>> to manage users.
>> Infact we have customers using SCIM to achieve user registration, user
>> profile update etc.
>>
>>>
>>>
>>> [1] https://medium.facilelogin.com/thirty-solution-patterns-with-the-
>>> wso2-identity-server-16f9fd0c0389
>>>
>>> [2] https://docs.wso2.com/display/IS530/Managing+Users+
>>> and+Roles+with+APIs#ManagingUsersandRoleswithAPIs-addRole()
>>>
>>> Thanks,
>>> --
>>> *Ushani Balasooriya*
>>> Associate Technical Lead - EE;
>>> WSO2 Inc; http://www.wso2.com/.
>>>
>>>
>>> --
>
> *Isura Dilhara Karunaratne*
> Associate Technical Lead | WSO2
> Email: is...@wso2.com
> Mob : +94 772 254 810 <+94%2077%20225%204810>
> Blog : http://isurad.blogspot.com/
>
>
>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [APIM] [C5] Exporting APIs with No Endpoints

2017-11-01 Thread Isuru Haththotuwa
On Wed, Nov 1, 2017 at 9:37 AM, Menuka Warushavithana 
wrote:

> HI Harsha,
> AFAIU an API would not have defined endpoints because it's still being
> constructed or have no back-end setup properly.
>
I too think this is a valid use case since endpoints are considered to be
decoupled from APIs. +1 for allow exporting APIs even when they do not have
endpoint yet.

>
> Thanks
> Menuka
>
> *Menuka Warushavithana*
> *Software Engineering Intern*
> *WSO2*
>
> *Moblie:  + <%2B%2094%2011%202145345%20%C2%A0Ext.%205737> 94 77
> 6979690 <077%20697%209690>*
>
>
>
> On Tue, Oct 31, 2017 at 6:57 PM, Harsha Kumara  wrote:
>
>> Hi Menuka,
>>
>> It's merged now. However, what's the possibility of an API without having
>> an endpoint?
>>
>> Thanks,
>> Harsha
>>
>> On Fri, Oct 27, 2017 at 12:01 PM, Menuka Warushavithana 
>> wrote:
>>
>>> Hi all,
>>> I have created a GitHub issue [1] for a bug in ExportAPI in APIM 3.0.0.
>>> I also opened a pull request [2] with a quick fix for this particular
>>> bug.
>>>
>>> [1] https://github.com/wso2/product-apim/issues/1455
>>> [2] https://github.com/wso2/carbon-apimgt/pull/4680
>>>
>>> Best Regards
>>>
>>> *Menuka Warushavithana*
>>> *Software Engineering Intern*
>>> *WSO2*
>>>
>>> *Moblie: + <%2B%2094%2011%202145345%20%C2%A0Ext.%205737> 94 77
>>> 6979690 <077%20697%209690>*
>>> *GitHub: menuka94*
>>> *LinkedIn:  **https://www.linkedin.com/in/menukawarushavithana
>>> *
>>>
>>>
>>>
>>
>>
>> --
>> Harsha Kumara
>> Software Engineer, WSO2 Inc.
>> Mobile: +94775505618 <+94%2077%20550%205618>
>> Blog:harshcreationz.blogspot.com
>>
>
>


-- 
Thanks and Regards,

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


[Dev] [ESB] Proxy server not working

2017-11-01 Thread Bhashinee Nirmali
Hi All,

I configured a proxy server in ESB 5.0.0 as given here in [1] as [2]. I
have an API[3] deployed in ESB which calls to a backend service. I have a
ballerina service with a server connector as the backend service. I used a
squid proxy as the intermediary proxy server and configured it by giving
the http_port as 3128. When I invoke the API from a curl it shows an error
like in the attached file.
When I call the same backend with a curl command with the squid proxy as
[4], it works fine.

[1]* https://docs.wso2.com/display/ESB500/Working+with+Proxy+Servers
*

[2]
true

127.0.0.1
3128



[3] http://ws.apache.org/ns/synapse; name="ttt" context="/b">
 
  
 

 
 

   http://localhost:9090/hello"/>

 
  
  
 

 
 
  
   


[4] curl -v http://localhost:9090/hello --proxy 127.0.0.1:3128

Please correct me if I have done something wrong.

Thanks and Regards

-- 
*Bhashinee Nirmali*
*Software Engineer*
*WSO2 Lanka (Private) Limited: **http://wso2.com
*
*lean.enterprise.middle-ware*


*phone: (+94) 71 21 50003*

*   Trying 172.17.0.1...
* Connected to 172.17.0.1 (172.17.0.1) port 8280 (#0)
> GET /b HTTP/1.1
> Host: 172.17.0.1:8280
> User-Agent: curl/7.47.0
> Accept: */*
> 
< HTTP/1.1 400 Bad Request
< X-Cache: MISS from bhashinee-ThinkPad-X1-Carbon-5th
< X-Cache-Lookup: NONE from bhashinee-ThinkPad-X1-Carbon-5th:3128
< Vary: Accept-Language
< X-Squid-Error: ERR_INVALID_URL 0
< Mime-Version: 1.0
< Content-Language: en
< Content-Type: text/html;charset=utf-8
< Via: 1.1 bhashinee-ThinkPad-X1-Carbon-5th (squid/3.5.12)
< Date: Mon, 30 Oct 2017 15:18:21 GMT
< Transfer-Encoding: chunked
< Connection: Close
< 
http://www.w3.org/TR/html4/strict.dtd;>



ERROR: The requested URL could not be retrieved



ERROR
The requested URL could not be retrieved




The following error was encountered while trying to retrieve the URL: /hello


Invalid URL


Some aspect of the requested URL is incorrect.

Some possible problems are:

Missing or incorrect access protocol (should be http:// or 
similar)
Missing hostname
Illegal double-escape in the URL-Path
Illegal character in hostname; underscores are not allowed.


Your cache administrator is 

Re: [Dev] [APIM] [C5] Exporting APIs with No Endpoints

2017-11-01 Thread Chamin Dias
Yes, agree with Rajith. This is something we agreed when designing
import/export tool at the beginning. (Reason - A particular endpoint in a
given environment might not make sense in another environment)

On Wed, Nov 1, 2017 at 10:39 AM, Rajith Roshan  wrote:

>
>
> On Wed, Nov 1, 2017 at 9:37 AM, Menuka Warushavithana 
> wrote:
>
>> HI Harsha,
>> AFAIU an API would not have defined endpoints because it's still being
>> constructed or have no back-end setup properly.
>>
> In APIM 2.x.x import tool also we changed the state of api as created
>  once it is imported to new state. Purpose is to modify api and re publish
> it based on the new environment. The endpoint is mainly a one parameter
> they have to change after importing to the new environment. So Importing
> without endpoint makes sense. So they can import without endpoint and edit
> the endpoint according to new environment
>
>>
>> Thanks
>> Menuka
>>
>> *Menuka Warushavithana*
>> *Software Engineering Intern*
>> *WSO2*
>>
>> *Moblie:  + <%2B%2094%2011%202145345%20%C2%A0Ext.%205737> 94 77
>> 6979690*
>>
>>
>>
>> On Tue, Oct 31, 2017 at 6:57 PM, Harsha Kumara  wrote:
>>
>>> Hi Menuka,
>>>
>>> It's merged now. However, what's the possibility of an API without
>>> having an endpoint?
>>>
>>> Thanks,
>>> Harsha
>>>
>>> On Fri, Oct 27, 2017 at 12:01 PM, Menuka Warushavithana >> > wrote:
>>>
 Hi all,
 I have created a GitHub issue [1] for a bug in ExportAPI in APIM 3.0.0.
 I also opened a pull request [2] with a quick fix for this particular
 bug.

 [1] https://github.com/wso2/product-apim/issues/1455
 [2] https://github.com/wso2/carbon-apimgt/pull/4680

 Best Regards

 *Menuka Warushavithana*
 *Software Engineering Intern*
 *WSO2*

 *Moblie: + <%2B%2094%2011%202145345%20%C2%A0Ext.%205737> 94 77
 6979690*
 *GitHub: menuka94*
 *LinkedIn:  **https://www.linkedin.com/in/menukawarushavithana
 *



>>>
>>>
>>> --
>>> Harsha Kumara
>>> Software Engineer, WSO2 Inc.
>>> Mobile: +94775505618 <+94%2077%20550%205618>
>>> Blog:harshcreationz.blogspot.com
>>>
>>
>>
>
>
> --
> Rajith Roshan
> Senior Software Engineer, WSO2 Inc.
> Mobile: +94-7 <%2B94-71-554-8430>17-064-214
>



-- 
Chamin Dias
Mobile : 0716097455
Email : cham...@wso2.com
LinkedIn : https://www.linkedin.com/in/chamindias
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Docker ReadMe is unclear

2017-11-01 Thread Saneth Dharmakeerthi
Hi Aparna,

How to build the Docker image and running steps are mention in the ReadMe
file inside the dockerfile folder[1].

Agreed with you, There should be a link form root ReadMe file to this one.

[1] https://github.com/wso2/docker-is/tree/release-5.3.0/dockerfile

Thanks and Best Regards,

Saneth Dharmakeerthi
*Associate Technical Lead*
WSO2, Inc.
Mobile: +94772325511



On Tue, Oct 31, 2017 at 3:37 PM, Aparna Karunarathna 
wrote:

> Hi All,
>
> Docker images creating steps are not clear.
>
> I have configured the K8S cluster and then started creating the docker
> images. In order to do that, I followed the link [1] ReadMe, after
> executing the last command "git submodule update" there's no way to find
> out what to do next?
>
> Seems like this is common to all docker repos.
>
>
> [1] https://github.com/wso2/docker-is/tree/release-5.3.0
>
> --
> *Regards,*
>
> *Aparna Karunarathna.*
>
>
> *Associate Technical Lead - QAWSO2 Inc.Mobile: 0714002533*
>
> * *
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Error occurred while generating keys for Default application

2017-11-01 Thread Gayan Gunawardana
Hi All,

I got this exception first time only when generating keys for Default
application.

Environment:

   - IS as KM IS-5.3.0 and APIM-2.1.0
   - DB postgres-10
   - Without patches or wum updates

Other applications works fine. If I delete Default application and create
new one with same name it works.
Appreciate your input.

[2017-10-31 20:53:13,463] ERROR - ApplicationRegistrationSimpleWorkflowExecutor
Error occurred when updating the status of the Application creation process
org.wso2.carbon.apimgt.api.APIManagementException: Application
'DefaultApplication' is already registered.
at org.wso2.carbon.apimgt.impl.dao.ApiMgtDAO.
createApplicationRegistrationEntry(ApiMgtDAO.java:293)
at org.wso2.carbon.apimgt.impl.workflow.ApplicationRegistrationSimpleW
orkflowExecutor.complete(ApplicationRegistrationSimpleW
orkflowExecutor.java:77)
at org.wso2.carbon.apimgt.impl.workflow.ApplicationRegistrationSimpleW
orkflowExecutor.execute(ApplicationRegistrationSimpleW
orkflowExecutor.java:54)
at org.wso2.carbon.apimgt.impl.APIConsumerImpl.
requestApprovalForApplicationRegistration(APIConsumerImpl.java:2789)
at org.wso2.carbon.apimgt.impl.UserAwareAPIConsumer.
requestApprovalForApplicationRegistration(UserAwareAPIConsumer.java:36)
at org.wso2.carbon.apimgt.hostobjects.APIStoreHostObject.jsFunction_
getApplicationKey(APIStoreHostObject.java:385)
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.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:386)
at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52)
at org.jaggeryjs.rhino.store.modules.subscription.c4._c_
anonymous_2(/store/modules/subscription/key.jag:39)
at org.jaggeryjs.rhino.store.modules.subscription.c4.call(/
store/modules/subscription/key.jag)
at org.mozilla.javascript.ScriptRuntime.applyOrCall(
ScriptRuntime.java:2430)
at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:269)
at org.mozilla.javascript.IdFunctionObject.call(
IdFunctionObject.java:97)
at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42)
at org.jaggeryjs.rhino.store.modules.subscription.c0._c_
anonymous_10(/store/modules/subscription/module.jag:35)
at org.jaggeryjs.rhino.store.modules.subscription.c0.call(/
store/modules/subscription/module.jag)
at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52)
at org.jaggeryjs.rhino.store.site.blocks.subscription.
subscription_add.ajax.c0._c_anonymous_1(/store/site/blocks/subscription/
subscription-add/ajax/subscription-add.jag:240)
at org.jaggeryjs.rhino.store.site.blocks.subscription.
subscription_add.ajax.c0.call(/store/site/blocks/
subscription/subscription-add/ajax/subscription-add.jag)
at org.mozilla.javascript.optimizer.OptRuntime.call0(OptRuntime.java:23)
at org.jaggeryjs.rhino.store.site.blocks.subscription.
subscription_add.ajax.c0._c_script_0(/store/site/blocks/
subscription/subscription-add/ajax/subscription-add.jag:3)
at org.jaggeryjs.rhino.store.site.blocks.subscription.
subscription_add.ajax.c0.call(/store/site/blocks/
subscription/subscription-add/ajax/subscription-add.jag)
at org.mozilla.javascript.ContextFactory.doTopCall(
ContextFactory.java:394)
at org.mozilla.javascript.ScriptRuntime.doTopCall(
ScriptRuntime.java:3091)
at org.jaggeryjs.rhino.store.site.blocks.subscription.
subscription_add.ajax.c0.call(/store/site/blocks/
subscription/subscription-add/ajax/subscription-add.jag)
at org.jaggeryjs.rhino.store.site.blocks.subscription.
subscription_add.ajax.c0.exec(/store/site/blocks/
subscription/subscription-add/ajax/subscription-add.jag)
at org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(
RhinoEngine.java:567)
at org.jaggeryjs.scriptengine.engine.RhinoEngine.exec(
RhinoEngine.java:273)
at org.jaggeryjs.jaggery.core.manager.WebAppManager.exec(
WebAppManager.java:588)
at org.jaggeryjs.jaggery.core.manager.WebAppManager.execute(
WebAppManager.java:508)
at org.jaggeryjs.jaggery.core.JaggeryServlet.doPost(
JaggeryServlet.java:29)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:208)
at org.apache.catalina.core.ApplicationDispatcher.invoke(
ApplicationDispatcher.java:747)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(
ApplicationDispatcher.java:485)
at 

Re: [Dev] [APIM] [C5] Exporting APIs with No Endpoints

2017-11-01 Thread Menuka Warushavithana
HI Harsha,
AFAIU an API would not have defined endpoints because it's still being
constructed or have no back-end setup properly.

Thanks
Menuka

*Menuka Warushavithana*
*Software Engineering Intern*
*WSO2*

*Moblie:  + <%2B%2094%2011%202145345%20%C2%A0Ext.%205737> 94 77 6979690*



On Tue, Oct 31, 2017 at 6:57 PM, Harsha Kumara  wrote:

> Hi Menuka,
>
> It's merged now. However, what's the possibility of an API without having
> an endpoint?
>
> Thanks,
> Harsha
>
> On Fri, Oct 27, 2017 at 12:01 PM, Menuka Warushavithana 
> wrote:
>
>> Hi all,
>> I have created a GitHub issue [1] for a bug in ExportAPI in APIM 3.0.0.
>> I also opened a pull request [2] with a quick fix for this particular bug.
>>
>> [1] https://github.com/wso2/product-apim/issues/1455
>> [2] https://github.com/wso2/carbon-apimgt/pull/4680
>>
>> Best Regards
>>
>> *Menuka Warushavithana*
>> *Software Engineering Intern*
>> *WSO2*
>>
>> *Moblie: + <%2B%2094%2011%202145345%20%C2%A0Ext.%205737> 94 77
>> 6979690*
>> *GitHub: menuka94*
>> *LinkedIn:  **https://www.linkedin.com/in/menukawarushavithana
>> *
>>
>>
>>
>
>
> --
> Harsha Kumara
> Software Engineer, WSO2 Inc.
> Mobile: +94775505618 <+94%2077%20550%205618>
> Blog:harshcreationz.blogspot.com
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev