[Dev] WSO2 Committers += Viraj Gamage

2020-09-27 Thread Rajith Roshan
Hi All,

It's my pleasure to announce Viraj Gamage as a WSO2 Committer. He has been
a valuable contributor and enthusiast to the WSO2 API Manager team.

In recognition of his contribution, dedication, and commitment he has been
voted as a WSO2 committer.

Congratulations VirajG and keep up the good work...!!!

Thanks!
Rajith

-- 
*Rajith Roshan* | Associate Technical Lead | WSO2 Inc.
(m) +94-717-064-214 |  (e) raji...@wso2.com 
blog: http://www.rajithr.com

<https://wso2.com/signature>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [Architecture][Vote] Release of WSO2 API Microgateway 3.2.0 RC2

2020-08-25 Thread Rajith Roshan
Hi all ,
Tested following scenarios:

   - Test jwt flow without subscription validation
   - Test subscription validation with pilot configurations to connect with
   APIM
   - Use apictl to import the API to API Manager and invoke using both
   microgateway and synapse gateway
   - Test api with multiple scopes.
   - Test apictl default version is enabled when x-wso2-basePath only
   presents in the open API.

No blockers found.

*[+] Stable* - Go ahead and release



On Sat, Aug 22, 2020 at 4:10 PM Menaka Jayawardena  wrote:

> Hi All,
>
> WSO2 Api Manager team is pleased to announce the second release candidate
> of WSO2 API Microgateway 3.2.0.
>
> The WSO2 API Microgateway is a lightweight, gateway distribution which can
> be used to expose single or multiple APIs.
>
> Please find the improvements and fixes related to this release in Fixed
> issues
> <https://github.com/wso2/product-microgateway/issues?q=is%3Aissue+project%3Awso2%2Fproduct-microgateway%2F9+is%3Aclosed+label%3AType%2FBug+>
>
> Download the product from here
> <https://github.com/wso2/product-microgateway/releases/tag/v3.2.0-rc2>
>
> The Tag to be voted upon is
> https://github.com/wso2/product-microgateway/tree/v3.2.0-rc2
>
> *Documentation*: https://mg.docs.wso2.com/en/latest/
>
> Please download, test the product and vote.
>
> *[+] Stable* - Go ahead and release
>
> *[-] Broken* - Do not release (explain why)
>
>
> Best Regards,
> WSO2 API Manager Team
>
>
> --
> *Menaka Jayawardena*
> Senior Software Engineer *|* *WSO2* *Inc*.
> +94 71 350 5470 | men...@wso2.com
>
> <https://wso2.com/signature>
>
>

-- 
*Rajith Roshan* | Associate Technical Lead | WSO2 Inc.
(m) +94-717-064-214 |  (e) raji...@wso2.com 
blog: http://www.rajithr.com

<https://wso2.com/signature>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] WSO2 API Microgateway 3.2.0-Alpha Released!

2020-06-14 Thread Rajith Roshan
The WSO2 API Manager team is pleased to announce the release of API
Microgateway version 3.2.0-Alpha.
It's now available to download.Download
wso2am-micro-gw-3.2.0-alpha
<https://github.com/wso2/product-microgateway/releases/tag/v3.2.0-alpha>

Bug Fixes and Improvements in 3.2.0-Alpha

Fixed Issues
<https://github.com/wso2/product-microgateway/issues?q=is%3Aissue+is%3Aclosed+milestone%3A3.2.0-alpha>
Known Issues

Open Issues
<https://github.com/wso2/product-microgateway/issues?q=is%3Aopen+is%3Aissue>
Try it

https://mg.docs.wso2.com/en/latest/getting-started/quick-start-guide/quick-start-guide-overview/
Documentation

https://mg.docs.wso2.com/
How You Can Contribute

   -

   *Reporting Issues*
   We encourage you to report issues, documentation faults, and feature
   requests regarding WSO2 API Microgateway through the Github Issues
   <https://github.com/wso2/product-microgateway/issues>.
   -

   *Contributing Code*
   Read through project Contribution Guidelines
   <https://github.com/wso2/product-microgateway/blob/master/CONTRIBUTING.md>
to
   learn how to contribute with code.
   -

   *Mailing Lists*
   Join our mailing list and receive updates on product development.
   Developer List: dev@wso2.org
   -

   *User Forum*
   Go through the StackOverflow
   <https://stackoverflow.com/questions/tagged/wso2-mgw>
   -

   *Slack channels*
   Join us via our wso2-apim.slack.com for even better communication. You
   can talk to our developers directly regarding any issues, concerns about
   the product. We encourage you to start discussions or join any ongoing
   discussions with the team, via our slack channels.
 - Discussions about developments: Dev Channel
   <https://wso2-apim.slack.com/messages/microgateway>
 - New releases: Release Announcement Channel
   <https://wso2-apim.slack.com/messages/announcements>

*--WSO2 API Manager Team--*

-- 
*Rajith Roshan* | Associate Technical Lead | WSO2 Inc.
(m) +94-717-064-214 |  (e) raji...@wso2.com 
blog: http://www.rajithr.com

<https://wso2.com/signature>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] WSO2 Committers += Amali Matharaarachchi

2020-04-24 Thread Rajith Roshan
Hi All,

It's my pleasure to announce Amali Matharaarachchi as a WSO2 Committer. She
has been a valuable contributor and enthusiast to the WSO2 API Manager team.

In recognition of her contribution, dedication, and commitment she has been
voted as a WSO2 committer.

Congratulations Amali and keep up the good work...!!!

Thanks!
Rajith

-- 
*Rajith Roshan* | Associate Technical Lead | WSO2 Inc.
(m) +94-717-064-214 |  (e) raji...@wso2.com 
blog: http://www.rajithr.com

<https://wso2.com/signature>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DEV] [VOTE] Release WSO2 API Manager Tooling v3.1.0 RC4

2020-04-05 Thread Rajith Roshan
Hi all,
Tested the basic scenarios with microgateway.

No blockers found

*[+] Stable - Go ahead and release*

On Sun, Apr 5, 2020 at 5:02 PM Chashika Weerathunga 
wrote:

> Hi all,
>
> Tested the following scenarios.
>
>- Followed the getting started guide.
>- Tested apictl for the integration of Microgateway and APIM
>   - Create Microgateway swaggers(with different versions) and
>   import it to APIM using apictl and invoke it using JWT and Opaque 
> tokens.
>
> No blockers found
>
> *[+] Stable - Go ahead and release*
>
> On Fri, Apr 3, 2020 at 2:16 PM Naduni Pamudika  wrote:
>
>> Hi All,
>>
>> WSO2 Api Manager team is pleased to announce the fourth release candidate
>> of WSO2 API Manager Tooling 3.1.0 version.
>>
>> The WSO2 API Manager tooling provides the capability to import and export
>> APIs and Applications across multiple environments seamlessly. Hence it
>> provides greater flexibility to create CI/CD pipelines for APIs and
>> applications.
>>
>> Apart from migrating APIs and applications, it supports Kubernetes API
>> operator to deploy and manage APIs in the Kubernetes cluster by reducing
>> additional overheads for the DevOps.
>>
>> Please find the improvements and fixes related to this release in Fixed
>> Issues
>> <https://github.com/wso2/product-apim-tooling/issues?q=is%3Aissue+is%3Aclosed+label%3A3.1.0>
>> .
>>
>> Download the API Manager Tooling Distribution from here
>> <https://github.com/wso2/product-apim-tooling/releases/tag/v3.1.0-rc4>.
>>
>> The tag to be voted upon is
>> https://github.com/wso2/product-apim-tooling/releases/tag/v3.1.0-rc4
>>
>> Documentation:
>> https://apim.docs.wso2.com/en/next/learn/api-controller/getting-started-with-wso2-api-controller/
>>
>> Please download, test the tool and vote.
>>
>>
>> *[+] Stable - Go ahead and release*
>>
>> *[-] Broken - Do not release *(explain why)
>>
>>
>>
>> Best Regards,
>> WSO2 API Manager Team
>>
>> --
>> *Naduni Pamudika* | Senior Software Engineer | WSO2 Inc.
>> (m) +94 (71) 9143658 | (w) +94 (11) 2145345 | (e) nad...@wso2.com
>> [image: http://wso2.com/signature] <http://wso2.com/signature>
>>
>>
>
> --
> *Chashika Weerathunga* | Software Engineer | WSO2 Inc.
> (m) +94713731206 | Email: chash...@wso2.com
> [image: http://wso2.com]
> <http://wso2.com>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>


-- 
*Rajith Roshan* | Associate Technical Lead | WSO2 Inc.
(m) +94-717-064-214 |  (e) raji...@wso2.com 
blog: http://www.rajithr.com

<https://wso2.com/signature>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DEV] [VOTE] Release WSO2 API Manager Tooling v3.1.0 RC3

2020-04-02 Thread Rajith Roshan
Hi all,
Tested apictl for the integration of microgateway and APIM. Tested
following scenario
1. Create microgateway swagger and import to APIM using apictl and invoke
using oauth2 tokens
2. Added scopes and scope bindings and check for scope validation with MGW
and gateway by importing MGW swagger to APIM

No blockers found

*[+] Stable - Go ahead and release*

On Thu, Apr 2, 2020 at 7:30 PM Naduni Pamudika  wrote:

> Hi All,
>
> WSO2 Api Manager team is pleased to announce the third release candidate
> of WSO2 API Manager Tooling 3.1.0 version.
>
> The WSO2 API Manager tooling provides the capability to import and export
> APIs and Applications across multiple environments seamlessly. Hence it
> provides greater flexibility to create CI/CD pipelines for APIs and
> applications.
>
> Apart from migrating APIs and applications, it supports Kubernetes API
> operator to deploy and manage APIs in the Kubernetes cluster by reducing
> additional overheads for the DevOps.
>
> Please find the improvements and fixes related to this release in Fixed
> Issues
> <https://github.com/wso2/product-apim-tooling/issues?q=is%3Aissue+is%3Aclosed+label%3A3.1.0>
> .
>
> Download the API Manager Tooling Distribution from here
> <https://github.com/wso2/product-apim-tooling/releases/tag/v3.1.0-rc3>.
>
> The tag to be voted upon is
> https://github.com/wso2/product-apim-tooling/releases/tag/v3.1.0-rc3
>
> Documentation:
> https://apim.docs.wso2.com/en/next/learn/api-controller/getting-started-with-wso2-api-controller/
>
> Please download, test the tool and vote.
>
>
> *[+] Stable - Go ahead and release*
>
> *[-] Broken - Do not release *(explain why)
>
>
>
> Best Regards,
> WSO2 API Manager Team
>
> --
> *Naduni Pamudika* | Senior Software Engineer | WSO2 Inc.
> (m) +94 (71) 9143658 | (w) +94 (11) 2145345 | (e) nad...@wso2.com
> [image: http://wso2.com/signature] <http://wso2.com/signature>
>
>

-- 
*Rajith Roshan* | Associate Technical Lead | WSO2 Inc.
(m) +94-717-064-214 |  (e) raji...@wso2.com 
blog: http://www.rajithr.com

<https://wso2.com/signature>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [Vote] Release of WSO2 API Microgateway 3.1.0 RC2

2020-03-25 Thread Rajith Roshan
Hi all,
Tested the following scenarios.

   - Tested Oauth2 with APIM 3.1.0-RC3
   - Tested oauth2 scopes authentications
   - Tested templating the basePath with Oauth2
   - Tested following scenarios in k8s

   - Jwt authentication
   - Multiple JWT issuers with auth0
   - Analytics file rotation task

No issues found.
*[+] Stable - Go ahead and release*

On Tue, Mar 24, 2020 at 11:43 PM Praminda Jayawardana 
wrote:

> Hi All,
>
> WSO2 Api Manager team is pleased to announce the second release candidate
> of WSO2 API Microgateway 3.1.0.
>
> The WSO2 API Microgateway is a lightweight, gateway distribution which can
> be used to expose single or multiple APIs.
>
> Please find the improvements and fixes related to this release in Fixed
> issues
> <https://github.com/wso2/product-microgateway/issues?q=is%3Aissue+project%3Awso2%2Fproduct-microgateway%2F3+-label%3AType%2FDocs+-label%3AType%2FTask+-label%3AType%2FQuestion+-label%3AType%2FSpam>
>
> Download the product from here
> <https://github.com/wso2/product-microgateway/releases/tag/v3.1.0-rc2>
>
> The Tag to be voted upon is
> https://github.com/wso2/product-microgateway/tree/v3.1.0-rc2
>
>
> Documentation: https://docs.wso2.com/display/MG310/
>
> Please download, test the product and vote.
>
>
> *[+] Stable - Go ahead and release*
>
> *[-] Broken - Do not release *(explain why)
>
> Best Regards,
> WSO2 API Manager Team
>


-- 
*Rajith Roshan* | Associate Technical Lead | WSO2 Inc.
(m) +94-717-064-214 |  (e) raji...@wso2.com 
blog: http://www.rajithr.com

<https://wso2.com/signature>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DEV] [VOTE] Release WSO2 API Microgateway 3.1.0 RC1

2020-03-22 Thread Rajith Roshan
Hi all,
Tested the following scenarios.


   - Test open APi without wso2 specific extensions
   - Tested Oauth2 with APIM 3.1.0-RC3
   - Tested oauth2 scopes authentications
   - Tested Basic authentication + scopes
   - Tested the quick start guide on docker.


No issues found
*[+] Stable - Go ahead and release*

Thanks!
Rajith



On Sat, Mar 21, 2020 at 3:20 AM Praminda Jayawardana 
wrote:

> Hi All,
>
> WSO2 Api Manager team is pleased to announce the first release candidate
> of WSO2 API Microgateway 3.1.0.
>
> The WSO2 API Microgateway is a lightweight, gateway distribution which can
> be used to expose single or multiple APIs.
>
> Please find the improvements and fixes related to this release in Fixed
> issues
> <https://github.com/wso2/product-microgateway/issues?q=is%3Aissue+project%3Awso2%2Fproduct-microgateway%2F3+-label%3AType%2FDocs+-label%3AType%2FTask+-label%3AType%2FQuestion+-label%3AType%2FSpam>
>
> Download the product from here
> <https://github.com/wso2/product-microgateway/releases/tag/v3.1.0-rc1>
>
> The Tag to be voted upon is
> https://github.com/wso2/product-microgateway/tree/v3.1.0-rc1
>
>
> Documentation: https://docs.wso2.com/display/MG310/
>
> Please download, test the product and vote.
>
>
> *[+] Stable - Go ahead and release*
>
> *[-] Broken - Do not release *(explain why)
>
> Best Regards,
> WSO2 API Manager Team
>


-- 
*Rajith Roshan* | Associate Technical Lead | WSO2 Inc.
(m) +94-717-064-214 |  (e) raji...@wso2.com 
blog: http://www.rajithr.com

<https://wso2.com/signature>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Support multiple jwt issuers in the microgateway

2020-02-23 Thread Rajith Roshan
On Sun, Feb 23, 2020 at 8:22 PM Amali Matharaarachchi 
wrote:

> Hi all,
>
> We will support multiple JWT issuers as the following configuration.
> Ballerina 1.1.2 provided the Array of maps functionality for toml
> configuration file.
> To validate subscription at the issuer level, the subscription validation
> logic will be moved from the subscription filter to the JWT authentication
> handler.
>
+1. This should be similar to API keys as well, since subscription filter
is removed.

> I appreciate your thoughts on this.
>
> # Issuer 1
> [[jwtTokenConfig]]
>   issuer = "https://localhost:9443/oauth2/token";
>   audience = "http://org.wso2.apimgt/gateway";
>   certificateAlias = "wso2apim"
>   validateSubscription = false
> # Issuer 2
> [[jwtTokenConfig]]
>   issuer = "https://host/issuer2";
>   audience = "http://org.wso2.apimgt/gateway";
>   certificateAlias = "alias"
>   validateSubscription = false
>
> [1] PR - https://github.com/wso2/product-microgateway/pull/1023/
>
> Thanks,
>
> On Mon, Dec 16, 2019 at 9:58 AM Rajith Roshan  wrote:
>
>>
>>
>> On Fri, Dec 13, 2019 at 10:02 PM Harsha Kumara  wrote:
>>
>>>
>>>
>>> On Fri, Dec 13, 2019 at 12:30 PM Rajith Roshan  wrote:
>>>
>>>> Hi all,
>>>> In microgateway 3.0.2 version we only supports jwt tokens issued by a
>>>> single issuer. (The current config [1]). But there can be use cases where
>>>> microgateways need to support jwts issued by multiple  issuers (STS).
>>>> So we are planning to support the multiple issuers with
>>>> jballerina update of the microgateway. For each new issuer defined in the
>>>> config, authentication handler will be registered during the mgw startup
>>>> and each token will be validated by each handler until the correct handler
>>>> is found for that particular issuer of the token.
>>>> We are planning to extend the configuration as below [2].
>>>> Ideally the config should look like [3]. But in ballerina right now
>>>> there is a limitation in the config API in order to read the array objects
>>>> from the toml files.
>>>> Please find the github issue [4].
>>>> Please share your thoughts about this.
>>>>
>>> Looks fine till we this getting fix from bellerina. But this will
>>> involve with a migration when it's fixed. How soon can we get this fixed
>>> from ballerina and proceed with the [3]?
>>>
>> Seems like this will be available[1] in ballerina 1.1.1. I think we can
>> use the array functionality once it is available. @Pubudu Fernando
>>  is there any rough date when this would be available.
>>
>> [1] -
>> https://github.com/ballerina-platform/ballerina-lang/issues/10633#issuecomment-565413239
>>
>>>
>>>> [1] -
>>>> [jwtTokenConfig]
>>>> issuer="https://localhost:9443/oauth2/token";
>>>> audience="http://org.wso2.apimgt/gateway";
>>>> certificateAlias="wso2apim"
>>>>
>>>> [2]
>>>> [*jwtTokenConfig*]
>>>> issuer="https://localhost:9443/oauth2/token";
>>>> audience="http://org.wso2.apimgt/gateway";
>>>> certificateAlias="wso2apim"
>>>>
>>>> [*jwtTokenConfig1*]
>>>> issuer="issuer1"
>>>> audience="aud1"
>>>> certificateAlias="alias1"
>>>>
>>>> [*jwtTokenConfig2*]
>>>> issuer="issuer2"
>>>> audience="aud2"
>>>> certificateAlias="alias2"
>>>>
>>>> [3]
>>>> [[*jwtTokenConfig*]]
>>>> issuer="https://localhost:9443/oauth2/token";
>>>> audience="http://org.wso2.apimgt/gateway";
>>>> certificateAlias="wso2apim"
>>>>
>>>> [[*jwtTokenConfig*]]
>>>> issuer="issuer1"
>>>> audience="aud1"
>>>> certificateAlias="alias1"
>>>>
>>>> [[*jwtTokenConfig*]]
>>>> issuer="issuer2"
>>>> audience="aud2"
>>>> certificateAlias="alias2"
>>>>
>>>> [4] - https://github.com/wso2/product-microgateway/issues/271
>>>>
>>>> Thanks!
>>>> Rajith
>>>> --
>>>> *Rajith Roshan* | Associate Technical Lead | WSO2 Inc.
>>>> (m) +94-717-064-214 |  (e) raji...@wso2.com 
>>>> blog: http://www.rajithr.com
>>>>
>>>> <https://wso2.com/signature>
>>>>
>>>
>>>
>>> --
>>>
>>> *Harsha Kumara*
>>>
>>> Technical Lead, WSO2 Inc.
>>> Mobile: +94775505618
>>> Email: hars...@wso2.coim
>>> Blog: harshcreationz.blogspot.com
>>>
>>> GET INTEGRATION AGILE
>>> Integration Agility for Digitally Driven Business
>>>
>>
>>
>> --
>> *Rajith Roshan* | Associate Technical Lead | WSO2 Inc.
>> (m) +94-717-064-214 |  (e) raji...@wso2.com 
>> blog: http://www.rajithr.com
>>
>> <https://wso2.com/signature>
>>
>
>
> --
> *Amali Lakshika*
>
>
>
>
> *Software EngineerWSO2 Inc.: https://wso2.com
> <http://wso2.com/>lean.enterprise.middle-waremobile: **+94 71 932 1861*
>
> *skype: amali.94d*
>
> <http://wso2.com/signature>
>
>


-- 
*Rajith Roshan* | Associate Technical Lead | WSO2 Inc.
(m) +94-717-064-214 |  (e) raji...@wso2.com 
blog: http://www.rajithr.com

<https://wso2.com/signature>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Microgateway support authentication via standard introspection

2020-01-01 Thread Rajith Roshan
Hi Harsha,

We thought of adding the following configuration sections[1] to in order to
communicate with secured introspect endpoint.
Currently we will be supporting basic and oauth2 for the introspect
endpoints.
Under the oauth2 it will support following 3 types.
1. Get a token with client credential grant in order to invoke introspect
endpoint
2. Get a token with password grant in order to invoke introspect endpoint
3. Providing the direct access token for the introspect endpoint.

In all these scenarios if the refresh config is enabled, it should
automatically refresh the token when calling introspect endpoint.


[1] -
[keyManager]
serverUrl="https://localhost:9443";
tokenContext="oauth2"
timestampSkew=5000
external=false
[keymanager.security.basic]
enabled= true
username="admin"
password="admin"
[keymanager.security.oauth2]
enabled = false
tokenUrl = ""
[keymanager.security.oauth2.clientCredential]
enabled = false;
clientId = ""
clientSecret = ""
scopes = ""
[keymanager.security.oauth2.password]
enabled = false
clientId = ""
clientSecret = ""
scopes = ""
username= ""
password = ""
[keymanager.security.oauth2.directToken]
enabled = false
accessToken = ""
[keymanager.security.oauth2.refresh]
enabled = false
refreshUrl = ""
scopes = ""
refreshToken = ""
clientId = ""
clientSecret = ""

On Tue, Dec 17, 2019 at 9:08 AM Rajith Roshan  wrote:

>
>
> On Mon, Dec 16, 2019 at 9:37 PM Harsha Kumara  wrote:
>
>>
>>
>> On Mon, Dec 16, 2019 at 9:09 PM Rajith Roshan  wrote:
>>
>>>
>>>
>>> On Mon, Dec 16, 2019 at 7:57 PM Harsha Kumara  wrote:
>>>
>>>>
>>>>
>>>> On Mon, Dec 16, 2019 at 7:01 PM Rajith Roshan  wrote:
>>>>
>>>>> Hi all,
>>>>> Microgateway 3.0.x versions support for opaque oauth2 token are
>>>>> tightly bound with APIM key manager component. Right now it validates 
>>>>> token
>>>>> using the key validation service of APIM, which does the token validation,
>>>>> scope validation, subscription validation (and back end jwt generation if
>>>>> enabled).
>>>>>
>>>>> We will need to provide a way to plug microgateway with an oauth2
>>>>> server with standard introspect endpoint for token validation. Following
>>>>> limitations would incur due to the usage of standard introspection.
>>>>>
>>>>> 1. Subscription validation can not be enforced.
>>>>> 2. Rate limiting using application level throttling
>>>>> 3. Rate limiting using subscription level throttling
>>>>> 4. Completeness of analytics dashboard data
>>>>>
>>>>> These are the same limitations, we have when we use a self
>>>>> contains jwt token from a third party key manager(STS).
>>>>>
>>>>> The key manager configuration of the microgateway is below[1]. We can
>>>>> add an additional parameter[2] to specify to use an external key manager
>>>>> instead of the WSO2 key manager.
>>>>>
>>>> Can we check the authentication section of RFC for the introspection
>>>> endpoint and allow flexibility to configure the possible authentication
>>>> mechanism. Basic authentication is basic. But some might use special bearer
>>>> token or the clientId. Can we check[1] and provide the flexibility to use
>>>> standard authentication for introspection.
>>>>
>>> The idea here is to support the standard introspection for the token
>>> validation in the microgateway. When request comes to the microgateway with
>>> bearer header it will validate the token using the standard introspect
>>> endpoint. And also it will support wso2 key manager(APIM) token validation
>>> as well if external key managers are not used
>>>
>> Yes that's correct. The introspection API is protected with different
>> authentication mechanisms by different providers. Just wanted to check
>> whether there are any standard types such as protected with client Id and
>> etc and check on the feasibility of giving those options.
>>
> Yes, since the spec[1] does not explicitly explains the security
> mechanisms to protect intorspect endpoint, different vendors might be using
> different techniques, we need to come up with a common way to provide
> security credentials (user credentials, token and etc) , when using the
> introspect endpoint from the microgateway
>
>>
>

Re: [Dev] Microgateway support authentication via standard introspection

2019-12-16 Thread Rajith Roshan
On Mon, Dec 16, 2019 at 9:37 PM Harsha Kumara  wrote:

>
>
> On Mon, Dec 16, 2019 at 9:09 PM Rajith Roshan  wrote:
>
>>
>>
>> On Mon, Dec 16, 2019 at 7:57 PM Harsha Kumara  wrote:
>>
>>>
>>>
>>> On Mon, Dec 16, 2019 at 7:01 PM Rajith Roshan  wrote:
>>>
>>>> Hi all,
>>>> Microgateway 3.0.x versions support for opaque oauth2 token are tightly
>>>> bound with APIM key manager component. Right now it validates token using
>>>> the key validation service of APIM, which does the token validation, scope
>>>> validation, subscription validation (and back end jwt generation if
>>>> enabled).
>>>>
>>>> We will need to provide a way to plug microgateway with an oauth2
>>>> server with standard introspect endpoint for token validation. Following
>>>> limitations would incur due to the usage of standard introspection.
>>>>
>>>> 1. Subscription validation can not be enforced.
>>>> 2. Rate limiting using application level throttling
>>>> 3. Rate limiting using subscription level throttling
>>>> 4. Completeness of analytics dashboard data
>>>>
>>>> These are the same limitations, we have when we use a self contains jwt
>>>> token from a third party key manager(STS).
>>>>
>>>> The key manager configuration of the microgateway is below[1]. We can
>>>> add an additional parameter[2] to specify to use an external key manager
>>>> instead of the WSO2 key manager.
>>>>
>>> Can we check the authentication section of RFC for the introspection
>>> endpoint and allow flexibility to configure the possible authentication
>>> mechanism. Basic authentication is basic. But some might use special bearer
>>> token or the clientId. Can we check[1] and provide the flexibility to use
>>> standard authentication for introspection.
>>>
>> The idea here is to support the standard introspection for the token
>> validation in the microgateway. When request comes to the microgateway with
>> bearer header it will validate the token using the standard introspect
>> endpoint. And also it will support wso2 key manager(APIM) token validation
>> as well if external key managers are not used
>>
> Yes that's correct. The introspection API is protected with different
> authentication mechanisms by different providers. Just wanted to check
> whether there are any standard types such as protected with client Id and
> etc and check on the feasibility of giving those options.
>
Yes, since the spec[1] does not explicitly explains the security mechanisms
to protect intorspect endpoint, different vendors might be using different
techniques, we need to come up with a common way to provide security
credentials (user credentials, token and etc) , when using the introspect
endpoint from the microgateway

>
>>> [1]
>>>
>>>>
>>>> Please share your thoughts regarding this.
>>>>
>>>> [1] - [keyManager]
>>>> serverUrl="https://localhost:9443";
>>>> username="admin"  // to connect with key validation admin service
>>>> password="admin"
>>>> tokenContext="oauth2"
>>>> timestampSkew=5000
>>>>
>>>> [2] - [keyManager]
>>>> serverUrl="https://localhost:9443";
>>>> username="admin"  // to connect with key validation admin service
>>>> password="admin"
>>>> tokenContext="oauth2"
>>>> timestampSkew=5000
>>>> external = true
>>>>
>>>> --
>>>> *Rajith Roshan* | Associate Technical Lead | WSO2 Inc.
>>>> (m) +94-717-064-214 |  (e) raji...@wso2.com 
>>>> blog: http://www.rajithr.com
>>>>
>>>> <https://wso2.com/signature>
>>>>
>>>
>>>
>>> --
>>>
>>> *Harsha Kumara*
>>>
>>> Technical Lead, WSO2 Inc.
>>> Mobile: +94775505618
>>> Email: hars...@wso2.coim
>>> Blog: harshcreationz.blogspot.com
>>>
>>> GET INTEGRATION AGILE
>>> Integration Agility for Digitally Driven Business
>>>
>>
>>
>> --
>> *Rajith Roshan* | Associate Technical Lead | WSO2 Inc.
>> (m) +94-717-064-214 |  (e) raji...@wso2.com 
>> blog: http://www.rajithr.com
>>
>> <https://wso2.com/signature>
>>
>
>
> --
>
> *Harsha Kumara*
>
> Technical Lead, WSO2 Inc.
> Mobile: +94775505618
> Email: hars...@wso2.coim
> Blog: harshcreationz.blogspot.com
>
> GET INTEGRATION AGILE
> Integration Agility for Digitally Driven Business
>


-- 
*Rajith Roshan* | Associate Technical Lead | WSO2 Inc.
(m) +94-717-064-214 |  (e) raji...@wso2.com 
blog: http://www.rajithr.com

<https://wso2.com/signature>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Microgateway support authentication via standard introspection

2019-12-16 Thread Rajith Roshan
On Mon, Dec 16, 2019 at 7:57 PM Harsha Kumara  wrote:

>
>
> On Mon, Dec 16, 2019 at 7:01 PM Rajith Roshan  wrote:
>
>> Hi all,
>> Microgateway 3.0.x versions support for opaque oauth2 token are tightly
>> bound with APIM key manager component. Right now it validates token using
>> the key validation service of APIM, which does the token validation, scope
>> validation, subscription validation (and back end jwt generation if
>> enabled).
>>
>> We will need to provide a way to plug microgateway with an oauth2 server
>> with standard introspect endpoint for token validation. Following
>> limitations would incur due to the usage of standard introspection.
>>
>> 1. Subscription validation can not be enforced.
>> 2. Rate limiting using application level throttling
>> 3. Rate limiting using subscription level throttling
>> 4. Completeness of analytics dashboard data
>>
>> These are the same limitations, we have when we use a self contains jwt
>> token from a third party key manager(STS).
>>
>> The key manager configuration of the microgateway is below[1]. We can add
>> an additional parameter[2] to specify to use an external key manager
>> instead of the WSO2 key manager.
>>
> Can we check the authentication section of RFC for the introspection
> endpoint and allow flexibility to configure the possible authentication
> mechanism. Basic authentication is basic. But some might use special bearer
> token or the clientId. Can we check[1] and provide the flexibility to use
> standard authentication for introspection.
>
The idea here is to support the standard introspection for the token
validation in the microgateway. When request comes to the microgateway with
bearer header it will validate the token using the standard introspect
endpoint. And also it will support wso2 key manager(APIM) token validation
as well if external key managers are not used

>
> [1]
>
>>
>> Please share your thoughts regarding this.
>>
>> [1] - [keyManager]
>> serverUrl="https://localhost:9443";
>> username="admin"  // to connect with key validation admin service
>> password="admin"
>> tokenContext="oauth2"
>> timestampSkew=5000
>>
>> [2] - [keyManager]
>> serverUrl="https://localhost:9443";
>> username="admin"  // to connect with key validation admin service
>> password="admin"
>> tokenContext="oauth2"
>> timestampSkew=5000
>> external = true
>>
>> --
>> *Rajith Roshan* | Associate Technical Lead | WSO2 Inc.
>> (m) +94-717-064-214 |  (e) raji...@wso2.com 
>> blog: http://www.rajithr.com
>>
>> <https://wso2.com/signature>
>>
>
>
> --
>
> *Harsha Kumara*
>
> Technical Lead, WSO2 Inc.
> Mobile: +94775505618
> Email: hars...@wso2.coim
> Blog: harshcreationz.blogspot.com
>
> GET INTEGRATION AGILE
> Integration Agility for Digitally Driven Business
>


-- 
*Rajith Roshan* | Associate Technical Lead | WSO2 Inc.
(m) +94-717-064-214 |  (e) raji...@wso2.com 
blog: http://www.rajithr.com

<https://wso2.com/signature>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Microgateway support authentication via standard introspection

2019-12-16 Thread Rajith Roshan
Hi all,
Microgateway 3.0.x versions support for opaque oauth2 token are tightly
bound with APIM key manager component. Right now it validates token using
the key validation service of APIM, which does the token validation, scope
validation, subscription validation (and back end jwt generation if
enabled).

We will need to provide a way to plug microgateway with an oauth2 server
with standard introspect endpoint for token validation. Following
limitations would incur due to the usage of standard introspection.

1. Subscription validation can not be enforced.
2. Rate limiting using application level throttling
3. Rate limiting using subscription level throttling
4. Completeness of analytics dashboard data

These are the same limitations, we have when we use a self contains jwt
token from a third party key manager(STS).

The key manager configuration of the microgateway is below[1]. We can add
an additional parameter[2] to specify to use an external key manager
instead of the WSO2 key manager.

Please share your thoughts regarding this.

[1] - [keyManager]
serverUrl="https://localhost:9443";
username="admin"  // to connect with key validation admin service
password="admin"
tokenContext="oauth2"
timestampSkew=5000

[2] - [keyManager]
serverUrl="https://localhost:9443";
username="admin"  // to connect with key validation admin service
password="admin"
tokenContext="oauth2"
timestampSkew=5000
external = true

-- 
*Rajith Roshan* | Associate Technical Lead | WSO2 Inc.
(m) +94-717-064-214 |  (e) raji...@wso2.com 
blog: http://www.rajithr.com

<https://wso2.com/signature>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] APIM Analytics datasource config minimise

2019-12-15 Thread Rajith Roshan
On Mon, Dec 16, 2019 at 12:05 PM Rukshan Premathunga 
wrote:

> Hi All,
>
> API Analytics currently has the following data source configs.
>
>1. worker
>   - WSO2_METRICS_DB
>   - WSO2_PERMISSIONS_DB
>   - GEO_LOCATION_DATA
>   - APIM_ANALYTICS_DB
>   - WSO2AM_MGW_ANALYTICS_DB
>   - AM_DB
>   - WSO2_CLUSTER_DB
>   2. dashboard
>   - WSO2_DASHBOARD_DB
>   - BUSINESS_RULES_DB
>   - WSO2_METRICS_DB
>   - WSO2_PERMISSIONS_DB
>   - APIM_ANALYTICS_DB
>   - AM_DB
>
> In worker runtime, AM_DB is used in a few use cases. Hence we can remove
> it from the default configuration to simplify the configuration.
> Further, we can merge APIM_ANALYTICS_DB and WSO2AM_MGW_ANALYTICS_DB
> databases and configure one DB(as we recommend).
>
+1 . lets ship the MGW related table also in the h2 of the analytics db by
default. When using production, users will have to manually create the MGW
related table in their custom database along with the analytics related
tables which are automatically created

>
> Hence I think it is better to apply above to the default configurations.
> Any suggestions?
>
> Thanks and Regards
>
> --
> Rukshan C. Premathunga | Associate Technical Lead | WSO2 Inc.
> (m) +94711822074 | (w) +94112145345 | Email: ruks...@wso2.com
> GET INTEGRATION AGILE
> Integration Agility for Digitally Driven Business
>


-- 
*Rajith Roshan* | Associate Technical Lead | WSO2 Inc.
(m) +94-717-064-214 |  (e) raji...@wso2.com 
blog: http://www.rajithr.com

<https://wso2.com/signature>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Support multiple jwt issuers in the microgateway

2019-12-15 Thread Rajith Roshan
On Fri, Dec 13, 2019 at 10:02 PM Harsha Kumara  wrote:

>
>
> On Fri, Dec 13, 2019 at 12:30 PM Rajith Roshan  wrote:
>
>> Hi all,
>> In microgateway 3.0.2 version we only supports jwt tokens issued by a
>> single issuer. (The current config [1]). But there can be use cases where
>> microgateways need to support jwts issued by multiple  issuers (STS).
>> So we are planning to support the multiple issuers with jballerina update
>> of the microgateway. For each new issuer defined in the config,
>> authentication handler will be registered during the mgw startup and each
>> token will be validated by each handler until the correct handler is found
>> for that particular issuer of the token.
>> We are planning to extend the configuration as below [2].
>> Ideally the config should look like [3]. But in ballerina right now there
>> is a limitation in the config API in order to read the array objects from
>> the toml files.
>> Please find the github issue [4].
>> Please share your thoughts about this.
>>
> Looks fine till we this getting fix from bellerina. But this will involve
> with a migration when it's fixed. How soon can we get this fixed from
> ballerina and proceed with the [3]?
>
Seems like this will be available[1] in ballerina 1.1.1. I think we can use
the array functionality once it is available. @Pubudu Fernando
 is there any rough date when this would be available.

[1] -
https://github.com/ballerina-platform/ballerina-lang/issues/10633#issuecomment-565413239

>
>> [1] -
>> [jwtTokenConfig]
>> issuer="https://localhost:9443/oauth2/token";
>> audience="http://org.wso2.apimgt/gateway";
>> certificateAlias="wso2apim"
>>
>> [2]
>> [*jwtTokenConfig*]
>> issuer="https://localhost:9443/oauth2/token";
>> audience="http://org.wso2.apimgt/gateway";
>> certificateAlias="wso2apim"
>>
>> [*jwtTokenConfig1*]
>> issuer="issuer1"
>> audience="aud1"
>> certificateAlias="alias1"
>>
>> [*jwtTokenConfig2*]
>> issuer="issuer2"
>> audience="aud2"
>> certificateAlias="alias2"
>>
>> [3]
>> [[*jwtTokenConfig*]]
>> issuer="https://localhost:9443/oauth2/token";
>> audience="http://org.wso2.apimgt/gateway";
>> certificateAlias="wso2apim"
>>
>> [[*jwtTokenConfig*]]
>> issuer="issuer1"
>> audience="aud1"
>> certificateAlias="alias1"
>>
>> [[*jwtTokenConfig*]]
>> issuer="issuer2"
>> audience="aud2"
>> certificateAlias="alias2"
>>
>> [4] - https://github.com/wso2/product-microgateway/issues/271
>>
>> Thanks!
>> Rajith
>> --
>> *Rajith Roshan* | Associate Technical Lead | WSO2 Inc.
>> (m) +94-717-064-214 |  (e) raji...@wso2.com 
>> blog: http://www.rajithr.com
>>
>> <https://wso2.com/signature>
>>
>
>
> --
>
> *Harsha Kumara*
>
> Technical Lead, WSO2 Inc.
> Mobile: +94775505618
> Email: hars...@wso2.coim
> Blog: harshcreationz.blogspot.com
>
> GET INTEGRATION AGILE
> Integration Agility for Digitally Driven Business
>


-- 
*Rajith Roshan* | Associate Technical Lead | WSO2 Inc.
(m) +94-717-064-214 |  (e) raji...@wso2.com 
blog: http://www.rajithr.com

<https://wso2.com/signature>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Support multiple jwt issuers in the microgateway

2019-12-12 Thread Rajith Roshan
Hi all,
In microgateway 3.0.2 version we only supports jwt tokens issued by a
single issuer. (The current config [1]). But there can be use cases where
microgateways need to support jwts issued by multiple  issuers (STS).
So we are planning to support the multiple issuers with jballerina update
of the microgateway. For each new issuer defined in the config,
authentication handler will be registered during the mgw startup and each
token will be validated by each handler until the correct handler is found
for that particular issuer of the token.
We are planning to extend the configuration as below [2].
Ideally the config should look like [3]. But in ballerina right now there
is a limitation in the config API in order to read the array objects from
the toml files.
Please find the github issue [4].
Please share your thoughts about this.

[1] -
[jwtTokenConfig]
issuer="https://localhost:9443/oauth2/token";
audience="http://org.wso2.apimgt/gateway";
certificateAlias="wso2apim"

[2]
[*jwtTokenConfig*]
issuer="https://localhost:9443/oauth2/token";
audience="http://org.wso2.apimgt/gateway";
certificateAlias="wso2apim"

[*jwtTokenConfig1*]
issuer="issuer1"
audience="aud1"
certificateAlias="alias1"

[*jwtTokenConfig2*]
issuer="issuer2"
audience="aud2"
certificateAlias="alias2"

[3]
[[*jwtTokenConfig*]]
issuer="https://localhost:9443/oauth2/token";
audience="http://org.wso2.apimgt/gateway";
certificateAlias="wso2apim"

[[*jwtTokenConfig*]]
issuer="issuer1"
audience="aud1"
certificateAlias="alias1"

[[*jwtTokenConfig*]]
issuer="issuer2"
audience="aud2"
certificateAlias="alias2"

[4] - https://github.com/wso2/product-microgateway/issues/271

Thanks!
Rajith
-- 
*Rajith Roshan* | Associate Technical Lead | WSO2 Inc.
(m) +94-717-064-214 |  (e) raji...@wso2.com 
blog: http://www.rajithr.com

<https://wso2.com/signature>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Microgateway CLI to create gateways without open API vendor extensions.

2019-10-18 Thread Rajith Roshan
On Fri, Oct 18, 2019 at 12:34 PM Harsha Kumara  wrote:

> We will need to change the CLI to cope with these changes. Please create a
> github issue in tooling.
>
Created the issue : https://github.com/wso2/product-apim-tooling/issues/124

>
> On Thu, Oct 17, 2019 at 10:21 PM Rajith Roshan  wrote:
>
>> Hi all,
>> The current microgateway version(3.0.2) requires at least two open API
>> vendor extensions to generate the microgateway executable artifact. Those
>> extensions are
>> 1. x-wso2-basePath  -- specify the base path which is the sub context
>> which categorize all the http operation defined in the open API
>> 2. x-wso2-production-endpoints -- specify the actual implementation url
>> of the endpoint.
>>
>> With the next version onward, we are planning to support the open APIs
>> predefined attributes.
>> Based on the open API version these attributes may differ.
>>
>> Open API version 2 : The actual service endpoint is defined using a
>> combination of three attributes[1]. 1. Scheme(http,https) 2. host 3.
>> basePath
>> Open API version 3 - The backend complete url is defined as array of urls
>> under the attribute servers[2].
>>
>> So based on the open API version, if the developer provided open API
>> contains either combination of scheme, host and base path(open API 2) or
>> the server urls(open API 3), micro gateway will not look for the wso2
>> specific vendor extensions.
>> Any how users can use the extensions to achieve tasks like providing
>> failover endpoints, throttling, interceptors and etc.
>>
>> [1] - https://swagger.io/docs/specification/2-0/api-host-and-base-path/
>> [2] - https://swagger.io/docs/specification/api-host-and-base-path/
>>
>> Thanks!
>> Rajith
>>
>> --
>> *Rajith Roshan* | Associate Technical Lead | WSO2 Inc.
>> (m) +94-717-064-214 |  (e) raji...@wso2.com 
>>
>> <https://wso2.com/signature>
>>
>
>
> --
>
> *Harsha Kumara*
>
> Technical Lead, WSO2 Inc.
> Mobile: +94775505618
> Email: hars...@wso2.coim
> Blog: harshcreationz.blogspot.com
>
> GET INTEGRATION AGILE
> Integration Agility for Digitally Driven Business
>


-- 
*Rajith Roshan* | Associate Technical Lead | WSO2 Inc.
(m) +94-717-064-214 |  (e) raji...@wso2.com 

<https://wso2.com/signature>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Microgateway CLI to create gateways without open API vendor extensions.

2019-10-17 Thread Rajith Roshan
Hi all,
The current microgateway version(3.0.2) requires at least two open API
vendor extensions to generate the microgateway executable artifact. Those
extensions are
1. x-wso2-basePath  -- specify the base path which is the sub context which
categorize all the http operation defined in the open API
2. x-wso2-production-endpoints -- specify the actual implementation url of
the endpoint.

With the next version onward, we are planning to support the open APIs
predefined attributes.
Based on the open API version these attributes may differ.

Open API version 2 : The actual service endpoint is defined using a
combination of three attributes[1]. 1. Scheme(http,https) 2. host 3.
basePath
Open API version 3 - The backend complete url is defined as array of urls
under the attribute servers[2].

So based on the open API version, if the developer provided open API
contains either combination of scheme, host and base path(open API 2) or
the server urls(open API 3), micro gateway will not look for the wso2
specific vendor extensions.
Any how users can use the extensions to achieve tasks like providing
failover endpoints, throttling, interceptors and etc.

[1] - https://swagger.io/docs/specification/2-0/api-host-and-base-path/
[2] - https://swagger.io/docs/specification/api-host-and-base-path/

Thanks!
Rajith

-- 
*Rajith Roshan* | Associate Technical Lead | WSO2 Inc.
(m) +94-717-064-214 |  (e) raji...@wso2.com 

<https://wso2.com/signature>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [Architecture] [Intern Project] Integrating API gateway with AWS Lambda

2019-08-30 Thread Rajith Roshan
ith the suggested UI.
>>>>>>
>>>>>> As we discussed in the design review, following widget will be added
>>>>>> to ENDPOINTS section.
>>>>>>
>>>>>> [image: image.png]
>>>>>> But I have some UX issues adding this kind of widget to ENDPOINTS
>>>>>> page in APIM 3.0.
>>>>>>
>>>>>> 1. A typical user will confuse by seeing resources in ENDPOINTS
>>>>>> section.
>>>>>> 2. What will happen to RESOURCES section (whether it has to be
>>>>>> disabled after he selected the endpoint type as AWS Lambda)?
>>>>>> 3. What if the user adds resources first and then goes to ENDPOINTS
>>>>>> section to set AWS LAMBDA?
>>>>>>
>>>>>> To outcome these problems one can suggest to add AWS user role
>>>>>> details (access key & secret key) in ENDPOINTS section and map resources 
>>>>>> to
>>>>>> ARNs in RESOURCES section which raise following issues.
>>>>>>
>>>>>> 1. User has to first selects the endpoint type as AWS LAMBDA before
>>>>>> set the resources.
>>>>>> 2. Have to add optional interface for mapping ARNs in RESOURCES
>>>>>> section.
>>>>>>
>>>>>> I'm suggesting to add separate section for LAMBDA configuration which
>>>>>> will disable ENDPOINTS and RESOURCES sections when an user enables LAMBDA
>>>>>> functions.
>>>>>>
>>>>>> [image: image.png]
>>>>>> What will be the best way to add this feature in APIM-Publisher?
>>>>>>
>>>>>>
>>>>>> On Tue, Aug 6, 2019 at 5:52 PM Binod Karunanayake 
>>>>>> wrote:
>>>>>>
>>>>>>> Hi all,
>>>>>>>
>>>>>>> I'm doing the above project which is a new feature in WSO2 API-M to
>>>>>>> invoke AWS Lambda functions through WSO2 API gateway. You can find the
>>>>>>> detailed document attached below.
>>>>>>>
>>>>>>> There will be no backend endpoints for APIs. Instead, an API invokes
>>>>>>> Lambda functions as shown below.
>>>>>>> [image: 1*ucaFQnPaYgniRfOHbBpgwA.png]
>>>>>>> Calling Lambda is done by a class mediator. However, Lambda response
>>>>>>> is a *byteBuffer* which have to be set to the *messageContext*. I'm
>>>>>>> looking for a solution to set the Lambda response to messageContext 
>>>>>>> without
>>>>>>> converting it to *String*.
>>>>>>>
>>>>>>> Best Regards.
>>>>>>>
>>>>>>> --
>>>>>>> *Binod Karunanayake* | Software Engineering Intern | WSO2 Inc.
>>>>>>> (m) +94716611642 | (e) bi...@wso2.com
>>>>>>> [image: http://wso2.com/signature] <http://wso2.com/signature>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> *Binod Karunanayake* | Software Engineering Intern | WSO2 Inc.
>>>>>> (m) +94716611642 | (e) bi...@wso2.com
>>>>>> [image: http://wso2.com/signature] <http://wso2.com/signature>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> *Chanaka Jayasena* | Technical Lead | WSO2 Inc.
>>>>> (m) +94 77 44 64 00 6 | (w) 0112 145 345 | (e) chan...@wso2.com
>>>>> GET INTEGRATION AGILE
>>>>> Integration Agility for Digitally Driven Business
>>>>>
>>>>
>>>>
>>>> --
>>>> *Chanaka Jayasena* | Technical Lead | WSO2 Inc.
>>>> (m) +94 77 44 64 00 6 | (w) 0112 145 345 | (e) chan...@wso2.com
>>>> GET INTEGRATION AGILE
>>>> Integration Agility for Digitally Driven Business
>>>> ___
>>>> Architecture mailing list
>>>> architect...@wso2.org
>>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>>>
>>>
>>>
>>> --
>>> Himasha Guruge
>>> Associate Lead Solutions Engineer
>>> WS*O2* *Inc.*
>>> Mobile: +94 777459299
>>> himas...@wso2.com
>>> <http://wso2.com/signature>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>
>>
>> --
>> Best Regards
>> Dushan Silva
>> Software Engineer
>>
>> *WSO2, Inc. *
>>
>> lean . enterprise . middleware
>> Mob: +94 774 979042
>>
>
>
> --
> *Binod Karunanayake* | Software Engineering Intern | WSO2 Inc.
> (m) +94716611642 | (e) bi...@wso2.com
> [image: http://wso2.com/signature] <http://wso2.com/signature>
> ___
> Architecture mailing list
> architect...@wso2.org
> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>


-- 
*Rajith Roshan* | Associate Technical Lead | WSO2 Inc.
(m) +94-717-064-214 |  (e) raji...@wso2.com 

<https://wso2.com/signature>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] OAS 3 as default API definition

2019-08-14 Thread Rajith Roshan
On Tue, Aug 13, 2019 at 8:53 PM Rukshan Premathunga 
wrote:

>
>
> On Tue, Aug 13, 2019 at 7:39 PM Rajith Roshan  wrote:
>
>>
>>
>> On Tue, Aug 13, 2019 at 2:48 PM Thilini Shanika 
>> wrote:
>>
>>> Even though OAS 2.0 support is deprecated, we should carefully handle
>>> the use cases of OAS 2.0 supported APIs which have been migrated from
>>> previous versions. In that case, still, we have to maintain the current
>>> implementation(Both in UI and backend) to handle functionalities of two
>>> versions.
>>>
>>> @Rajith Roshan  , @Praminda Jayawardana
>>> 
>>> How this would affect micro gateway?
>>>
>> Microgateway handles the swagger parsing based on the swagger version.
>> When APIs are imported from api manager it will , check the swagger version
>> and use the correct parser. So I don't think this would be an issue.
>>
> had a discussion with Thilini and Praminda, and noticed MG use V3 parser.
> But it seems v3 parser doesn't validate the content but parse the
> definition with existing information. I think it is not enough for this use
> case. I think we need to use both v2 and v3 parser after identifying the
> OAS version. ATM we have parsed the definition with both v2 and v3 to
> identify the correct OAS version. @Rajith Roshan   what
> is the mechanism you have used to identify the version.
>
please find the logic used to identify the version in here[1]

[1] -
https://github.com/wso2/product-microgateway/blob/master/components/micro-gateway-cli/src/main/java/org/wso2/apimgt/gateway/cli/utils/OpenAPICodegenUtils.java#L113


> If there anything in the current approach, please suggest if there are any
> other alternatives.
>
>>
>>> On Tue, Aug 13, 2019 at 2:21 PM Dushan Silva  wrote:
>>>
>>>> Hi,
>>>> I also think since this is a major release it is a good time to move
>>>> 3.0.0 however if we think from users perspective we should consider the
>>>> however not supporting 2.0 would effect. If we are planning on supporting a
>>>> conversion between 2.0 to 3.0 then definitely +1 for this.
>>>>
>>>> Thanks
>>>>
>>>> On Mon, Aug 12, 2019 at 12:08 PM Malintha Amarasinghe <
>>>> malint...@wso2.com> wrote:
>>>>
>>>>>
>>>>>
>>>>> On Mon, Aug 12, 2019 at 11:21 AM Rukshan Premathunga 
>>>>> wrote:
>>>>>
>>>>>>
>>>>>>
>>>>>> On Mon, Aug 12, 2019 at 11:16 AM Thilini Shanika 
>>>>>> wrote:
>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Mon, Aug 12, 2019 at 10:53 AM Rukshan Premathunga <
>>>>>>> ruks...@wso2.com> wrote:
>>>>>>>
>>>>>>>> Hi All,
>>>>>>>>
>>>>>>>> ATM generated API definition is in swagger 2. Can we make it OAS 3
>>>>>>>> for the new APIs?
>>>>>>>>
>>>>>>> Yes, we can change the default version of a newly created API to OAS
>>>>>>> 3.0.0. However, the API creator is allowed to pick the OAS version(OAS 
>>>>>>> 2 or
>>>>>>> 3) of the API during API creation time. Are you suggesting to remove the
>>>>>>> default support for OAS 2.0(For newly designed APIs)?
>>>>>>>
>>>>>> Yes, my suggestion is, if a user doesn't have an OAS definition,
>>>>>> generate an OAS 3 definition for them. If they have an OAS definition,
>>>>>> allowing them to import OAS 2 or 3 definition. So we will maintain the 
>>>>>> same
>>>>>> OAS version afterward.
>>>>>>
>>>>>
>>>>> I also think this would be okay. If anyone wants to stick with OAS
>>>>> 2.0, they have an import OAS 2.0 option.
>>>>> Maintaining two different API designers at UI level would not be good
>>>>> in terms of maintenance. We would one day anyway have to move to the
>>>>> designer to 3.0.0 as we did for 1.2 -> 2.0 in the past. Since this is a
>>>>> major release, this is a good time to do it as Pubudu said. @Rukshan
>>>>> Premathunga ,  if we move to 3.0.0, can we
>>>>> completely remove the UI designer code used for 2.0 and keep only 3.0.0
>>>>> related code?
>>>>>
>>>> We need to keep both v2 a

Re: [Dev] OAS 3 as default API definition

2019-08-13 Thread Rajith Roshan
On Tue, Aug 13, 2019 at 2:48 PM Thilini Shanika  wrote:

> Even though OAS 2.0 support is deprecated, we should carefully handle the
> use cases of OAS 2.0 supported APIs which have been migrated from previous
> versions. In that case, still, we have to maintain the current
> implementation(Both in UI and backend) to handle functionalities of two
> versions.
>
> @Rajith Roshan  , @Praminda Jayawardana
> 
> How this would affect micro gateway?
>
Microgateway handles the swagger parsing based on the swagger version. When
APIs are imported from api manager it will , check the swagger version and
use the correct parser. So I don't think this would be an issue.

>
> On Tue, Aug 13, 2019 at 2:21 PM Dushan Silva  wrote:
>
>> Hi,
>> I also think since this is a major release it is a good time to move
>> 3.0.0 however if we think from users perspective we should consider the
>> however not supporting 2.0 would effect. If we are planning on supporting a
>> conversion between 2.0 to 3.0 then definitely +1 for this.
>>
>> Thanks
>>
>> On Mon, Aug 12, 2019 at 12:08 PM Malintha Amarasinghe 
>> wrote:
>>
>>>
>>>
>>> On Mon, Aug 12, 2019 at 11:21 AM Rukshan Premathunga 
>>> wrote:
>>>
>>>>
>>>>
>>>> On Mon, Aug 12, 2019 at 11:16 AM Thilini Shanika 
>>>> wrote:
>>>>
>>>>>
>>>>>
>>>>> On Mon, Aug 12, 2019 at 10:53 AM Rukshan Premathunga 
>>>>> wrote:
>>>>>
>>>>>> Hi All,
>>>>>>
>>>>>> ATM generated API definition is in swagger 2. Can we make it OAS 3
>>>>>> for the new APIs?
>>>>>>
>>>>> Yes, we can change the default version of a newly created API to OAS
>>>>> 3.0.0. However, the API creator is allowed to pick the OAS version(OAS 2 
>>>>> or
>>>>> 3) of the API during API creation time. Are you suggesting to remove the
>>>>> default support for OAS 2.0(For newly designed APIs)?
>>>>>
>>>> Yes, my suggestion is, if a user doesn't have an OAS definition,
>>>> generate an OAS 3 definition for them. If they have an OAS definition,
>>>> allowing them to import OAS 2 or 3 definition. So we will maintain the same
>>>> OAS version afterward.
>>>>
>>>
>>> I also think this would be okay. If anyone wants to stick with OAS 2.0,
>>> they have an import OAS 2.0 option.
>>> Maintaining two different API designers at UI level would not be good in
>>> terms of maintenance. We would one day anyway have to move to the designer
>>> to 3.0.0 as we did for 1.2 -> 2.0 in the past. Since this is a major
>>> release, this is a good time to do it as Pubudu said. @Rukshan
>>> Premathunga ,  if we move to 3.0.0, can we completely
>>> remove the UI designer code used for 2.0 and keep only 3.0.0 related code?
>>>
>>> Thanks!
>>>
>>>>
>>>>
>>> When new API is created from an OAS 2 or 3, we can create from the same
>>>>>> imported version. Existing API also can be kept as an existing version.
>>>>>>
>>>>>> Thanks and Regards
>>>>>>
>>>>>> --
>>>>>> Rukshan C. Premathunga | Associate Technical Lead | WSO2 Inc.
>>>>>> (m) +94711822074 | (w) +94112145345 | Email: ruks...@wso2.com
>>>>>> GET INTEGRATION AGILE
>>>>>> Integration Agility for Digitally Driven Business
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Thilini Shanika
>>>>> Associate Technical Lead
>>>>> WSO2, Inc.; http://wso2.com
>>>>> 20, Palmgrove Avenue, Colombo 3
>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> Rukshan C. Premathunga | Associate Technical Lead | WSO2 Inc.
>>>> (m) +94711822074 | (w) +94112145345 | Email: ruks...@wso2.com
>>>> GET INTEGRATION AGILE
>>>> Integration Agility for Digitally Driven Business
>>>>
>>>
>>>
>>> --
>>> Malintha Amarasinghe
>>> *WSO2, Inc. - lean | enterprise | middleware*
>>> http://wso2.com/
>>>
>>> Mobile : +94 712383306
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>
>>
>> --
>> Best Regards
>> Dushan Silva
>> Software Engineer
>>
>> *WSO2, Inc. *
>>
>> lean . enterprise . middleware
>> Mob: +94 774 979042
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>
>
> --
> Thilini Shanika
> Associate Technical Lead
> WSO2, Inc.; http://wso2.com
> 20, Palmgrove Avenue, Colombo 3
>
>
>

-- 
*Rajith Roshan* | Associate Technical Lead | WSO2 Inc.
(m) +94-717-064-214 |  (e) raji...@wso2.com 

<https://wso2.com/signature>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DEV] [VOTE] Release WSO2 API Microgateway 3.0.1 RC3

2019-06-10 Thread Rajith Roshan
Tested the following scenarios.


   - Basic throttling
   - Custom application throttling for open API based api and imported APIs
   - Custom subscription throttling for imported APIs
   - Global throttling
   - Basic flow in dev first approach
   - Load balance and fail over endpoints

No blockers found.
*[+] Stable - Go ahead and release*

Thanks!
Rajith

On Sun, Jun 9, 2019 at 10:25 AM Praminda Jayawardana 
wrote:

> Hi All,
>
> WSO2 Api Manager team is pleased to announce the third release candidate
> of WSO2 API Microgateway 3.0.1.
>
> The WSO2 API Microgateway is a lightweight, gateway distribution which can
> be used with single or multiple APIs.
>
> Please find the improvements and fixes related to this release in Fixed
> issues
> <https://github.com/wso2/product-microgateway/issues?utf8=%E2%9C%93&q=is%3Aissue+closed%3A2018-10-12..2019-06-09>
>
> Download the product from here
> <https://github.com/wso2/product-microgateway/releases/tag/v3.0.1-rc3>
>
> The Tag to be voted upon is
> https://github.com/wso2/product-microgateway/releases/tag/v3.0.1-rc3
>
> Please download, test the product and vote.
>
> *[+] Stable - Go ahead and release*
>
> *[-] Broken - Do not release *(explain why)
>
>
> Documentation: https://docs.wso2.com/display/MG301/
>
> Best Regards,
> WSO2 API Manager Team
>


-- 
*Rajith Roshan* | Associate Technical Lead | WSO2 Inc.
(m) +94-717-064-214 |  (e) raji...@wso2.com 

<https://wso2.com/signature>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DEV] [VOTE] Release WSO2 API Microgateway 3.0.1 RC2

2019-06-07 Thread Rajith Roshan
Tested the following scenarios.


   - Basic throttling
   - Custom application throttling for open API based api and imported APIs
   - Custom subscription throttling for imported APIs
   - Global throttling
   - Basic flow in dev first approach

No blockers found.
*[+] Stable - Go ahead and release*

Thanks!
Rajith

On Fri, Jun 7, 2019 at 9:59 AM Praminda Jayawardana 
wrote:

> Hi All,
>
> WSO2 Api Manager team is pleased to announce the second release candidate
> of WSO2 API Microgateway 3.0.1.
>
> The WSO2 API Microgateway is a lightweight, gateway distribution which can
> be used with single or multiple APIs.
>
> Please find the improvements and fixes related to this release in Fixed
> issues
> <https://github.com/wso2/product-microgateway/issues?utf8=%E2%9C%93&q=is%3Aissue+closed%3A2018-10-12..2019-06-07>
>
> Download the product from here
> <https://github.com/wso2/product-microgateway/releases/tag/v3.0.1-rc2>
>
> The Tag to be voted upon is
> https://github.com/wso2/product-microgateway/releases/tag/v3.0.1-rc2
>
> Please download, test the product and vote.
>
> *[+] Stable - Go ahead and release*
>
> *[-] Broken - Do not release *(explain why)
>
>
> Documentation: https://docs.wso2.com/display/MG301/
>
> Best Regards,
> WSO2 API Manager Team
>


-- 
*Rajith Roshan* | Associate Technical Lead | WSO2 Inc.
(m) +94-717-064-214 |  (e) raji...@wso2.com 

<https://wso2.com/signature>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Change micro gateway open API extensions to x-wso2

2019-05-29 Thread Rajith Roshan
Hi all,
For the sake of consistency with WSO2 API Manager, we will be changing the
microgateway open API extensions to "x-wso2" from "x-mgw". So these
extensions will be supported by micro gateway export import tool as well.
This will make the CI/CD story consistent between micro gateway and APIM.

Following are the set of extensions supported by micro gateway.

"x-wso2-basePath";
"x-wso2-request-interceptor";
"x-wso2-response-interceptor";
"x-wso2-endpoints";
"x-wso2-production-endpoints";
"x-wso2-sandbox-endpoints";
"x-wso2-cors";
"x-wso2-throttling-tier";
"x-wso2-disable-security";


-- 
*Rajith Roshan* | Associate Technical Lead | WSO2 Inc.
(m) +94-717-064-214 |  (e) raji...@wso2.com 

<https://wso2.com/signature>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DEV] [VOTE] Release WSO2 API Microgateway 3.0.0 RC1

2019-05-24 Thread Rajith Roshan
Hi all,
We will be closing this vote as we have found  issues related to analytics
publishing, import apis with labels. We will  call upon another vote once
these issues are fixed.

Thanks!
Rajith

On Fri, May 24, 2019 at 12:34 PM Praminda Jayawardana 
wrote:

> Tested followings, (not on docker, k8s)
>
>- Product quick start
>- Endpoint overriding (dev first)
>- API/Resource level request and response interceptors
>- Disabling security at resource level
>- Defining auth schemes + scopes
>- Basic auth
>- Basic auth secured backends
>
> [+] Stable - Go ahead and release.
>
> On Fri, May 24, 2019 at 11:12 AM Hasunie Adikari  wrote:
>
>>
>> Tested the following scenarios.
>>
>> - Follow the dev first approach and build the pet-store project.
>>
>>   - Override endpoint per resource.
>>
>>   - API / resource level request interceptors.
>>
>>   - Schema validation.
>>
>> - Import API from APIM manager and tested.
>>
>> [+] Stable - Go ahead and release.
>>
>>
>>
>> Regards,
>>
>> Hasunie
>>
>>
>>
>> On Tue, May 21, 2019 at 10:02 PM Praminda Jayawardana 
>> wrote:
>>
>>> Hi All,
>>>
>>> WSO2 Api Manager team is pleased to announce the first release candidate
>>> of WSO2 API Microgateway 3.0.0.
>>>
>>> The WSO2 API Microgateway is a lightweight, gateway distribution (WSO2
>>> API Microgateway) which can be used with single or multiple APIs.
>>>
>>> Please find the improvements and fixes related to this release in Fixed
>>> issues
>>> <https://github.com/wso2/product-microgateway/issues?utf8=%E2%9C%93&q=is%3Aissue+closed%3A2018-10-12..2019-05-21>
>>>
>>> Download the product from here
>>> <https://github.com/wso2/product-microgateway/releases/tag/v3.0.0-rc1>
>>>
>>> The Tag to be voted upon is
>>> https://github.com/wso2/product-microgateway/releases/tag/v3.0.0-rc1
>>>
>>> Please download, test the product and vote.
>>>
>>> *[+] Stable - Go ahead and release*
>>>
>>> *[-] Broken - Do not release *(explain why)
>>>
>>>
>>> Documentation: https://docs.wso2.com/display/MG300/
>>>
>>> Best Regards,
>>> WSO2 API Manager Team
>>>
>>
>>
>> --
>> *Hasunie Adikari*
>> Senior Software Engineer
>> WSO2 Inc.; http://wso2.com
>> lean.enterprise.middleware
>> blog http://hasuniea.blogspot.com | https://medium.com/@Hasunie/
>> Mobile:+94713095876
>>
>>
>
> --
>
> *Praminda Jayawardana* | Senior Software Engineer | WSO2 Inc.
> (m) +94 (0) 716 590918 | (e) prami...@wso2.com
> GET INTEGRATION AGILE
> Integration Agility for Digitally Driven Business
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>


-- 
*Rajith Roshan* | Associate Technical Lead | WSO2 Inc.
(m) +94-717-064-214 |  (e) raji...@wso2.com 

<https://wso2.com/signature>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Remove unused subscription throttle policies when creating Micro gw project

2019-03-17 Thread Rajith Roshan
Hi,
@Gimantha Bandara  , @Gihan Anuruddha
 , @Grainier
Perera 
In ballerina streams what is the possibility of adding the logic of every
throttle policy under a single for ever loop. Is it recommended.
In current implementation is there a separate back ground thread running
for every "for ever" loop.

On Thu, Mar 14, 2019 at 4:41 PM Rukshan Premathunga 
wrote:

>
>
> On Thu, Mar 14, 2019 at 4:24 PM Nuwan Dias  wrote:
>
>> Just thinking out loud, is there by any chance a possibility to run just
>> 1 forever for any number of policies? Even if that means a redesign of the
>> policies?
>>
> Still, we don't know the logic behind the forever syntax. If it starts a
> new thread with forever we can think a way to optimize the policies. Since
> the policy file is not allowed to edit, we can include it to a single
> ballerina file. But not sure it will affect the performance. Because when
> it runs logic sequentially, it can introduce a delay to process the events.
>
>>
>> On Thu, Mar 14, 2019 at 3:48 PM Rajith Roshan  wrote:
>>
>>>
>>>
>>> On Thu, Mar 14, 2019 at 3:21 PM Nuwan Dias  wrote:
>>>
>>>>
>>>>
>>>> On Thu, Mar 14, 2019 at 3:20 PM Rajith Roshan  wrote:
>>>>
>>>>>
>>>>>
>>>>> On Thu, Mar 14, 2019 at 2:32 PM Nuwan Dias  wrote:
>>>>>
>>>>>> What about the developer first approach? In that case we pre load the
>>>>>> default policies to the gateway anyway since there is no indication of an
>>>>>> API being associated to a subs throttling policy.
>>>>>>
>>>>> I wonder in current implementation also how these subscription
>>>>> policies are used. Since with developer first approach any way are not
>>>>> using oauth2 , I assume we are not using any of the subscription policies 
>>>>> , @Arshardh
>>>>> Ifthikar  please correct me if I am wrong
>>>>>
>>>>
>>>> I believe we honor the tier that comes along with the JWT (if it does).
>>>>
>>> Yes,  For developer first approach we can ship the by default available
>>> policies. In the other approach we can limit the policies we are adding to
>>> micro gw. Because in APIM side there can be many subscription policies but
>>> not used in APIs which is exposed via micro-gw
>>>
>>>>
>>>>>> On Thu, Mar 14, 2019 at 2:23 PM Rajith Roshan 
>>>>>> wrote:
>>>>>>
>>>>>>> Hi all,
>>>>>>> Currently in microgateway(MGW) when we create the project directory
>>>>>>> we fetch all the subscription and application policies and we generate 
>>>>>>> the
>>>>>>> source for each policy. In each policy there is ever running loop
>>>>>>> (forever), in back ground to update the throttle counters. But the issue
>>>>>>> some of the subscription policies(tiers) might not be used in any of the
>>>>>>> APIS in MGW and these not used policies running in the background might 
>>>>>>> be
>>>>>>> consuming some CPU cycles
>>>>>>>
>>>>>>> So we thought of filter out the subscription policies(tiers) which
>>>>>>> are attached to any of the APIs exposed via MGW.
>>>>>>> For ex if API Foo is attach with policy 100PerMin and API Bar is
>>>>>>> attached with policies 75PerMin and 50PerMin , then if we are only 
>>>>>>> exposing
>>>>>>> API "Foo" and "Bar" from MGW we will only create source files for those
>>>>>>> subscription policies only, even though there are many subscription
>>>>>>> policies defined in the admin portal of APIM.
>>>>>>> Do you find any issues with this approach
>>>>>>>
>>>>>>> --
>>>>>>> *Rajith Roshan* | Associate Technical Lead | WSO2 Inc.
>>>>>>> (m) +94-717-064-214 |  (e) raji...@wso2.com 
>>>>>>>
>>>>>>> <https://wso2.com/signature>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> *Nuwan Dias* | Director | WSO2 Inc.
>>>>>> (m) +94 777 775 729 | (e) nuw...@wso2.com
>>>>>> [image: Signature.jpg]
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> *Rajith Roshan* | Associate Technical Lead | WSO2 Inc.
>>>>> (m) +94-717-064-214 |  (e) raji...@wso2.com 
>>>>>
>>>>> <https://wso2.com/signature>
>>>>>
>>>>
>>>>
>>>> --
>>>> *Nuwan Dias* | Director | WSO2 Inc.
>>>> (m) +94 777 775 729 | (e) nuw...@wso2.com
>>>> [image: Signature.jpg]
>>>>
>>>
>>>
>>> --
>>> *Rajith Roshan* | Associate Technical Lead | WSO2 Inc.
>>> (m) +94-717-064-214 |  (e) raji...@wso2.com 
>>>
>>> <https://wso2.com/signature>
>>>
>>
>>
>> --
>> *Nuwan Dias* | Director | WSO2 Inc.
>> (m) +94 777 775 729 | (e) nuw...@wso2.com
>> [image: Signature.jpg]
>>
>
>
> --
> Rukshan Chathuranga.
> WSO2, Inc.
> +94711822074
>


-- 
*Rajith Roshan* | Associate Technical Lead | WSO2 Inc.
(m) +94-717-064-214 |  (e) raji...@wso2.com 

<https://wso2.com/signature>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Remove unused subscription throttle policies when creating Micro gw project

2019-03-14 Thread Rajith Roshan
On Thu, Mar 14, 2019 at 3:21 PM Nuwan Dias  wrote:

>
>
> On Thu, Mar 14, 2019 at 3:20 PM Rajith Roshan  wrote:
>
>>
>>
>> On Thu, Mar 14, 2019 at 2:32 PM Nuwan Dias  wrote:
>>
>>> What about the developer first approach? In that case we pre load the
>>> default policies to the gateway anyway since there is no indication of an
>>> API being associated to a subs throttling policy.
>>>
>> I wonder in current implementation also how these subscription policies
>> are used. Since with developer first approach any way are not using oauth2
>> , I assume we are not using any of the subscription policies , @Arshardh
>> Ifthikar  please correct me if I am wrong
>>
>
> I believe we honor the tier that comes along with the JWT (if it does).
>
Yes,  For developer first approach we can ship the by default available
policies. In the other approach we can limit the policies we are adding to
micro gw. Because in APIM side there can be many subscription policies but
not used in APIs which is exposed via micro-gw

>
>>> On Thu, Mar 14, 2019 at 2:23 PM Rajith Roshan  wrote:
>>>
>>>> Hi all,
>>>> Currently in microgateway(MGW) when we create the project directory we
>>>> fetch all the subscription and application policies and we generate the
>>>> source for each policy. In each policy there is ever running loop
>>>> (forever), in back ground to update the throttle counters. But the issue
>>>> some of the subscription policies(tiers) might not be used in any of the
>>>> APIS in MGW and these not used policies running in the background might be
>>>> consuming some CPU cycles
>>>>
>>>> So we thought of filter out the subscription policies(tiers) which are
>>>> attached to any of the APIs exposed via MGW.
>>>> For ex if API Foo is attach with policy 100PerMin and API Bar is
>>>> attached with policies 75PerMin and 50PerMin , then if we are only exposing
>>>> API "Foo" and "Bar" from MGW we will only create source files for those
>>>> subscription policies only, even though there are many subscription
>>>> policies defined in the admin portal of APIM.
>>>> Do you find any issues with this approach
>>>>
>>>> --
>>>> *Rajith Roshan* | Associate Technical Lead | WSO2 Inc.
>>>> (m) +94-717-064-214 |  (e) raji...@wso2.com 
>>>>
>>>> <https://wso2.com/signature>
>>>>
>>>
>>>
>>> --
>>> *Nuwan Dias* | Director | WSO2 Inc.
>>> (m) +94 777 775 729 | (e) nuw...@wso2.com
>>> [image: Signature.jpg]
>>>
>>
>>
>> --
>> *Rajith Roshan* | Associate Technical Lead | WSO2 Inc.
>> (m) +94-717-064-214 |  (e) raji...@wso2.com 
>>
>> <https://wso2.com/signature>
>>
>
>
> --
> *Nuwan Dias* | Director | WSO2 Inc.
> (m) +94 777 775 729 | (e) nuw...@wso2.com
> [image: Signature.jpg]
>


-- 
*Rajith Roshan* | Associate Technical Lead | WSO2 Inc.
(m) +94-717-064-214 |  (e) raji...@wso2.com 

<https://wso2.com/signature>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Remove unused subscription throttle policies when creating Micro gw project

2019-03-14 Thread Rajith Roshan
On Thu, Mar 14, 2019 at 2:32 PM Nuwan Dias  wrote:

> What about the developer first approach? In that case we pre load the
> default policies to the gateway anyway since there is no indication of an
> API being associated to a subs throttling policy.
>
I wonder in current implementation also how these subscription policies are
used. Since with developer first approach any way are not using oauth2 , I
assume we are not using any of the subscription policies , @Arshardh
Ifthikar  please correct me if I am wrong

>
> On Thu, Mar 14, 2019 at 2:23 PM Rajith Roshan  wrote:
>
>> Hi all,
>> Currently in microgateway(MGW) when we create the project directory we
>> fetch all the subscription and application policies and we generate the
>> source for each policy. In each policy there is ever running loop
>> (forever), in back ground to update the throttle counters. But the issue
>> some of the subscription policies(tiers) might not be used in any of the
>> APIS in MGW and these not used policies running in the background might be
>> consuming some CPU cycles
>>
>> So we thought of filter out the subscription policies(tiers) which are
>> attached to any of the APIs exposed via MGW.
>> For ex if API Foo is attach with policy 100PerMin and API Bar is attached
>> with policies 75PerMin and 50PerMin , then if we are only exposing API
>> "Foo" and "Bar" from MGW we will only create source files for those
>> subscription policies only, even though there are many subscription
>> policies defined in the admin portal of APIM.
>> Do you find any issues with this approach
>>
>> --
>> *Rajith Roshan* | Associate Technical Lead | WSO2 Inc.
>> (m) +94-717-064-214 |  (e) raji...@wso2.com 
>>
>> <https://wso2.com/signature>
>>
>
>
> --
> *Nuwan Dias* | Director | WSO2 Inc.
> (m) +94 777 775 729 | (e) nuw...@wso2.com
> [image: Signature.jpg]
>


-- 
*Rajith Roshan* | Associate Technical Lead | WSO2 Inc.
(m) +94-717-064-214 |  (e) raji...@wso2.com 

<https://wso2.com/signature>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Remove unused subscription throttle policies when creating Micro gw project

2019-03-14 Thread Rajith Roshan
Hi all,
Currently in microgateway(MGW) when we create the project directory we
fetch all the subscription and application policies and we generate the
source for each policy. In each policy there is ever running loop
(forever), in back ground to update the throttle counters. But the issue
some of the subscription policies(tiers) might not be used in any of the
APIS in MGW and these not used policies running in the background might be
consuming some CPU cycles

So we thought of filter out the subscription policies(tiers) which are
attached to any of the APIs exposed via MGW.
For ex if API Foo is attach with policy 100PerMin and API Bar is attached
with policies 75PerMin and 50PerMin , then if we are only exposing API
"Foo" and "Bar" from MGW we will only create source files for those
subscription policies only, even though there are many subscription
policies defined in the admin portal of APIM.
Do you find any issues with this approach

-- 
*Rajith Roshan* | Associate Technical Lead | WSO2 Inc.
(m) +94-717-064-214 |  (e) raji...@wso2.com 

<https://wso2.com/signature>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Regarding the HTTP status code to be used if the response is invalid

2019-01-17 Thread Rajith Roshan
According to the http spec[1], it says status codes are extensible[2]
unless it preserve it class (for ex: 4xx for client errors). I think we can
define our own status code and add it in our documentation. For ex
cloudflare(reverse proxy) sent 520 when it receives invalid response from
origin server. WDYT?

[1] - https://tools.ietf.org/html/rfc2616

[2] - HTTP status codes are extensible. HTTP applications are not required
   to understand the meaning of all registered status codes, though such
   understanding is obviously desirable. However, applications MUST
   understand the class of any status code, as indicated by the first
   digit, and treat any unrecognized response as being equivalent to the
   x00 status code of that class, with the exception that an
   unrecognized response MUST NOT be cached


On Thu, Jan 17, 2019 at 8:35 AM Sanjeewa Malalgoda 
wrote:

> I do not think 422 is correct for issues with response. Usually 4XX errors
> used to indicate client/request errors. In this case its error or issue
> with backend. And for client it can consider as internal server error as
> well. Or we can indicate content related issue. 5XX response would be
> better. But to be honest i do not have other good suggestion :(
>
> Thanks,
> sanjeewa.
>
> On Wed, Jan 9, 2019 at 8:21 PM Harsha Kumara  wrote:
>
>> +1 we should use 422.
>>
>> [1]
>> https://www.quora.com/Which-HTTP-code-is-best-suited-for-validation-errors-400-or-422
>> [2]
>> https://stackoverflow.com/questions/1959947/whats-an-appropriate-http-status-code-to-return-by-a-rest-api-service-for-a-val
>>
>> On Wed, Jan 9, 2019 at 3:22 PM Uvindra Dias Jayasinha 
>> wrote:
>>
>>> I think 422 is the most appropriate given your use case of validating if
>>> a message matches a given schema. So you can receive a valid JSON or
>>> XML(it's not malformed hence it is not a bad request(400)), but it may not
>>> match with the message schema definition you are matching against.
>>>
>>> The specs dont seem to talk about processing from the perspective of the
>>> response. I guess you can use the same code used for the request.
>>>
>>> On Wed, 9 Jan 2019 at 14:54, Shalki Wenushika 
>>> wrote:
>>>
>>>> Hi all,
>>>>
>>>> This is related to the mail thread subjected as “[Architecture]API
>>>> schema based request/response validator for Microgateway”. I’m validating
>>>> requests/responses coming to the microgateway and send error messages to
>>>> the client if the request/response is invalid.
>>>>
>>>> When a client sends a request to the microgateway if the request is
>>>> invalid I’m sending an error message with the HTTP status code
>>>> 422(Unprocessable entity) to the client. And also I’m doing the response
>>>> validation. If the response coming from the backend is invalid I send an
>>>> error message to the client. I need to know what will be the most
>>>> appropriate HTTP status code to be included in the error if the response is
>>>> invalid.
>>>>
>>>> Thank you!
>>>>
>>>> --
>>>>
>>>> *Shalki Wenushika*
>>>> *Software Engineering Intern*
>>>> WSO2  (University of Moratuwa)
>>>> *mobile *: *+94 716792399* |   *email *:
>>>> <http://c.content.wso2.com/signatures/wso2-signature-general.png>
>>>> wenush...@wso2.com
>>>>
>>>>
>>>>
>>>>
>>>
>>> --
>>> Regards,
>>> Uvindra
>>>
>>> Mobile: 33962
>>>
>>
>>
>> --
>>
>> *Harsha Kumara*
>>
>> Associate Technical Lead, WSO2 Inc.
>> Mobile: +94775505618
>> Email: hars...@wso2.coim
>> Blog: harshcreationz.blogspot.com
>>
>> GET INTEGRATION AGILE
>> Integration Agility for Digitally Driven Business
>>
>
>
> --
> *Sanjeewa Malalgoda*
> Software Architect | Associate Director, Engineering - WSO2 Inc.
> (m) +94 712933253 | (e) sanje...@wso2.com | (b) Blogger
> <http://sanjeewamalalgoda.blogspot.com>, Medium
> <https://medium.com/@sanjeewa190>
>
> GET INTEGRATION AGILE <https://wso2.com/signature>
> Integration Agility for Digitally Driven Business
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>


-- 
*Rajith Roshan* | Senior Software Engineer | WSO2 Inc.
(m) +94-717-064-214 |  (e) raji...@wso2.com 

<https://wso2.com/signature>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Achieve Multiple instances of API-M store

2019-01-02 Thread Rajith Roshan
I think you can try the external stores feature[1] available in the API
manger

[1] -
https://docs.wso2.com/display/AM210/Publish+to+Multiple+External+API+Stores

On Wed, Jan 2, 2019 at 8:34 AM Mintu Eapen  wrote:

> Hi
>
>
>
> I am trying to achieve multiple store instances for the same API manager
> setup.
>
>
>
> Is this possible..
>
>
>
> My requirement is that.. one API store instance should be available only
> for the internal network users, and the other one should be available for
> the external users.
>
>
>
>
>
>
>
>
> * Mintu Eapen *
>
> *T:*   *F:  *  P.O.BOX*:* 4700, Dubai U.A.E
> *E:* mea...@dc.gov.ae
>
> Main building - MAKANI# 3089993465
> Personal Status building - MAKANI# 3427491952
> <https://twitter.com/DUBAICOURTS>
> <http://www.facebook.com/DubaiCourt?ref=hl>
>
> *مينتو ايبان*
>
> *هاتف:**فاكس: * *ص.ب:* 4700 دبي  إ.ع.م
> *البريد الإلكتروني:* mea...@dc.gov.ae
>
> هذه الرسالة و مرفقاتها تمثل وثيقة سرية قد تحتوي على معلومات تتمتع بحماية
> وحصانة قانونية، إذا لم تكن الشخص المعني بهذه الرسالة يجب عليك إبلاغنا فورا
> عن طريق صفحة التواصل
> <https://www.dc.gov.ae/PublicServices/ContactUs.jsf#form> على موقع
> المحاكم ، و حذف الرسالة و مرفقاتها من الحاسب الآلي الخاص بك. ولا يجوز لك
> نسخ هذه الرسالة و مرفقاتها أو أي جزء منها، أو البوح بمحتوياتها لأي شخص أو
> استعمالها لأي غرض. علماً بأن الإفادات و الآراء التي تحويها هذه الرسالة تعبر
> فقط عن رأي المُرسل و ليس بالضرورة رأي محاكم دبي، ولا تتحمل ( محاكم دبي) أي
> مسئولية عن الأضرار الناتجة عن أي فيروسات قد يحملها هذا البريد
> *يرجى التفكير في البيئة قبل طباعة هذا البريد الالكتروني ومرفقاته*
>
> Disclaimer: This message and its attachment are confidential and may
> contain legally privileged information. If you are not the intended
> recipient, please notify us immediately on our Contact Us
> <https://www.dc.gov.ae/PublicServices/ContactUs.jsf#form> page or delete
> this message and its attachment. You should not copy this message or
> disclose its contents to any other person or use it for any purpose.
> Statements and opinions expressed in this e-mail are those of the sender,
> and do not necessarily reflect those of Dubai Courts. Dubai Courts accepts
> no liability for damage caused by any virus transmitted by this email
> *Please consider the environment before printing this e-mail and
> attachments*
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>


-- 
*Rajith Roshan* | Senior Software Engineer | WSO2 Inc.
(m) +94-717-064-214 |  (e) raji...@wso2.com 

<https://wso2.com/signature>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Dev][VOTE] Release of WSO2 API Manager 2.6.0 RC3

2018-09-15 Thread Rajith Roshan
Tested following scenarios.

Basic API creation , publish and invoke flow
Creating api using swagger
Build a micro gw by using api created by swagger and invoke the resources
Customize the life cycle to add new state and check the lifecycle
transitions
Tested the basic scope validation
Tested the cross tenant subscription flow
Tested cross tenant subscriptions with scope validation

No blockers found.
[+] Stable - go ahead and release

Thanks!
Rajith

On Sat, Sep 15, 2018 at 4:27 PM Sanjeewa Malalgoda 
wrote:

> Tested microgateway flows,
>
> Microgateway docker/VM mode with APIM 2.5
> Microgateway  API pull using name and label to create gateway.
>
> Microgateway docker/VM mode with APIM 2.6
>
> +1.
>
> Thanks,
> sanjeewa.
>
>
> On Sat, Sep 15, 2018 at 3:34 PM Nuwan Dias  wrote:
>
>> Tested the following.
>>
>> Basic API creation by creator role
>> Publishing by publisher role
>> User sign up
>> Creation and invocation of SOAP APIs
>> Microgateway VM mode
>> Microgateway docker mode
>>
>> [+] Stable - go ahead and release
>>
>> Thanks,
>> NuwanD.
>>
>> On Sat, Sep 15, 2018 at 10:34 AM Chamila Adhikarinayake <
>> chami...@wso2.com> wrote:
>>
>>> Microgateway RC3 can be found in
>>> https://github.com/wso2/product-microgateway/releases/tag/v2.6.0-rc3
>>>
>>> Thanks
>>> Chamila
>>>
>>> On Sat, Sep 15, 2018 at 7:04 AM, Chamila Adhikarinayake <
>>> chami...@wso2.com> wrote:
>>>
>>>> Hi All,
>>>>
>>>> We are pleased to announce the third release candidate of WSO2 API
>>>> Manager 2.6.0.
>>>>
>>>> This release fixes the following issues.
>>>>
>>>> Fixes : carbon-apimgt
>>>> <https://github.com/wso2/carbon-apimgt/issues?utf8=%E2%9C%93&q=is%3Aclosed+closed%3A2018-07-16..2018-09-15+-label%3A%22APIM+3.0.0%22>
>>>> Fixes : product-apim
>>>> <https://github.com/wso2/product-apim/issues?utf8=%E2%9C%93&q=is%3Aclosed+closed%3A2018-07-16..2018-09-15+-label%3A%223.0.0%22>
>>>> Fixes : analytics-apim
>>>> <https://github.com/wso2/analytics-apim/issues?utf8=%E2%9C%93&q=is%3Aclosed+closed%3A2018-07-16..2018-09-15>
>>>> Fixes : product-microgateway
>>>> <https://github.com/wso2/product-microgateway/issues?utf8=%E2%9C%93&q=is%3Aclosed+closed%3A2018-07-16..2018-09-15>
>>>>
>>>> Source and Distribution,
>>>>- Runtime :
>>>> https://github.com/wso2/product-apim/releases/tag/v2.6.0-rc3
>>>>- Analytics :
>>>> https://github.com/wso2/analytics-apim/releases/tag/v2.6.0-rc3
>>>>- Tooling :
>>>> https://github.com/wso2/devstudio-tooling-apim/releases/tag/v2.6.0-rc1
>>>>- Microgateway :
>>>> https://github.com/wso2/product-microgateway/releases/tag/v2.6.0-rc2
>>>>
>>>> Please download, test the product and vote.
>>>>
>>>>   [+] Stable - go ahead and release
>>>>   [-] Broken - do not release (explain why)
>>>>
>>>> Thanks,
>>>> ~ WSO2 API Manager Team ~
>>>>
>>>>
>>>> --
>>>> Regards,
>>>> Chamila Adhikarinayake
>>>> Associate Technical Lead
>>>> WSO2, Inc.
>>>> Mobile - +94712346437
>>>> Email  - chami...@wso2.com
>>>> Blog  -  http://helpfromadhi.blogspot.com/
>>>>
>>>
>>>
>>>
>>> --
>>> Regards,
>>> Chamila Adhikarinayake
>>> Associate Technical Lead
>>> WSO2, Inc.
>>> Mobile - +94712346437
>>> Email  - chami...@wso2.com
>>> Blog  -  http://helpfromadhi.blogspot.com/
>>>
>>
>>
>> --
>> *Nuwan Dias* | Director | WSO2 Inc.
>> (m) +94 777 775 729 | (e) nuw...@wso2.com
>> [image: Signature.jpg]
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>
>
> --
> *Sanjeewa Malalgoda*
> Software Architect | Associate Director, Engineering WSO2 Inc.
> (m) +94 712933253 | (e) sanje...@wso2.com
>
> GET INTEGRATION AGILE <https://wso2.com/signature>
> Integration Agility for Digitally Driven Business
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>


-- 
Rajith Roshan
Senior Software Engineer, WSO2 Inc.
Mobile: +94-7 <%2B94-71-554-8430>17-064-214
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [APIM][3.0.0] Endpoint configuration

2018-09-09 Thread Rajith Roshan
Hi All,

This seems to be a valid use case, we have changed the endpoint config to
maintain additional  attributes map where it can keep key value pairs

"endpointConfig": [
{
  "url": "http://localhost:8280/ep1";,
  "timeout": "1000",
   "attributes" : []
},
{
  "url": "http://localhost:8280/ep2";,
  "timeout": "3000",
  "attributes" : [{name:"suspendedTime", "value":"3s"}]
}
  ],

On Mon, Aug 27, 2018 at 11:18 AM Youcef HILEM 
wrote:

> Hi,
>
> Can we add custom key-values to the endpoint config ?
>
> One of the keys for example is the DataCenter where the backend is
> deployed.
> This will simplify how to implement a load-balancing affinity to preferred
> data center.
>
> Thanks
> Youcef HILEM
>
>
>
> --
> Sent from:
> http://wso2-oxygen-tank.10903.n7.nabble.com/WSO2-Development-f3.html
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>


-- 
Rajith Roshan
Senior Software Engineer, WSO2 Inc.
Mobile: +94-717-064-214
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [APIM][3.0.0] Endpoint configuration

2018-08-26 Thread Rajith Roshan
Hi all,

We have changed the endpoint config support json elements instead of the
json string. Please find the update d endpoint element as below.

"endpoint" :[
  {
"key": "01234567-0123-0123-0123-012345678901",
"inline": {
  "id": "01234567-0123-0123-0123-012345678901",
  "name": "Endpoint 1",
  "endpointConfig": [
{
  "url": "http://localhost:8280/ep1";,
  "timeout": "1000"
},
{
  "url": "http://localhost:8280/ep2";,
  "timeout": "2000"
}
  ],
  "endpointSecurity": {
"enabled": false,
"type": "basic",
"username": "basic",
"password": "basic"
  },
  "maxTps": 1000,
  "type": "http"
},
"type": "Production"
  },
  {
"key": "01234567-0123-0123-0123-012345678902",
"inline": {
  "id": "01234567-0123-0123-0123-012345678902",
  "name": "Endpoint 2",
  "endpointConfig": [
{
  "url": "http://localhost:8280/ep1";,
  "timeout": "1000"
},
{
  "url": "http://localhost:8280/ep2";,
  "timeout": "3000"
}
  ],
  "endpointSecurity": {
"enabled": false,
"type": "basic",
"username": "basic",
"password": "basic"
  },
  "maxTps": 1000,
  "type": "http"
},
"type": "Sandbox"
  }
]


Thanks!
Rajith

On Wed, Aug 22, 2018 at 9:44 AM Rajith Roshan  wrote:

> Hi all,
>
> Currently the APIM V3 rest api support following format to declare
> endpoint details  when creating an API. We can add endpoints with type
> "Production" and "Sandbox".
> The "*endpointConfig*" parameter is directly saved in database as blob
> and used in the UI to show endpoint details of api.
> In order to support to declare multiple endpoints for ex as load balanced
> or fail over I would like to suggest the following json [3] for
> endpointConfig and add an extra parameter(*endpointType*) to endpoint
> parameter as in [4] in order to declare the the type as load balanced or
> fail over.
> Please share your thought on this
>
> [1] - "endpoint": [
> {
>   "key": "01234567-0123-0123-0123-012345678901",
>   "inline": {
> "id": "01234567-0123-0123-0123-012345678901",
> "name": "Endpoint 1",
> "*endpointConfig*": "{url: http://localhost:8280, timeout: 1000}",
> "endpointSecurity": {
>   "enabled": false,
>   "type": "basic",
>   "username": "basic",
>   "password": "basic"
> },
> "maxTps": 1000,
> "type": "http"
>   },
>   "type": "Production"
> }
>   ],
>
> [2] - "endpointConfig": "{url: http://localhost:8280, timeout: 1000}"
>
> [3] - "endpointConfig": "[{\"url\": \"http://localhost:8280/ep1\";,
> \"timeout\": \"1000\"},{\"url\": \"http://localhost:8280/ep2\";,
> \"timeout\": \"2000\"}]"
>
> [4] -
> [
>{
>   "key":"01234567-0123-0123-0123-012345678901",
>   "inline":{
>  "id":"01234567-0123-0123-0123-012345678901",
>  "name":"Endpoint 1",
>  "*endpointConfig*":"[{\"url\": \"http://localhost:8280/ep1\";,
> \"timeout\": \"1000\"},{\"url\": \"http://localhost:8280/ep2\";,
> \"timeout\": \"2000\"}]",
>  "endpointSecurity":{
> "enabled":false,
> "type":"basic",
> "username":"basic",
> "password":"basic"
>  },
>  "maxTps":1000,
>  "type":"http"
>   },
>   "type":"Production",
>   "endpointType":"failover"
>},
>{
>   "key":"01234567-0123-0123-0123-012345678902",
>   "inline":{
>  "id":"01234567-0123-0123-0123-012345678902",
>  "name":"Endpoint 2",
>  "*endpointConfig*":"[{\"url\": \"http://localhost:8280/ep1\";,
> \"timeout\": \"1000\"},{\"url\": \"http://localhost:8280/ep2\";,
> \"timeout\": \"3000\"}]",
>  "endpointSecurity":{
> "enabled":false,
> "type":"basic",
> "username":"basic",
> "password":"basic"
>  },
>  "maxTps":1000,
>  "type":"http"
>   },
>   "type":"Sandbox",
>   "endpointType":"failover"
>}
> ]
>
> Thanks!
> Rajith
>
>
> --
> Rajith Roshan
> Senior Software Engineer, WSO2 Inc.
> Mobile: +94-717-064-214
>


-- 
Rajith Roshan
Senior Software Engineer, WSO2 Inc.
Mobile: +94-7 17-064-214
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [APIM][3.0.0] Standard for maintaining i18n keys in the json file

2018-08-21 Thread Rajith Roshan
Hi all,
We have added the support  for localization in APIM v3. We have followed
the format[1] (words separated by dots)when specifying the key for the i18n
text.
But when we have lengthy text values , the key is getting longer as in [2].
We have followed the same patter in APIM V2 also when specifying the key,
where the key is similar as the text need to be displayed.
When we have keys with separated by dota, if the text to be displayed have
special character like ", or . or ' or etc", we can not incorporate them
into the key.
So we need  answers for the following two questions.

1. Are we creating the text key same as the text to be displayed. (AFAIK we
have done this in V2 because its easy to translate the json file in to
another language) or are we using short key values.
2. Are we using the dot (.) as the delimiter for key values. If the answer
to the question 1, is to use key as same as the value, we can not use this
delimiter because we can not include special characters


[1] -
https://github.com/wso2/carbon-dashboards/blob/master/components/dashboards-web-component/public/locales/en.json

[2] -
https://github.com/wso2/carbon-apimgt/blob/master/features/apimgt/org.wso2.carbon.apimgt.publisher.feature/src/main/resources/publisher/public/locales/en.json#L9

Thanks!
Rajith

-- 
Rajith Roshan
Senior Software Engineer, WSO2 Inc.
Mobile: +94-717-064-214
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [APIM][3.0.0] Endpoint configuration

2018-08-21 Thread Rajith Roshan
Hi all,

Currently the APIM V3 rest api support following format to declare endpoint
details  when creating an API. We can add endpoints with type "Production"
and "Sandbox".
The "*endpointConfig*" parameter is directly saved in database as blob and
used in the UI to show endpoint details of api.
In order to support to declare multiple endpoints for ex as load balanced
or fail over I would like to suggest the following json [3] for
endpointConfig and add an extra parameter(*endpointType*) to endpoint
parameter as in [4] in order to declare the the type as load balanced or
fail over.
Please share your thought on this

[1] - "endpoint": [
{
  "key": "01234567-0123-0123-0123-012345678901",
  "inline": {
"id": "01234567-0123-0123-0123-012345678901",
"name": "Endpoint 1",
"*endpointConfig*": "{url: http://localhost:8280, timeout: 1000}",
"endpointSecurity": {
  "enabled": false,
  "type": "basic",
  "username": "basic",
  "password": "basic"
},
"maxTps": 1000,
"type": "http"
  },
  "type": "Production"
}
  ],

[2] - "endpointConfig": "{url: http://localhost:8280, timeout: 1000}"

[3] - "endpointConfig": "[{\"url\": \"http://localhost:8280/ep1\";,
\"timeout\": \"1000\"},{\"url\": \"http://localhost:8280/ep2\";,
\"timeout\": \"2000\"}]"

[4] -
[
   {
  "key":"01234567-0123-0123-0123-012345678901",
  "inline":{
 "id":"01234567-0123-0123-0123-012345678901",
 "name":"Endpoint 1",
 "*endpointConfig*":"[{\"url\": \"http://localhost:8280/ep1\";,
\"timeout\": \"1000\"},{\"url\": \"http://localhost:8280/ep2\";,
\"timeout\": \"2000\"}]",
 "endpointSecurity":{
"enabled":false,
"type":"basic",
"username":"basic",
"password":"basic"
 },
 "maxTps":1000,
 "type":"http"
  },
  "type":"Production",
  "endpointType":"failover"
   },
   {
  "key":"01234567-0123-0123-0123-012345678902",
  "inline":{
 "id":"01234567-0123-0123-0123-012345678902",
 "name":"Endpoint 2",
 "*endpointConfig*":"[{\"url\": \"http://localhost:8280/ep1\";,
\"timeout\": \"1000\"},{\"url\": \"http://localhost:8280/ep2\";,
\"timeout\": \"3000\"}]",
 "endpointSecurity":{
"enabled":false,
"type":"basic",
"username":"basic",
"password":"basic"
 },
 "maxTps":1000,
 "type":"http"
  },
  "type":"Sandbox",
  "endpointType":"failover"
   }
]

Thanks!
Rajith


-- 
Rajith Roshan
Senior Software Engineer, WSO2 Inc.
Mobile: +94-717-064-214
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [APIM][Micro-GW] Retrieving the microgateway label in runtime

2018-08-08 Thread Rajith Roshan
On Wed, Aug 8, 2018 at 7:33 PM Nuwan Dias  wrote:

> How about introducing it as an annotation (custom of course) to the
> Ballerina code itself?
>
This seems to be the most easiest way, But one micro gw can have multiple
apis  , then annotation have to be copied for each api.
Other way is to add it to micro-gw conf (toml) while copying it to the
distribution when building the distribution.

>
> On Wed, Aug 8, 2018 at 5:46 PM Fazlan Nazeem  wrote:
>
>> Hi,
>>
>> Is there a way to extract the microgateway label from the runtime? This
>> is because we need to publish this information to the Stream Processor for
>> analytics. Although we do not have any charts which filter statistics
>> depending on the label, this may come up as a requirement in the future.
>> Additionally, there should be some mechanism to know what label is
>> associated with each microgateway. Once the micro-gateway is generated,
>> this information doesn't seem to be retrievable.
>>
> And also micro gateway can be built without  label also. It can fetch an
api from name and version, so there won't be label at that time.  Then we
have only the project name. Can't we use project name for this.

>
>> Currently, the value for the label field is predefined in the source
>> code. According to an offline chat with Malintha, we may have to burn the
>> label into the microgw-conf file during gateway building phase or persist
>> this info in some other means. Any suggestions?
>>
>

>> --
>> Thanks & Regards,
>>
>> *Fazlan Nazeem*
>> Senior Software Engineer
>> WSO2 Inc
>> Mobile : +94772338839
>> fazl...@wso2.com
>>
>
>
> --
> Nuwan Dias
>
> Director - WSO2, Inc. http://wso2.com
> email : nuw...@wso2.com
> Phone : +94 777 775 729
>


-- 
Rajith Roshan
Senior Software Engineer, WSO2 Inc.
Mobile: +94-7 17-064-214
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] UserIdentityManagementAdmin service does not return correct set of challenge questions

2018-07-16 Thread Rajith Roshan
Thanks Farasath !!

On Mon, Jul 16, 2018 at 12:52 PM Farasath Ahamed  wrote:

>
>
> On Tuesday, July 17, 2018, Rajith Roshan  wrote:
>
>> Hi Devs,
>>
>> When I add a challenge question to existing challenge set ot create new
>> challenge question set from IS 5.3.0 carbon console, and when I invoke the
>> "getAllChallengeQuestions" operation in
>> UserIdentityManagementAdminService, it  returns the only old set of
>> challenge question. The newly added ones are not visible.
>>
>
> In our new implementation(from IS 5.3.0), Challenge question related
> operations are done using ChallengeQuestionManagementAdminService[1]
>
> [1]
> https://github.com/wso2-extensions/identity-governance/blob/master/components/org.wso2.carbon.identity.recovery/src/main/java/org/wso2/carbon/identity/recovery/services/ChallengeQuestionManagementAdminService.java
>
>
>> And also , when I add a new question using the "setChallengeQuestions" in
>> admin service, its get added, and I could not see this newly added question
>> in carbon console as well. And also If I invoke the "
>> getAllChallengeQuestions" method after adding a challenge question, it
>> only shows me the newly added one only.
>>
>> Your inputs regarding this is highly appreciated.
>>
>> Thanks!
>> Rajith
>>
>> --
>> Rajith Roshan
>> Senior Software Engineer, WSO2 Inc.
>> Mobile: +94-717-064-214
>>
>
>
> --
> Farasath Ahamed
> Senior Software Engineer, WSO2 Inc.; http://wso2.com
> Mobile: +94777603866
> Blog: blog.farazath.com
> Twitter: @farazath619 <https://twitter.com/farazath619>
> <http://wso2.com/signature>
>
>
>
>
>

-- 
Rajith Roshan
Senior Software Engineer, WSO2 Inc.
Mobile: +94-7 17-064-214
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] UserIdentityManagementAdmin service does not return correct set of challenge questions

2018-07-16 Thread Rajith Roshan
Hi Devs,

When I add a challenge question to existing challenge set ot create new
challenge question set from IS 5.3.0 carbon console, and when I invoke the
"getAllChallengeQuestions" operation in
UserIdentityManagementAdminService, it  returns the only old set of
challenge question. The newly added ones are not visible.

And also , when I add a new question using the "setChallengeQuestions" in
admin service, its get added, and I could not see this newly added question
in carbon console as well. And also If I invoke the "
getAllChallengeQuestions" method after adding a challenge question, it only
shows me the newly added one only.

Your inputs regarding this is highly appreciated.

Thanks!
Rajith

-- 
Rajith Roshan
Senior Software Engineer, WSO2 Inc.
Mobile: +94-717-064-214
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [Architecture] [VOTE] Release of WSO2 API Manager Microgateway Toolkit 2.5.0 RC2

2018-07-06 Thread Rajith Roshan
Hi All,

Tested below scenarios.


   1. Default version of API
   2. Subscription validation for jwt token
   3. Subscription validation for oauth2 token
   4. Scope validation for oauth2 token
   5. Scope validation for jwt token
   6. Basic ballerina service generation for APIs

No blockers found.

[+] Stable - go ahead and release

Thanks!


On Fri, Jul 6, 2018 at 1:03 PM Malintha Amarasinghe 
wrote:

> Tested below scenarios:
>
> 1. Testing API invocation with an OAuth2 access token and JWT token
> generated from Store.
> 2. Response caching.
> 3. Disabling HTTP/HTTPs transports per API (Publisher manage page).
> 4. Testing code generation and API invocation with wildcard resources,
> path, and query parameter combinations and check whether params are
> properly sent to backend upon invocation.
> 5. Tested load balanced and failover endpoints.
>
> [+] Stable - go ahead and release
>
> Thanks!
>
>
> On Fri, Jul 6, 2018 at 7:41 PM, Rukshan Premathunga 
> wrote:
>
>> Hi All,
>>
>> We are pleased to announce the second release candidate of WSO2 API
>> Manager Microgateway Toolkit 2.5.0.
>>
>> This release fixes the following issues.
>>
>>- Fixes: product-microgateway
>>
>> <https://github.com/wso2/product-microgateway/issues?q=is%3Aissue+milestone%3A2.5.0+is%3Aclosed>
>>
>> Distribution : 
>> *https://github.com/wso2/product-microgateway/releases/download/v2.5.0-rc2/wso2am-micro-gw-toolkit-2.5.0-RC2.zip
>> <https://github.com/wso2/product-microgateway/releases/download/v2.5.0-rc2/wso2am-micro-gw-toolkit-2.5.0-RC2.zip>*
>>
>> Please download, test the product and vote.
>>
>> [+] Stable - go ahead and release
>> [-] Broken - do not release (explain why)
>>
>> Thanks,
>> WSO2 API Manager Team
>>
>> --
>> Rukshan Chathuranga.
>> WSO2, Inc.
>> +94711822074
>>
>
>
>
> --
> Malintha Amarasinghe
> *WSO2, Inc. - lean | enterprise | middleware*
> http://wso2.com/
>
> Mobile : +94 712383306
> ___
> Architecture mailing list
> architect...@wso2.org
> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>


-- 
Rajith Roshan
Senior Software Engineer, WSO2 Inc.
Mobile: +94-7 17-064-214
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Giving the different Access tokens in API manager 2.5.0 when try to generate new tokens before expired the access token.

2018-07-03 Thread Rajith Roshan
I guess we have to call the getIdentityOauthTokenIssuer method in line [1],
instead of " getOAuthTokenGenerator" method.

[1] -
https://github.com/wso2/carbon-apimgt/blob/6.x/components/apimgt/org.wso2.carbon.apimgt.keymgt/src/main/java/org/wso2/carbon/apimgt/keymgt/issuers/APIMTokenIssuer.java#L112

On Tue, Jul 3, 2018 at 5:55 AM Nuwan Dias  wrote:

> [Adding Prasanna].
>
> I don't think this behavior is intentional. Therefore we will have to fix
> this.
>
> On Tue, Jul 3, 2018 at 5:44 PM Omindu Rathnaweera  wrote:
>
>> Hi Fazlan/Nalaka,
>>
>> This behavior is not there in the IS 5.6.0 release candidate. I did a
>> small test by reverting the APIMTokenIssuer to the default one and the
>> issue got resolved. Better to check the APIMTokenIssuer.
>>
>> On Mon, Jul 2, 2018 at 7:48 PM Fazlan Nazeem  wrote:
>>
>>> This seems to be true.
>>>
>>> @IS team,  What is the reason to expire the token before the expiry time
>>> and without a revocation request?
>>>
>>> On Mon, Jul 2, 2018 at 2:31 PM Nalaka Senarathna 
>>> wrote:
>>>
>>>> In the latest release of API manager if we try to generate new access
>>>> tokens before it expired using "password grant type " output is different
>>>> access tokens with the same refresh token. when checking the database it
>>>> shows the state is "EXPIRED" of the previous access token.
>>>>
>>>> In earlier releases, if the access token is not expired output was the
>>>> same access token when trying to generate using the password grant type.
>>>>
>>>> Is that change made by intentionally In new release?
>>>>
>>>> regards.
>>>> --
>>>> *Nalaka Senarathna*
>>>> *Associate Software Engineer | WSO2*
>>>>
>>>> *Email : nala...@wso2.com *
>>>> *Mobile : +94714118474*
>>>> *web :  https://wso2.com <https://wso2.com>*
>>>> <https://wso2.com/signature>
>>>>
>>>> ___
>>>> Dev mailing list
>>>> Dev@wso2.org
>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>
>>>
>>>
>>> --
>>> Thanks & Regards,
>>>
>>> *Fazlan Nazeem*
>>> Senior Software Engineer
>>> WSO2 Inc
>>> Mobile : +94772338839
>>> fazl...@wso2.com
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>
>> Regards,
>> Omindu
>> --
>> Omindu Rathnaweera
>> Senior Software Engineer, WSO2 Inc.
>> Mobile: +94 771 197 211
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>
>
> --
> Nuwan Dias
>
> Director - WSO2, Inc. http://wso2.com
> email : nuw...@wso2.com
> Phone : +94 777 775 729
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>


-- 
Rajith Roshan
Senior Software Engineer, WSO2 Inc.
Mobile: +94-7 17-064-214
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [APIM] Unable to run micro-gw generated balx file

2018-06-27 Thread Rajith Roshan
ang.util.codegen.ProgramFileReader.getAttributeInfo(ProgramFileReader.java:1143)
>>>> at
>>>> org.ballerinalang.util.codegen.ProgramFileReader.readAttributeInfoEntries(ProgramFileReader.java:1133)
>>>> at
>>>> org.ballerinalang.util.codegen.ProgramFileReader.readStructInfoEntries(ProgramFileReader.java:497)
>>>> at
>>>> org.ballerinalang.util.codegen.ProgramFileReader.readPackageInfo(ProgramFileReader.java:377)
>>>> at
>>>> org.ballerinalang.util.codegen.ProgramFileReader.readProgramInternal(ProgramFileReader.java:159)
>>>> at
>>>> org.ballerinalang.util.codegen.ProgramFileReader.readProgram(ProgramFileReader.java:126)
>>>> at org.ballerinalang.BLangProgramLoader.read(BLangProgramLoader.java:39)
>>>> ... 4 more
>>>>
>>>> Regards,
>>>> Dinusha
>>>>
>>>> --
>>>> Dinusha Dilrukshi
>>>> Technical Lead
>>>> WSO2 Inc.: http://wso2.com/
>>>> Mobile: +94764069991
>>>> Blog: http://dinushasblog.blogspot.com/
>>>>
>>>
>>>
>>>
>>> --
>>> Malintha Amarasinghe
>>> *WSO2, Inc. - lean | enterprise | middleware*
>>> http://wso2.com/
>>>
>>> Mobile : +94 712383306
>>>
>>
>>
>> --
>> Dinusha Dilrukshi
>> Technical Lead
>> WSO2 Inc.: http://wso2.com/
>> Mobile: +94764069991
>> Blog: http://dinushasblog.blogspot.com/
>>
>
>
>
> --
> Malintha Amarasinghe
> *WSO2, Inc. - lean | enterprise | middleware*
> http://wso2.com/
>
> Mobile : +94 712383306
>


-- 
Rajith Roshan
Senior Software Engineer, WSO2 Inc.
Mobile: +94-7 17-064-214
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] How to determine current distinct subscribers across all apps

2018-06-26 Thread Rajith Roshan
Hi,
Is it possible to use the manage subscription UI of the publisher, which
gives the user name

[image: Manage-subscriptions.png]
​

On Tue, Jun 26, 2018 at 2:22 PM Shazni Nazeer  wrote:

>
> Is there a way to determine the user ids of distinct current subscribers
> across all applications in the API-M from the UI?
>
> I can get the detail from the database using a query.
>
> I can also get the details of all subscriptions as well as API wise
> subscribers from the analytics.
>
> --
> Shazni Nazeer
>
> Mob : +94 37331
> LinkedIn : http://lk.linkedin.com/in/shazninazeer
>
> Blogs :
>
> https://medium.com/@mshazninazeer
> http://shazninazeer.blogspot.com
>
> <http://wso2.com/signature>
>
>
> --
> Shazni Nazeer
>
> Mob : +94 37331
> LinkedIn : http://lk.linkedin.com/in/shazninazeer
>
> Blogs :
>
> https://medium.com/@mshazninazeer
> http://shazninazeer.blogspot.com
>
> <http://wso2.com/signature>
>


-- 
Rajith Roshan
Senior Software Engineer, WSO2 Inc.
Mobile: +94-7 17-064-214
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] How to read API properties in velocity template

2018-06-12 Thread Rajith Roshan
Hi
You can read the additional properties like in [1]

[1] - $apiObj.additionalProperties.get('property_name')

On Wed, Jun 13, 2018 at 10:47 AM Sachithra Dangalla 
wrote:

> Hi all,
>
> I'm trying to filter out handlers to be executed for an API based on a
> custom property which set during API publishing (when setting API
> properties in "Manage" section). In order to add a condition in the
> velocity template, I need to read the properties set for the API. Other
> variables could be read by using variables such as "$!apiVersion",
> "$isSoapToRestMode", "$resource.getUriTemplate()" etc. How can I read the
> list of properties from velocity template?
>
> Thanks,
> Regards,
> --
>
> *Sachithra Dangalla*
> Software Engineer
> WSO2 Inc. http://wso2.com
> Blog: http://comexile.blogspot.com
> Mobile : +94 71 3700 656
> _______
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>


-- 
Rajith Roshan
Senior Software Engineer, WSO2 Inc.
Mobile: +94-7 17-064-214
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [Announce] [Architecture] WSO2 API Manager 3.0.0-M26 Released!

2018-04-12 Thread Rajith Roshan
The WSO2 API Manager team is pleased to announce the release of API Manager
3.0.0-M26. It's now available to download.
Distribution

   - wso2apim-3.0.0-M26
   
<https://github.com/wso2/product-apim/releases/download/v3.0.0-m26/wso2apim-3.0.0-m26.zip>
   - wso2apim-gateway-3.0.0-M26
   
<https://github.com/wso2/product-apim/releases/download/v3.0.0-m26/wso2apim-gateway-3.0.0-m26.zip>

Documentation

   - WSO2 API Manager 3.0.0 <https://docs.wso2.com/display/AM300/>

Following list contains all the features, improvements and bug fixes
available with this milestone.
Bug Fixes

   - Product-APIM Bug fixses
   
<https://github.com/wso2/product-apim/issues?q=is%3Aissue+milestone%3A3.0.0-m26+is%3Aclosed>

List of Open Issues

   - Open Issues for Product-APIM
   
<https://github.com/wso2/product-apim/issues?q=is%3Aopen+is%3Aissue+label%3A3.0.0+label%3AType%2FBug>

How To Contribute

Your feedback is most welcome!
Mailing Lists

Join our mailing list and collaborate with the developers directly.

Developer List : dev@wso2.org | Subscribe | Mail Archive
<http://mail.wso2.org/mailarchive/dev/>

   - User Forum : StackOverflow
   <https://stackoverflow.com/questions/tagged/wso2-am>

Reporting Issues

We encourage you to report issues, improvements and feature requests
regarding WSO2 API Manager through WSO2 API Manager GIT Issues
<https://github.com/wso2/product-apim/issues>.

~ WSO2 API Manager Team ~


-- 
Rajith Roshan
Senior Software Engineer, WSO2 Inc.
Mobile: +94-7 <%2B94-71-554-8430>17-064-214
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Unable to find the org.wso2.carbon.user.core package in carbon-kernel 4.4.11 branch

2018-04-06 Thread Rajith Roshan
Hi Jason,
Can you try check out to the upstream tag instead of the upstream branch.

Thanks!
Rajith

On Fri, Apr 6, 2018 at 12:48 PM, Jason De Silva  wrote:

> Hi Devs,
>
> I tried to checkout "org.wso2.carbon.user.core
> <https://github.com/wso2/carbon-kernel/tree/v4.4.10/core/org.wso2.carbon.user.core>"
> v 4.4.11 ( which is used by IS 5.3.0 ). But when I check out to the v
> 4.4.11 branch [1] I cannot seem to find the user core packages. However the
> org.wso2.carbon.user.core package can be found in other branches e.g [2].
> Any idea what can be the cause for this?
>
> [1] https://github.com/wso2/carbon-kernel/tree/v4.4.11/core
> [2] https://github.com/wso2/carbon-kernel/tree/v4.4.10/core
>
> Regards,
> Jason
>
> Jason De Silva
> *Software Engineer - QA*
> Mobile: +94 (0) 772 097 678
> Email: jas...@wso2.com
> WSO2 Inc. www.wso2.com
> <http://wso2.com/signature>
>



-- 
Rajith Roshan
Senior Software Engineer, WSO2 Inc.
Mobile: +94-7 <%2B94-71-554-8430>17-064-214
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [Announce] [Architecture] WSO2 API Manager 3.0.0-M25 Released!

2018-04-05 Thread Rajith Roshan
The WSO2 API Manager team is pleased to announce the release of API Manager
3.0.0-M25. It's now available to download.
Distribution

   - wso2apim-3.0.0-M25
   
<https://github.com/wso2/product-apim/releases/download/v3.0.0-m25/wso2apim-3.0.0-m25.zip>
   - wso2apim-gateway-3.0.0-M25
   
<https://github.com/wso2/product-apim/releases/download/v3.0.0-m25/wso2apim-gateway-3.0.0-m25.zip>

Documentation

   - WSO2 API Manager 3.0.0 <https://docs.wso2.com/display/AM300/>

Following list contains all the features, improvements and bug fixes
available with this milestone.
Bug Fixes

   - Product-APIM Bug fixses
   
<https://github.com/wso2/product-apim/issues?q=is%3Aissue+milestone%3A3.0.0-m25+is%3Aclosed>

List of Open Issues

   - Open Issues for Product-APIM
   
<https://github.com/wso2/product-apim/issues?q=is%3Aopen+is%3Aissue+label%3A3.0.0+label%3AType%2FBug>

How To Contribute

Your feedback is most welcome!
Mailing Lists

Join our mailing list and collaborate with the developers directly.

Developer List : dev@wso2.org | Subscribe | Mail Archive
<http://mail.wso2.org/mailarchive/dev/>

   - User Forum : StackOverflow
   <https://stackoverflow.com/questions/tagged/wso2-am>

Reporting Issues

We encourage you to report issues, improvements and feature requests
regarding WSO2 API Manager through WSO2 API Manager GIT Issues
<https://github.com/wso2/product-apim/issues>.

~ WSO2 API Manager Team ~


-- 
Rajith Roshan
Senior Software Engineer, WSO2 Inc.
Mobile: +94-7 <%2B94-71-554-8430>17-064-214
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Detect the APIM profile by analyzing product folder structure

2018-02-22 Thread Rajith Roshan
Hi,

Adding more to Fazlan's reply, usually this system property is specified in
either wso2server.sh or wso2server.bat file

Thanks!
Rajith

On Thu, Feb 22, 2018 at 4:25 PM, Fazlan Nazeem  wrote:

> Hi Sachithra,
>
> The directory structure does not differ according to the profiles.
>
> executing the following can tell which profile was passed as a system
> property when starting the server.
>
> jcmd  VM.system_properties | grep "profile"
>
>
> On Thu, Feb 22, 2018 at 3:28 PM, Sachithra Dangalla 
> wrote:
>
>> Hi,
>>
>> Is there a way to detect the profile of an APIM instance by looking at
>> the folder structure of the product?
>>
>> If not the folder structure, can we read a specific file and/or a
>> configuration (common to all profiles) and detect which profile it is?
>>
>> Thanks,
>> Regards,
>>
>> --
>>
>> *Sachithra Dangalla*
>> Software Engineer | WSO2
>> Mobile : +94 71 3700 656 <%2B%2094%2071%203700656>
>>
>
>
>
> --
> Thanks & Regards,
>
> *Fazlan Nazeem*
> Senior Software Engineer
> WSO2 Inc
> Mobile : +94772338839 <+94%2077%20233%208839>
> fazl...@wso2.com
>



-- 
Rajith Roshan
Senior Software Engineer, WSO2 Inc.
Mobile: +94-7 <%2B94-71-554-8430>17-064-214
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] How can we make all Greg store assets/services public to all users?

2018-01-23 Thread Rajith Roshan
Hi Ushani,

If you are referring to the service asset type, it was disabled in the
store by default in latest versions of the G-reg.
To enable it you have to edit the
$GREG_HOME/repository/deployment/server/jaggeryapps/store/extensions/app/greg_store/app.js
to
remove the service asset type from array[1]

[1] - disabledAssets: ['note',
'ebook','proxy','sequence','service','servicex','uri',

 'site','provider','gadget','document','endpoint','topic','reply', 'server']

On Wed, Jan 24, 2018 at 11:32 AM, Ushani Balasooriya 
wrote:

> Thanks Prasanna.
>
> On Wed, Jan 24, 2018 at 11:30 AM, Prasanna Dangalla 
> wrote:
>
>> Hi Ushani,
>>
>> If you give read permission to /system/governance resource path, all the
>> published assets will be displayed in the store for anonymous users as well.
>>
>> Thanks
>>
>> *Prasanna Dangalla*
>> Senior Software Engineer, WSO2, Inc.; http://wso2.com/
>> lean.enterprise.middleware
>>
>>
>> *cell: +94 718 11 27 51*
>> *twitter: @prasa77*
>>
>> On Wed, Jan 24, 2018 at 11:28 AM, Ushani Balasooriya 
>> wrote:
>>
>>> Hi,
>>>
>>> How can we make all Greg store assets/services public to all users?
>>>
>>> Thanks,
>>> --
>>> *Ushani Balasooriya*
>>> Associate Technical Lead - EE;
>>> WSO2 Inc; http://www.wso2.com/.
>>>
>>>
>>>
>>
>
>
> --
> *Ushani Balasooriya*
> Associate Technical Lead - EE;
> WSO2 Inc; http://www.wso2.com/.
> Mobile; +94772636796
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Rajith Roshan
Senior Software Engineer, WSO2 Inc.
Mobile: +94-7 <%2B94-71-554-8430>17-064-214
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [APIM2xx] how to add an api level throttling policy for "Apply to API" using updateAPI from publisher rest api?

2018-01-12 Thread Rajith Roshan
Hi,

It seems like API level policy is not included in the APIDTO object[1].
Hence this is not supported with rest api

[1] -
https://github.com/wso2/carbon-apimgt/blob/6.x/components/apimgt/org.wso2.carbon.apimgt.rest.api.store/src/gen/java/org/wso2/carbon/apimgt/rest/api/store/dto/APIDTO.java

Thanks!
Rajith

On Fri, Jan 12, 2018 at 12:13 PM, Kavitha Subramaniyam 
wrote:

> Hi all,
>
> While am trying to update API for my scenario using publisher rest api, I
> need to add a throttling policy (advance policy created from admin
> dashboard) specifically for API (Apply to API). By following this doc[1], I
> couldn't find a specific parameter to do this.
>
> Observation:
> I have modified API from UI and added api level throttling policy
> (change2.jpeg) and retrieved api details, but the response doesn't return a
> value for relevant field in api object[2]. Same way when I change API to
> add resource level policy (change1.jpeg) response values are returned in
> API definition.
>
> Appreciate your insight on this please.
>
> [1] https://docs.wso2.com/display/AM210/apidocs/publisher/#!/operations#
> APIIndividual#apisApiIdPut
> [2]
> {
> "id": "47027dad-12ff-4e31-84ce-4d574a8caa1b",
> "name": "Mobile_stock_API",
> "description": "This is the api description",
> "context": "/stocks",
> "version": "1.0.0",
> "provider": "admin",
> "apiDefinition": "{\"swagger\":\"2.0\",\"paths\
> ":{\"/stock/{id}\":{\"get\":{\"responses\":{\"200\":{\"
> description\":\"\"}},\"parameters\":[{\"name\":\"id\",\"in\":\"path\",\"
> allowMultiple\":false,\"required\":true,\"type\":\"
> string\"}],\"x-auth-type\":\"Application & Application
> User\",\"x-throttling-tier\":\"headerPolicy\"}},\"/stocks\":
> {\"get\":{\"responses\":{\"200\":{\"description\":\"\"}},\"x-auth-type\":\"Application
> & Application User\",\"x-throttling-tier\":\"ipPolicy\"}}},\"info\":{\"
> title\":\"Mobile_stock_API\",\"version\":\"1.0.0\"}}",
> "wsdlUri": null,
> "status": "PUBLISHED",
> "responseCaching": "Disabled",
> "cacheTimeout": 300,
> "destinationStatsEnabled": null,
> "isDefaultVersion": false,
> "type": "HTTP",
> "transport": [
> "https"
> ],
> "tags": [],
> "tiers": [
> "Gold",
> "Unlimited"
> ],
> "maxTps": {
> "production": 500,
> "sandbox": null
> },
> "thumbnailUri": null,
> "visibility": "PUBLIC",
> "visibleRoles": [],
> "accessControl": "NONE",
> "accessControlRoles": [],
> "visibleTenants": [],
> "endpointConfig": "{\n  \"production_endpoints\": {\n\"url\": \"
> http://localhost:9763/sample-data-backend/rservice/stockservice/\",\n
>  \"config\": null,\n\"template_not_supported\": false\n  },\n
>  \"endpoint_type\": \"http\"\n}",
> "endpointSecurity": null,
> "gatewayEnvironments": "Production and Sandbox",
> "sequences": [],
> "subscriptionAvailability": "current_tenant",
> "subscriptionAvailableTenants": [],
> "businessInformation": {
> "technicalOwnerEmail": null,
> "businessOwnerEmail": null,
> "businessOwner": null,
> "technicalOwner": null
> },
> "corsConfiguration": {
> "accessControlAllowOrigins": [],
> "accessControlAllowCredentials": false,
> "corsConfigurationEnabled": false,
> "accessControlAllowHeaders": [],
> "accessControlAllowMethods": []
> },
> "additionalProperties": {}
> }
>
>
> Thanks,
> Kavitha
>
> --
> Kavitha.S
> *Software Engineer -QA*
> email : kavi...@wso2.com
> Mobile : +94 (0) 771538811 <%2B94%20%280%29%20773%20451194>
>
>


-- 
Rajith Roshan
Senior Software Engineer, WSO2 Inc.
Mobile: +94-7 <%2B94-71-554-8430>17-064-214
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] GReg530: Governance REST API: Adding Associations to an Asset

2018-01-12 Thread Rajith Roshan
Hi Saneth,

Can you try this with the Registry Rest API[1]

[1] - https://docs.wso2.com/display/Governance530/Associations+with+REST+API


Thanks!
Rajith

On Fri, Jan 12, 2018 at 3:19 PM, Saneth Dharmakeerthi 
wrote:

> Hi,
>
> Is there a way that I can create an association among 2 assets
> using  Governance REST API?
>
> Thanks and Best Regards,
>
> Saneth Dharmakeerthi
> *Associate Technical Lead*
> WSO2, Inc.
> Mobile: +94772325511 <+94%2077%20232%205511>
>
> <http://wso2.com/signature>
>



-- 
Rajith Roshan
Senior Software Engineer, WSO2 Inc.
Mobile: +94-7 <%2B94-71-554-8430>17-064-214
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [APIM] API or AdminService for Automating API Notification Subscriptions?

2018-01-11 Thread Rajith Roshan
Hi Chaminda,


On Thu, Jan 11, 2018 at 3:09 PM, Chaminda Jayawardena 
wrote:

> Hi,
>
> The Requirement is to automate adding notification subscriptions to and
> API on lifecycle changing.(Please refer[1] for more.).
> This can be done via mgt console but couldn't find any API for this on[2].
> Found this[3] in [4] but its not available in apim2xx.
> Is there any other option that we recommend to get this done without using
> mgt console?
>

Can you try with the Info admin service [1]

[1] - https://localhost:9443/services/InfoAdminService

[1] -

>
> ​[1] https://docs.wso2.com/display/AM2xx/API+Lifecycle+Management
> [2] https://docs.wso2.com/display/AM2xx/Product+APIs
> [3] https://localhost:9443/services/RegistryEventingService
> [4] https://wso2.com/library/articles/eventing-
> notifications-wso2-governance-registry/
> ​
>
> --
> Thanks & Regards
>
> *Chaminda Jayawardena*
> Associate Technical Lead - QA
> WSO2 Inc. - http://wso2.com
> +94-77-7725234 <+94%2077%20772%205234>
>



-- 
Rajith Roshan
Senior Software Engineer, WSO2 Inc.
Mobile: +94-7 <%2B94-71-554-8430>17-064-214
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Exception while start the Keymanager

2017-11-19 Thread Rajith Roshan
is2.deployment.DeploymentException:
> org.wso2.carbon.websocket.transport.WebsocketTransportSender cannot be
> found by axis2_1.6.1.wso2v20
> at org.apache.axis2.deployment.AxisConfigBuilder.processTransportSenders(
> AxisConfigBuilder.java:712)
> at org.apache.axis2.deployment.AxisConfigBuilder.populateConfig(
> AxisConfigBuilder.java:124)
> at org.wso2.carbon.core.CarbonAxisConfigurator.populateAxisConfiguration(
> CarbonAxisConfigurator.java:341)
> at org.wso2.carbon.core.CarbonAxisConfigurator.getAxisConfiguration(
> CarbonAxisConfigurator.java:192)
> ... 41 more
> Caused by: java.lang.ClassNotFoundException: org.wso2.carbon.websocket.
> transport.WebsocketTransportSender cannot be found by axis2_1.6.1.wso2v20
> at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(
> BundleLoader.java:501)
> at org.eclipse.osgi.internal.loader.BundleLoader.findClass(
> BundleLoader.java:421)
> at org.eclipse.osgi.internal.loader.BundleLoader.findClass(
> BundleLoader.java:412)
> at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(
> DefaultClassLoader.java:107)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:264)
> at org.apache.axis2.util.Loader.loadClass(Loader.java:261)
> at org.apache.axis2.deployment.AxisConfigBuilder.processTransportSenders(
> AxisConfigBuilder.java:686)
> ... 44 more
>
> What could be the reason,  did I miss any configuration?
>
> Please anyone advice on this?
>
> Thanks
> Dilusha
>
> --
>
>
> *Best Regards,Dilusha Alphonso*
>
> *Software Engineer - Support Team*
>
>
> *WSO2*
> *Mobile : *
>
> *+94766837098 <+94%2076%20683%207098>[image: http://wso2.com/signature]
> <http://wso2.com/signature>*
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Rajith Roshan
Senior Software Engineer, WSO2 Inc.
Mobile: +94-7 <%2B94-71-554-8430>17-064-214
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [APIM with IS as the KM] throwing org.apache.axis2.AxisFault: Mapping qname not fond for the package: java.util when invoking API

2017-11-14 Thread Rajith Roshan
tionFilterChain.internalDoFi
>> lter(ApplicationFilterChain.java:241)
>> at org.apache.catalina.core.ApplicationFilterChain.doFilter(App
>> licationFilterChain.java:208)
>> at org.apache.catalina.filters.HttpHeaderSecurityFilter.doFilte
>> r(HttpHeaderSecurityFilter.java:120)
>> at org.apache.catalina.core.ApplicationFilterChain.internalDoFi
>> lter(ApplicationFilterChain.java:241)
>> at org.apache.catalina.core.ApplicationFilterChain.doFilter(App
>> licationFilterChain.java:208)
>> at org.wso2.carbon.tomcat.ext.filter.CharacterSetFilter.doFilte
>> r(CharacterSetFilter.java:61)
>> at org.apache.catalina.core.ApplicationFilterChain.internalDoFi
>> lter(ApplicationFilterChain.java:241)
>> at org.apache.catalina.core.ApplicationFilterChain.doFilter(App
>> licationFilterChain.java:208)
>> at org.apache.catalina.filters.HttpHeaderSecurityFilter.doFilte
>> r(HttpHeaderSecurityFilter.java:120)
>> at org.apache.catalina.core.ApplicationFilterChain.internalDoFi
>> lter(ApplicationFilterChain.java:241)
>> at org.apache.catalina.core.ApplicationFilterChain.doFilter(App
>> licationFilterChain.java:208)
>> at org.apache.catalina.core.StandardWrapperValve.invoke(Standar
>> dWrapperValve.java:218)
>> at org.apache.catalina.core.StandardContextValve.invoke(Standar
>> dContextValve.java:122)
>> at org.apache.catalina.authenticator.AuthenticatorBase.invoke(A
>> uthenticatorBase.java:505)
>> at org.apache.catalina.core.StandardHostValve.invoke(StandardHo
>> stValve.java:169)
>> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorRepo
>> rtValve.java:103)
>> at org.wso2.carbon.identity.context.rewrite.valve.TenantContext
>> RewriteValve.invoke(TenantContextRewriteValve.java:72)
>> at org.wso2.carbon.identity.authz.valve.AuthorizationValve.invo
>> ke(AuthorizationValve.java:91)
>> at org.wso2.carbon.identity.auth.valve.AuthenticationValve.invo
>> ke(AuthenticationValve.java:60)
>> at org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInv
>> ocation(CompositeValve.java:99)
>> at org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke
>> (CarbonTomcatValve.java:47)
>> at org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(Tena
>> ntLazyLoaderValve.java:57)
>> at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invok
>> eValves(TomcatValveContainer.java:47)
>> at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(Comp
>> ositeValve.java:62)
>> at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetection
>> Valve.invoke(CarbonStuckThreadDetectionValve.java:159)
>> at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogVa
>> lve.java:958)
>> at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.
>> invoke(CarbonContextCreatorValve.java:57)
>> at org.apache.catalina.core.StandardEngineValve.invoke(Standard
>> EngineValve.java:116)
>> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAd
>> apter.java:452)
>> at org.apache.coyote.http11.AbstractHttp11Processor.process(Abs
>> tractHttp11Processor.java:1087)
>> at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler
>> .process(AbstractProtocol.java:637)
>> at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun
>> (NioEndpoint.java:1756)
>> at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(N
>> ioEndpoint.java:1715)
>> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPool
>> Executor.java:1142)
>> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo
>> lExecutor.java:617)
>> at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.r
>> un(TaskThread.java:61)
>> at java.lang.Thread.run(Thread.java:748)
>> Caused by: org.apache.axis2.AxisFault: Mapping qname not fond for the
>> package: java.util
>> at org.apache.axis2.databinding.utils.BeanUtil.getPropertyQname
>> List(BeanUtil.java:143)
>> ... 68 more
>>
>> Cheers,
>> NuwanS
>> --
>>
>>
>> *Nuwan Silva*
>> *Associate Technical Lead*
>> Mobile: +9477 980 4543 <+94%2077%20980%204543>
>>
>> WSO2 Inc.
>> lean . enterprise . middleware.
>> http://www.wso2.com
>>
>
>
>
> --
> Chamin Dias
> Mobile : 0716097455
> Email : cham...@wso2.com
> LinkedIn : https://www.linkedin.com/in/chamindias
>
>


-- 
Rajith Roshan
Senior Software Engineer, WSO2 Inc.
Mobile: +94-7 <%2B94-71-554-8430>17-064-214
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [IS as Key Manager] Error when generating keys for application

2017-11-09 Thread Rajith Roshan
a:367)
>>>>>>> at org.wso2.carbon.apimgt.impl.workflow.AbstractApplicationRegi
>>>>>>> strationWorkflowExecutor.dogenerateKeysForApplication(Abstra
>>>>>>> ctApplicationRegistrationWorkflowExecutor.java:151)
>>>>>>> at org.wso2.carbon.apimgt.impl.workflow.AbstractApplicationRegi
>>>>>>> strationWorkflowExecutor.generateKeysForApplication(Abstract
>>>>>>> ApplicationRegistrationWorkflowExecutor.java:118)
>>>>>>> at org.wso2.carbon.apimgt.impl.workflow.ApplicationRegistration
>>>>>>> SimpleWorkflowExecutor.complete(ApplicationRegistrationSimpl
>>>>>>> eWorkflowExecutor.java:78)
>>>>>>> at org.wso2.carbon.apimgt.impl.workflow.ApplicationRegistration
>>>>>>> SimpleWorkflowExecutor.execute(ApplicationRegistrationSimple
>>>>>>> WorkflowExecutor.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.jsFunc
>>>>>>> tion_getApplicationKey(APIStoreHostObject.java:385)
>>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>> at sun.reflect.NativeMethodAccessorIm
>>>>>>>
>>>>>>> Any idea on the issue?
>>>>>>>
>>>>>>> [1] error.png
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Dilshani
>>>>>>>
>>>>>>> --
>>>>>>>
>>>>>>> Dilshani Subasinghe
>>>>>>> Software Engineer - QA *|* WSO2
>>>>>>> lean *|* enterprise *|* middleware
>>>>>>>
>>>>>>> Mobile : +94773375185 <+94%2077%20337%205185>
>>>>>>> Blog: dilshani.me
>>>>>>>
>>>>>>> <https://wso2.com/signature>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Harsha Kumara
>>>>>> Software Engineer, WSO2 Inc.
>>>>>> Mobile: +94775505618 <+94%2077%20550%205618>
>>>>>> Blog:harshcreationz.blogspot.com
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>>
>>>>> Dilshani Subasinghe
>>>>> Software Engineer - QA *|* WSO2
>>>>> lean *|* enterprise *|* middleware
>>>>>
>>>>> Mobile : +94773375185 <+94%2077%20337%205185>
>>>>> Blog: dilshani.me
>>>>>
>>>>> <https://wso2.com/signature>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Thanks & Regards,
>>>>
>>>> *Fazlan Nazeem*
>>>> Senior Software Engineer
>>>> WSO2 Inc
>>>> Mobile : +94772338839
>>>> <%2B94%20%280%29%20773%20451194>
>>>> fazl...@wso2.com
>>>>
>>>
>>>
>>>
>>> --
>>>
>>> Dilshani Subasinghe
>>> Software Engineer - QA *|* WSO2
>>> lean *|* enterprise *|* middleware
>>>
>>> Mobile : +94773375185 <+94%2077%20337%205185>
>>> Blog: dilshani.me
>>>
>>> <https://wso2.com/signature>
>>>
>>
>>
>
>
> --
>
> *Sanjeewa Malalgoda*
> WSO2 Inc.
> Mobile : +94713068779 <+94%2071%20306%208779>
>
> <http://sanjeewamalalgoda.blogspot.com/>blog :http://sanjeewamalalgoda.
> blogspot.com/ <http://sanjeewamalalgoda.blogspot.com/>
>
>
>


-- 
Rajith Roshan
Senior Software Engineer, WSO2 Inc.
Mobile: +94-7 <%2B94-71-554-8430>17-064-214
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


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

2017-10-31 Thread Rajith Roshan
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
>>> <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
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [APIM] Testing for Offline Microgateway

2017-10-24 Thread Rajith Roshan
Hi,

In C5 we have used  feign library[1] as a http client. You can refer the
usages in code[2]

[1] - https://github.com/OpenFeign/feign
[2] -
https://github.com/wso2/carbon-apimgt/blob/master/components/apimgt/org.wso2.carbon.apimgt.core/src/main/java/org/wso2/carbon/apimgt/core/auth/DCRMServiceStub.java#L36

On Thu, Oct 19, 2017 at 3:02 PM, Sabeena Kumrawadu  wrote:

> Thank you Farasath.
> But AFAIK SwaggerHub is for creating the API swagger defintion.
> But my task is to write an API client for the integration tests of the
> microgateway.
> I want to know which library would be more suitable. Jersey, Apache HTTP
> clienr or any other?
>
> Regards.
>
> On Thu, Oct 19, 2017 at 11:09 AM, Farasath Ahamed 
> wrote:
>
>> I have used https://editor.swagger.io/ to generate clients. Pretty easy
>> and gives plenty of options when you have the swagger files.
>>
>> Thanks,
>> Farasath
>>
>> Farasath Ahamed
>> Software Engineer, WSO2 Inc.; http://wso2.com
>> Mobile: +94777603866
>> Blog: blog.farazath.com
>> Twitter: @farazath619 <https://twitter.com/farazath619>
>> <http://wso2.com/signature>
>>
>>
>>
>> On Thu, Oct 19, 2017 at 9:20 AM, Sabeena Kumrawadu 
>> wrote:
>>
>>> Hello Farasath,
>>>
>>> Yes.  For the testing purpose only.
>>>
>>> Regards.
>>>
>>> On Wed, Oct 18, 2017 at 7:13 PM, Farasath Ahamed 
>>> wrote:
>>>
>>>>
>>>> Hi Sabeena,
>>>> On Wednesday, October 18, 2017, Sabeena Kumrawadu 
>>>> wrote:
>>>>
>>>>> Hi all,
>>>>>
>>>>> I have to test the Offline Microgateway, which I finished building
>>>>> recently,
>>>>>
>>>>> To introduce about the Offline Microgateway, it can be started
>>>>> independantly, and has no connection with the API Core, where the
>>>>> authentication is done with the API keys.
>>>>>
>>>>> User only has to give the API bal files and the API swagger files of
>>>>> each APIS to start the gateway.
>>>>>
>>>>> Currently it has been suggested to build an API client with the Jersey
>>>>> client. What would be the best way of creting an API client for this task?
>>>>>
>>>>
>>>> By API Client you mean clients for each API we deploy?
>>>>
>>>>>
>>>>> Thanks and Regards.
>>>>>
>>>>> --
>>>>> *Sabeena Kumarawadu* | Software Engineering Intern
>>>>> WSO2 Lanka (Pvt) Ltd.
>>>>> #20, Palm Grove, Colombo 03, Sri Lanka
>>>>> <https://maps.google.com/?q=20,+Palm+Grove,+Colombo+03,+Sri+Lanka&entry=gmail&source=g>
>>>>> Mobile: +94 71 0372856 <+94%2071%20037%202856>
>>>>> Email: sabe...@wso2.com
>>>>> [image: http://wso2.com/signature] <http://wso2.com/signature>
>>>>>
>>>>>
>>>>
>>>> --
>>>> Farasath Ahamed
>>>> Software Engineer, WSO2 Inc.; http://wso2.com
>>>> Mobile: +94777603866
>>>> Blog: blog.farazath.com
>>>> Twitter: @farazath619 <https://twitter.com/farazath619>
>>>> <http://wso2.com/signature>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> *Sabeena Kumarawadu* | Software Engineering Intern
>>> WSO2 Lanka (Pvt) Ltd.
>>> #20, Palm Grove, Colombo 03, Sri Lanka
>>> <https://maps.google.com/?q=20,+Palm+Grove,+Colombo+03,+Sri+Lanka&entry=gmail&source=g>
>>> Mobile: +94 71 0372856 <+94%2071%20037%202856>
>>> Email: sabe...@wso2.com
>>> [image: http://wso2.com/signature] <http://wso2.com/signature>
>>>
>>>
>>
>
>
> --
> *Sabeena Kumarawadu* | Software Engineering Intern
> WSO2 Lanka (Pvt) Ltd.
> #20, Palm Grove, Colombo 03, Sri Lanka
> Mobile: +94 71 0372856 <+94%2071%20037%202856>
> Email: sabe...@wso2.com
> [image: http://wso2.com/signature] <http://wso2.com/signature>
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Rajith Roshan
Senior Software Engineer, WSO2 Inc.
Mobile: +94-7 <%2B94-71-554-8430>17-064-214
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] What is the best way to unit test methods with new instances created inside the method?

2017-10-10 Thread Rajith Roshan
Hi,
What if you write a wrapper class with following constructor.

public RESTAPIAdminClientWrapper extends RESTAPIAdminClient{

public RESTAPIAdminClientWrapper(RestApiAdminStub restApiAdminStub) {
 this.restApiAdminStub = restApiAdminStub;
}

}

Then in the test method you can mock the RestApiAdminStub class and pass it
to the constructor.
RestApiAdminStub restApiAdminStub = Mockito.mock(RestApiAdminStub).class;

RESTAPIAdminClient restAPIAdminClient = new RESTAPIAdminClientWrapper(r
estApiAdminStub);

Thanks!
Rajith

On Tue, Oct 10, 2017 at 10:07 AM, Ishara Cooray  wrote:

> Thanks for the reply Fazlan.
>
> One option is to move the new object creation into a protected method and
> override the implementation in a subclass. The con is this will add
> additional lines to the class being tested and therefore will have to be
> decided whether the effort is useful case by case.
>
> We can use overriding option if the method is being used in multiple
> places. But if it has only one usage it is not wise to got for that option
> as it will increase the line count and will have a negative impact in
> coverage reports.
>
>
> Thanks & Regards,
> Ishara Cooray
> Senior Software Engineer
> Mobile : +9477 262 9512 <+94%2077%20262%209512>
> WSO2, Inc. | http://wso2.com/
> Lean . Enterprise . Middleware
>
> On Tue, Oct 10, 2017 at 9:57 AM, Fazlan Nazeem  wrote:
>
>> Hi Ishara,
>>
>> Please check[1] which discusses this issue in Jacoco.
>>
>> One option is to move the new object creation into a protected method and
>> override the implementation in a subclass. The con is this will add
>> additional lines to the class being tested and therefore will have to be
>> decided whether the effort is useful case by case.
>>
>> But if the method being tested is static then there is no way to override
>> and hence no way to unit test this without a refactoring effort as I am
>> aware of.
>>
>> We have mixed object creation with business logic in the code you have
>> provided. This leads to untestable code.
>>
>> [1] https://github.com/jacoco/jacoco/issues/51
>>
>> On Tue, Oct 10, 2017 at 9:31 AM, Ishara Cooray  wrote:
>>
>>> Hi,
>>>
>>> Let's say in a legacy code we have new instance created inside the
>>> constructor and it is being used inside methods to be unit tested as below.
>>>
>>> public boolean updateApi(String apiConfig, String tenantDomain) throws 
>>> AxisFault {
>>>> try {
>>>> return restApiAdminStub.updateApiForTenant(qualifiedName, 
>>>> apiConfig, tenantDomain);
>>>> } catch (Exception e) {
>>>> throw new AxisFault("Error while updating API in the gateway. " + 
>>>> e.getMessage(), e);
>>>> }
>>>> }
>>>>
>>>>
>>> Where restApiAdminStub is created within the constructor as below.
>>>
>>>> public RESTAPIAdminClient(String apiProviderName, String apiName, String 
>>>> version) throws AxisFault {
>>>>> this.qualifiedName = apiProviderName + "--" + apiName + ":v" + 
>>>>> version;
>>>>> this.qualifiedDefaultApiName = apiProviderName + "--" + apiName;
>>>>> restApiAdminStub = new RestApiAdminStub(null, backendURLl + 
>>>>> "RestApiAdmin");
>>>>>
>>>>> }
>>>>>
>>>>>
>>> One option to mock the new instance is, use PowerMockito.whenNew()
>>> But if we use that, we need to annotate the class that is creating the
>>> new instance with @PrepareForTest annotation and that leads to remove the
>>> @PrepareForTest annotation that we use to annotate Test class. Because of
>>> that this test class is getting excluded from jacoco report.
>>>
>>> Do we have any other solution for this?
>>>
>>> Thanks & Regards,
>>> Ishara Cooray
>>> Senior Software Engineer
>>> Mobile : +9477 262 9512 <+94%2077%20262%209512>
>>> WSO2, Inc. | http://wso2.com/
>>> Lean . Enterprise . Middleware
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Thanks & Regards,
>>
>> *Fazlan Nazeem*
>> Senior Software Engineer
>> WSO2 Inc
>> Mobile : +94772338839
>> <%2B94%20%280%29%20773%20451194>
>> fazl...@wso2.com
>>
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Rajith Roshan
Senior Software Engineer, WSO2 Inc.
Mobile: +94-7 <%2B94-71-554-8430>17-064-214
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DSS -3.5.0] - Send JSON batch request

2017-07-13 Thread Rajith Roshan
Hi Amaya,

Thanks for the help.
It was resolved after adding the "_batch_req" at the end of resource as
suggested.

Thanks!
Rajith

On Thu, Jul 13, 2017 at 7:07 PM, Manuri Amaya Perera 
wrote:

> Hi Rajith,
>
> Please try the format [1] adding "_batch_req" at the end of the resource
> you are trying with.
>
> [1] {
>"_post_supercededorder_batch_req":{
>   "_post_supercededorder":[
>  {
> "parentOrder":"gla/2002/486",
> "childOrder":"GLA/2017/449"
>  },
>  {
> "parentOrder":"GLA/2017/449",
> "childOrder":""
>  }
>   ]
>}
> }
>
> Thanks,
> Manuri
>
> On Thu, Jul 13, 2017 at 10:07 PM, Rajith Roshan  wrote:
>
>> Hi Devs,
>>
>> I have a json payload [1], which is working fine when sent to a
>> particular resource in DSS.
>> But when I enable batch requests in the DSS service and sends the
>> request[2] it fails with the error [4]. I tried sending the data in
>> format[3] as well. But it also fails with the same error.
>> Any help would be highly appreciated?
>>
>> [1] - {
>>"_post_supercededorder":{
>>   "parentOrder":"gla/2002/486",
>>   "childOrder":"GLA/2017/449"
>>}
>> }
>>
>> [2] -{
>>"_post_supercededorder_batch_req":{
>>   "_post_supercededorder":[
>>  {
>> "parentOrder":"gla/2002/486",
>> "childOrder":"GLA/2017/449"
>>  },
>>  {
>> "parentOrder":"GLA/2017/449",
>> "childOrder":""
>>  }
>>   ]
>>}
>> }
>>
>> [3] - {
>>"_post_supercededorder_batch_req":[
>>   {
>>  "_post_supercededorder":{
>> "parentOrder":"gla/2002/479",
>> "childOrder":"GLA/2017/450"
>>  }
>>   },
>>   {
>>  "_post_supercededorder":{
>> "parentOrder":"gla/2002/509",
>> "childOrder":"GLA/2017/450"
>>  }
>>   },
>>   {
>>  "_post_supercededorder":{
>> "parentOrder":"GLA/2017/450",
>> "childOrder":""
>>  }
>>   }
>>]
>> }
>>
>> [4] - Servlet.service() for servlet [bridgeservlet] in context with path
>> [/] threw exception
>> java.lang.NullPointerException
>> at org.apache.axis2.json.gson.GsonXMLStreamReader.validateArgum
>> entTypes(GsonXMLStreamReader.java:783)
>> at org.apache.axis2.json.gson.GsonXMLStreamReader.nextValue(Gso
>> nXMLStreamReader.java:734)
>> at org.apache.axis2.json.gson.GsonXMLStreamReader.readValue(Gso
>> nXMLStreamReader.java:626)
>> at org.apache.axis2.json.gson.GsonXMLStreamReader.stateTransiti
>> on(GsonXMLStreamReader.java:532)
>> at org.apache.axis2.json.gson.GsonXMLStreamReader.next(GsonXMLS
>> treamReader.java:178)
>> at org.apache.axiom.om.impl.builder.StAXOMBuilder.parserNext(
>> StAXOMBuilder.java:681)
>> at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBu
>> ilder.java:214)
>> at org.apache.axiom.om.impl.llom.OMSerializableImpl.build(OMSer
>> ializableImpl.java:78)
>> at org.apache.axiom.om.impl.llom.OMElementImpl.build(OMElementI
>> mpl.java:722)
>> at org.apache.axiom.om.impl.llom.OMElementImpl.detach(OMElement
>> Impl.java:700)
>> at org.apache.axiom.om.impl.llom.OMNodeImpl.setParent(OMNodeImp
>> l.java:105)
>> at org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMEleme
>> ntImpl.java:296)
>> at org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMEleme
>> ntImpl.java:212)
>> at org.apache.axiom.soap.impl.llom.SOAPBodyImpl.addChild(SOAPBo
>> dyImpl.java:231)
>> at org.apache.axis2.json.gson.JSONMessageHandler.invoke(JSONMes
>> sageHandler.java:84)
>> at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
>> at org.apache.axis2.engine.Phase.invoke(Phase.java:313)
>> at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:261)
>> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:167)
>> at org.apache.axis2.transport.http.util.RESTUtil.invokeAxisEngi
>> ne(RESTUtil.ja

[Dev] [DSS -3.5.0] - Send JSON batch request

2017-07-13 Thread Rajith Roshan
ntionFilter.java:59)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at
org.wso2.carbon.tomcat.ext.filter.CharacterSetFilter.doFilter(CharacterSetFilter.java:61)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at
org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:99)
at
org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47)
at
org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:57)
at
org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)
at
org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:62)
at
org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:159)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at
org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:57)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1739)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1698)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)

Thanks!
Rajith

-- 
Rajith Roshan
Software Engineer, WSO2 Inc.
Mobile: +94-7 <%2B94-71-554-8430>17-064-214
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Weird exception accessing to a API Manager protected resource

2017-06-18 Thread Rajith Roshan
Hi Thomas,

When you calling the token endpoint using saml response, could you please
add the scope=default parameter as well in the request. For ex :[1].
Let us know it if works. (Just want to verify , because scope is an
optional parameter. )

[1] - curl -X POST -u
"QlthIzYUOK5DS0BXW8Cy8uFJjKAa:XFfgPmTbMaQ5eScc0rSnAW9ZIgwa" -H
"Content-Type: application/x-www-form-urlencoded;charset=UTF-8" -d "
*scope=deafult*&grant_type=urn:ietf:params:oauth:grant-type:saml2-bearer&assertion=nrkelgerte..ufw"
https://{host}:{port}/oauth2/token

Thanks!
Rajith

On Fri, Jun 16, 2017 at 1:46 PM, Thomas LEGRAND <
thomas.legr...@versusmind.eu> wrote:

> Hello,
>
> Thank you for your answers.
>
> I activated the DEBUG mode on the IS in the class org.wso2.carbon.apimgt.
> keymgt.service.APIKeyValidationService and I can see that the IS receives
> something because when I send a wrong OAuth token, its says
>
> [2017-06-16 12:10:00,563] ERROR 
> {org.wso2.carbon.apimgt.impl.AMDefaultKeyManagerImpl}
> -  Invalid OAuth Token : Invalid accessken
>
> And when I send a right one:
>
> [2017-06-16 14:19:52,028] DEBUG 
> {org.wso2.carbon.apimgt.keymgt.service.APIKeyValidationService}
> -  OAuth token response from Manager to gateway:  , appName=myApp ,
> userName=myUser@carbon.super , transactionId= , 
> consumerKey=5bWQioSHWbt9I24xizeP0o20a
> , isAuthorized=true , responseTime=Fri Jun 16 14:19:52 CEST 2017
> [2017-06-16 14:19:52,028] DEBUG 
> {org.wso2.carbon.apimgt.keymgt.service.APIKeyValidationService}
> -  APIKeyValidationInfoDTO bee returning : APIKeyValidationInfoDTO = {
> authorized:true , subscriber:admin , tier:Unlimited , type:PRODUCTION ,
> userType:APPLICATION_USER , endUserToken:null , 
> endUserName:myUser@carbon.super
> , applicationId:3 , applicationName:myApp  , applicationr:Unlimited ,
> validationStatus:0 , validityPeriod:2009000 , issuedTime:1497615592019 ,
> apiName:MyAPI , consumerKey:5bWQioSH9I24xizeP0oxTw20a ,
> spikeArrestLimit:0 , spikeArrestUnit:null , 
> subscriberTenantDomain:carbon.super
> , stopOnQuotaReach:true ,iPublisher:admin]]
>
> We can see the authorized: true (if that means something) so it is like
> the API manager don't know how to interpret this message and take a
> shortcut to conclusion because of an Axis error. So from here, I don't know
> what to do :(
>
> Regards,
>
> Thomas
>
>
>
> 2017-06-16 13:13 GMT+02:00 Farasath Ahamed :
>
>>
>>
>>
>>
>> On Fri, Jun 16, 2017 at 4:37 PM, Rajith Roshan  wrote:
>>
>>> Hi Thomas,
>>>
>>> You need to subscribe to that particular api from the application you
>>> have generated access token. if there is no valid subscription then this
>>> error can happen.
>>> And also if you have assigned specif scopes to api resource , then the
>>> access token should also have that scopes when it was generated.
>>> This resource forbidden issue can occur due to above mentioned errors.
>>>
>>
>> In those cases shouldn't the error codes be different according to [1].
>>
>>
>> http://wso2.org/apimanager/security";>
>>   900900
>>   Unclassified Authentication Failure
>>   Resource forbidden
>> 
>>
>> Error code 900900. according [1] says that,
>> Backend service for key validation is not accessible when trying to
>> invoke an API
>>
>>
>>
>>
>> [1] https://docs.wso2.com/display/AM210/Error+Handling
>>
>>
>>>
>>> Thanks!
>>> Rajith
>>>
>>> On Fri, Jun 16, 2017 at 12:32 PM, Thomas LEGRAND <
>>> thomas.legr...@versusmind.eu> wrote:
>>>
>>>> Hello !
>>>>
>>>> Sure. Here is my api-manager.xml AM configuration file:
>>>>
>>>> 
>>>> 
>>>> jdbc/WSO2AM_DB
>>>>
>>>> 
>>>> 
>>>> None
>>>>
>>>> 
>>>> false
>>>>
>>>> 
>>>> 
>>>> 
>>>> 
>>>> https://localhost:9448/services/
>>>> 
>>>> ${admin.username}
>>>> 
>>>> ${admin.password}
>>>> 
>>>> false
>>>> 
>>>>
>>>> 
>>>> 
>>>> 
>>>>
>>>> 
>>>> X-JWT-Assertion
>>>>
>>>> 
>>>> 
>>>>
>>>> 
&

Re: [Dev] Weird exception accessing to a API Manager protected resource

2017-06-16 Thread Rajith Roshan
Thu, Jun 15, 2017 at 8:40 PM, Thomas LEGRAND <
>> thomas.legr...@versusmind.eu> wrote:
>>
>>> Hello again,
>>>
>>> I followed the tutorial in [1] to configure my Identity Server (IS) as a
>>> key manager for my API Manager (AM). When I create my Production & Sandbox
>>> applications in the AM, I can see service providers created in the IS. I
>>> configures them to use SAML to retrieve informations like the roles, if the
>>> authentication is successfull. And I can "exchange" my SAML assertion for a
>>> OAuth token. So, everything is cool, here.
>>>
>>> But, when I try to reuse this OAuth token to access to a resource via
>>> the AM, it rejects me with this sweet message:
>>>
>>> http://wso2.org/apimanager/security";>
>>>   900900
>>>   Unclassified Authentication Failure
>>>   Resource forbidden
>>> 
>>>
>>> But no errors in the logs but just a WARN. So, I activated the DEBUG
>>> mode and then, I can see some intersting things:
>>>
>>> [2017-06-15 16:44:52,954]  WARN - APIAuthenticationHandler API
>>> authentication failure due to Unclassified Authentication Failure
>>> [2017-06-15 16:44:52,954] DEBUG - APIAuthenticationHandler API
>>> authentication failed with error 900900
>>> org.wso2.carbon.apimgt.gateway.handlers.security.APISecurityException:
>>> Resource forbidden
>>> at org.wso2.carbon.apimgt.gateway.handlers.security.keys.WSAPIK
>>> eyDataStore.getAPIKeyData(WSAPIKeyDataStore.java:51)
>>> at org.wso2.carbon.apimgt.gateway.handlers.security.APIKeyValid
>>> ator.doGetKeyValidationInfo(APIKeyValidator.java:253)
>>> at org.wso2.carbon.apimgt.gateway.handlers.security.APIKeyValid
>>> ator.getKeyValidationInfo(APIKeyValidator.java:209)
>>> at org.wso2.carbon.apimgt.gateway.handlers.security.oauth.OAuth
>>> Authenticator.authenticate(OAuthAuthenticator.java:196)
>>> at org.wso2.carbon.apimgt.gateway.handlers.security.APIAuthenti
>>> cationHandler.handleRequest(APIAuthenticationHandler.java:117)
>>> at org.apache.synapse.rest.API.process(API.java:325)
>>> at org.apache.synapse.rest.RESTRequestHandler.dispatchToAPI(RES
>>> TRequestHandler.java:90)
>>> at org.apache.synapse.rest.RESTRequestHandler.process(RESTReque
>>> stHandler.java:69)
>>>     at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.inject
>>> Message(Axis2SynapseEnvironment.java:304)
>>> at org.apache.synapse.core.axis2.SynapseMessageReceiver.receive
>>> (SynapseMessageReceiver.java:78)
>>> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:1
>>> 80)
>>> at org.apache.synapse.transport.passthru.ServerWorker.processNo
>>> nEntityEnclosingRESTHandler(ServerWorker.java:325)
>>> at org.apache.synapse.transport.passthru.ServerWorker.run(Serve
>>> rWorker.java:158)
>>> 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)
>>> Caused by: 
>>> org.wso2.carbon.apimgt.gateway.handlers.security.APISecurityException:
>>> Error while accessing backend services for API key validation
>>> at org.wso2.carbon.apimgt.gateway.handlers.security.keys.APIKey
>>> ValidatorClient.getAPIKeyData(APIKeyValidatorClient.java:114)
>>> at org.wso2.carbon.apimgt.gateway.handlers.security.keys.WSAPIK
>>> eyDataStore.getAPIKeyData(WSAPIKeyDataStore.java:48)
>>> ... 16 more
>>> Caused by: org.apache.axis2.AxisFault: org.apache.axis2.AxisFault:
>>> Mapping qname not fond for the package: java.util
>>>
>>> From here, I don't know what to do since I tried some fancy URLs for the
>>> ServerURL value in the elements AuthManager and APIKeyValidator.
>>> My IS has an offset of 5 so the port is 9448. Here is the URL I used to
>>> point to the IS server: https://localhost:9448/services/
>>>
>>> Is there a way to know in which URL the IS deploy its Key Manager
>>> feature web services (WS)?
>>> Should I reinstall the Key Manager feature in the IS?
>>>
>>> Regards,
>>>
>>> Thomas
>>>
>>> [1] https://docs.wso2.com/display/AM210/Configuring+WSO2+Ide
>>> ntity+Server+as+a+Key+Manager
>>>
>>> ___
>>> 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
>
>


-- 
Rajith Roshan
Software Engineer, WSO2 Inc.
Mobile: +94-7 <%2B94-71-554-8430>17-064-214
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Identity Server/API Manager and hidden service provider

2017-06-15 Thread Rajith Roshan
Hi Thomas,

Can you also check the value[1] in identity.xml(repository/conf/identity)
of Identity server. It should be as "jdbc/WSO2AM_DB"



jdbc/WSO2AM_DB


On Thu, Jun 15, 2017 at 2:04 PM, Thomas LEGRAND <
thomas.legr...@versusmind.eu> wrote:

> Hello Rajith,
>
> Thank you for your answer, too :)
>
> I re-checked my datasources and I have the same URL in both sides (IS and
> AM) for the WSO2AM_DB, WSO2REG_DB and WSO2UM_DB. So, maybe I did something
> wrong in another configuration file? Here are my master-datasources.xml for
> both side, if you want to take a look. I am using H2 in remote mode:
>
> IS datasources:
>
> 
> WSO2_CARBON_DB
> The datasource used for registry and user
> manager
> 
> jdbc/WSO2CarbonDB
> 
> 
> 
> jdbc:h2:tcp://localhost/
> D:/ProjetESB/wso2is-5.3.0/repository/database/WSO2CARBON_DB;DB_CLOSE_ON_
> EXIT=FALSE
> wso2carbon
> wso2carbon
> org.h2.Driver
> 50
> 6
> true
> SELECT 1
> 3
> 
> 
> 
>
> 
> WSO2AM_DB
> The datasource used for API Manager
> database
> 
> jdbc/WSO2AM_DB
> 
> 
> 
> jdbc:h2:tcp://localhost/D:/ProjetESB/is_am_db/WSO2AM_
> DB;DB_CLOSE_ON_EXIT=FALSE
> apiuser
> apimanager
> org.h2.Driver
> 50
> 6
> true
> SELECT 1
> 3
> 
> 
> 
>
> 
> WSO2REG_DB
> The datasource used for registry
> 
> jdbc/WSO2REG_DB
> 
> 
> 
> jdbc:h2:tcp://localhost/D:/ProjetESB/is_am_db/WSO2REG_
> DB;DB_CLOSE_ON_EXIT=FALSE
> apiuser
> apimanager
> org.h2.Driver
> 50
> 6
> true
> SELECT 1
> 3
> 
> 
> 
>
> AM datasources:
>
> 
> WSO2AM_DB
> The datasource used for API Manager
> database
> 
> jdbc/WSO2AM_DB
> 
> 
> 
> 
> jdbc:h2:tcp://localhost/D:/ProjetESB/is_am_db/WSO2AM_
> DB;DB_CLOSE_ON_EXIT=FALSE
> apiuser
> apimanager
> org.h2.Driver
> 50
> 6
> true
> SELECT 1
> 3
> 
> 
> 
> 
> WSO2REG_DB
> The datasource used for registry
> 
> jdbc/WSO2REG_DB
> 
> 
> 
> jdbc:h2:tcp://localhost/D:/ProjetESB/is_am_db/WSO2REG_
> DB;DB_CLOSE_ON_EXIT=FALSE
> apiuser
> apimanager
> org.h2.Driver
> 50
> 6
> true
> SELECT 1
> 3
> 
> 
> 
> 
> WSO2UM_DB
> The datasource used for user
> management
> 
> jdbc/WSO2UM_DB
> 
> 
> 
> jdbc:h2:tcp://localhost/D:/ProjetESB/is_am_db/WSO2UM_
> DB;DB_CLOSE_ON_EXIT=FALSE
> apiuser
> apimanager
> org.h2.Driver
> 50
>     6
> true
> SELECT 1
> 3
> 
> 
> 
>
>
> And maybe that will fix some problem I have in the store in API manager
> concerning the error message (Error! You have partially created keys.
> Please click the Clean Up button and try again). But that is another
> problem :)
>
> Regards,
>
> Thomas
>
> 2017-06-15 7:12 GMT+02:00 Rajith Roshan :
>
>> Hi Thomas,
>>
>> Instead of configuring IS as key manager , you

Re: [Dev] Identity Server/API Manager and hidden service provider

2017-06-14 Thread Rajith Roshan
Hi Thomas,

Instead of configuring IS as key manager , you can use the pre packed IS
5.3.0[1]. Using this pre packed IS is lot easier.

[1] - https://docs.wso2.com/display/AM210/Configuring+the+
Pre-Packaged+Identity+Server+with+API+Manager

On Wed, Jun 14, 2017 at 6:12 PM, Thomas LEGRAND <
thomas.legr...@versusmind.eu> wrote:

> Hello everybody,
>
> I have a little problem. I used the Identity Server (IS) in standalone
> where I configured a service provider and a AD user store. Everything
> worked perfectly.
>
> Then, I followed the procedure written in the document in [1] to make the
> API manager use the OAuth token generated by the IS. But, many wild
> problems appear:
>
> - First, when I connect to the IS, I can see my user store but I can't see
> my service provider anymore. Where can I find it?
> - Then, I try to recreate my service provider with the same name and I
> have a popup which appears saying:" Error while creating application role:
> Application/ with user admin"
> - At last, I try to recreate a service provider with another name and I
> can configre the SAML thing. So I type the same issuer name and continue
> the configuration until I click on the update button. And BOOM. Another
> popup appears telling me that "Could not add Service Provider. You might be
> entering a duplicate Service Provider". I assume that it is linked to the
> second point, here :(
>
> I noticed in the default database located in D:\ProjetESB\wso2is-5.3.0\repo
> sitory\database\WSO2CARBON_DB.h2.db there is a table SP_APP which
> contained the declaration of my provider. But I don't know where to find
> its configuration.
>

When you share the database between APIM and IS then data is not stored in
the h2 database. It's stored in the AM_DB (for ex : jdbc/WSO2AM_DB which is
mentioned in the doc[2])

>
> Can you help me, please?
>
> [1] https://docs.wso2.com/display/AM210/Configuring+WSO2+Identit
> y+Server+as+a+Key+Manager
>
[2] -
https://docs.wso2.com/display/AM210/Configuring+WSO2+Identity+Server+as+a+Key+Manager


>
>
> _______
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
> Thanks!
Rajith


-- 
Rajith Roshan
Software Engineer, WSO2 Inc.
Mobile: +94-7 <%2B94-71-554-8430>17-064-214
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Extending API manager

2017-06-01 Thread Rajith Roshan
Hi Gihan,

If your requirement is to change the UI of the store, I would recommend to
use sub themes. Please refer following documentation[1],[2] in order to
apply sub themes.

[1] - https://docs.wso2.com/display/AM200/Adding+a+New+API+Store+Theme
<https://support.wso2.com/jira/browse/GSAPRODSUPPROD>
[2] -
http://sanjeewamalalgoda.blogspot.com/2015/01/how-to-add-sub-theme-to-api-manager.html

Thanks!
Rajith


On Wed, May 31, 2017 at 10:41 PM, Gihan Nimath 
wrote:

> Dear all,
>
> I am working on customizing api-manager storefront. Rather than the
> customizing the code in my fork, I am thinking about writing the
> customization part in a separate project. Then I will be able to have a
> maven build that will apply those changes on to the zip file generated as
> the release of api manager.
>
> Is there any specific approaches that you follow in such a requirement?
> Any advice will help me.
>
> Thanking you,
> Gihan
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Rajith Roshan
Software Engineer, WSO2 Inc.
Mobile: +94-7 <%2B94-71-554-8430>17-064-214
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] IS 5.2.0 DB2 migration scripts

2017-05-08 Thread Rajith Roshan
Hi,

Yeah I think we can agree with maduranga. AFAIK this only happens with db2.
Because its default delimiter is ;. Other dbscripts get executed when we
run them against the database. Its better to update the docs in order to
provide guidance saying that delimiter we have used in our db scripts are
"/"  so we can give options to specify delimiter when running db script as
in [1]

[1] - db2 -td/ -vf db2.sql

On Tue, May 9, 2017 at 11:01 AM, Maduranga Siriwardena 
wrote:

> Hi Abimaran,
>
> Usually if we start the pack with -Dsetup option product database scripts
> are run through [1] to create databases which specifically checks for "/"
> to identify a single query for DB2. So product database scripts has "/" as
> the statement terminator. Anyway this terminator will not be there in the
> query when executing the query.
>
> We also have created a similar class to execute the database scripts in
> migration and used the similar approach with "/". In my opinion if we are
> going to change this, we need to do this everywhere in the product.
>
> [1] https://github.com/wso2/carbon-kernel/blob/v4.4.16/
> core/org.wso2.carbon.utils/src/main/java/org/wso2/carbon/utils/dbcreator/
> DatabaseCreator.java#L291
>
> Thanks,
>
> On Tue, May 9, 2017 at 10:12 AM, Abimaran Kugathasan 
> wrote:
>
>> Hi Ishara,
>>
>> Any reason for having / as the statement terminator in DB2 script? The
>> default DB2 statement terminator is ;
>>
>> API Manager had the same issue and we fixed it.
>>
>> [1] : https://www.ibm.com/support/knowledgecenter/SS62YD_2.2.1/c
>> om.ibm.datatools.sqlxeditor.doc/topics/tchngstmtterm.html
>> [2] : https://dba.stackexchange.com/questions/122652/what-is-the
>> -formal-statement-terminator-with-db2-sql
>>
>>
>> On Sat, May 6, 2017 at 11:16 AM, Ishara Karunarathna 
>> wrote:
>>
>>> Thanks Rajith for finding out this.
>>>
>>> @Dinali Can you please update the scripts.
>>>
>>> -Ishara
>>>
>>> On Fri, May 5, 2017 at 11:52 PM, Rajith Roshan  wrote:
>>>
>>>> The migration resources for db2 specified in step 11 of doc [1] is
>>>> giving errors. It tries to insert boolean values to columns which have type
>>>> smallint. They should be replaced with 0s and 1s. Please find the modified
>>>> script below [2]
>>>>
>>>> [1] - https://docs.wso2.com/display/IS520/Upgrading+from+a+Previ
>>>> ous+Release
>>>>
>>>> [2] -
>>>> INSERT INTO UM_CLAIM (
>>>> UM_DIALECT_ID,
>>>> UM_CLAIM_URI,
>>>> UM_DISPLAY_TAG,
>>>> UM_DESCRIPTION,
>>>> UM_MAPPED_ATTRIBUTE,
>>>> UM_TENANT_ID,
>>>> UM_READ_ONLY,
>>>>UM_SUPPORTED,
>>>>UM_REQUIRED,
>>>>UM_DISPLAY_ORDER,
>>>>UM_CHECKED_ATTRIBUTE)
>>>> VALUES ((SELECT UM_ID FROM UM_DIALECT WHERE UM_DIALECT_URI='
>>>> http://wso2.org/claims' AND UM_TENANT_ID=-1234),
>>>> 'http://wso2.org/claims/identity/lastLoginTime','Last Login
>>>> Time','Last Login Time','carLicense',-1234,1,0,0,7,0)/
>>>>
>>>>
>>>> INSERT INTO UM_CLAIM (
>>>>UM_DIALECT_ID,
>>>>UM_CLAIM_URI,
>>>>UM_DISPLAY_TAG,
>>>>UM_DESCRIPTION,
>>>>UM_MAPPED_ATTRIBUTE,
>>>>UM_TENANT_ID,
>>>>UM_READ_ONLY)
>>>>
>>>> SELECT DIALECT.UM_ID,
>>>>   'http://wso2.org/claims/identity/lastLoginTime',
>>>>'Last Login Time',
>>>>'Last Login Time',
>>>>'carLicense',
>>>>   DIALECT.UM_TENANT_ID,
>>>>1
>>>>FROM UM_DIALECT as DIALECT JOIN UM_TENANT as TENANT ON
>>>> DIALECT.UM_TENANT_ID=TENANT.UM_ID WHERE DIALECT.UM_DIALECT_URI='http:/
>>>> /wso2.org/claims'/
>>>>
>>>>
>>>> INSERT INTO UM_CLAIM (
>>>> UM_DIALECT_ID,
>>>> UM_CLAIM_URI,
>>>> UM_DISPLAY_TAG,
>>>> UM_DESCRIPTION,
>>>> UM_MAPPED_ATTRIBUTE,
>>>> UM_TENANT_ID,
>>>> UM_READ_ONLY,
>>>>UM_SUPPORTED,
>>>>UM_REQUIRED,
>>&g

[Dev] IS 5.2.0 DB2 migration scripts

2017-05-05 Thread Rajith Roshan
The migration resources for db2 specified in step 11 of doc [1] is giving
errors. It tries to insert boolean values to columns which have type
smallint. They should be replaced with 0s and 1s. Please find the modified
script below [2]

[1] - https://docs.wso2.com/display/IS520/Upgrading+from+a+Previous+Release

[2] -
INSERT INTO UM_CLAIM (
UM_DIALECT_ID,
UM_CLAIM_URI,
UM_DISPLAY_TAG,
UM_DESCRIPTION,
UM_MAPPED_ATTRIBUTE,
UM_TENANT_ID,
UM_READ_ONLY,
   UM_SUPPORTED,
   UM_REQUIRED,
   UM_DISPLAY_ORDER,
   UM_CHECKED_ATTRIBUTE)
VALUES ((SELECT UM_ID FROM UM_DIALECT WHERE UM_DIALECT_URI='
http://wso2.org/claims' AND UM_TENANT_ID=-1234),
'http://wso2.org/claims/identity/lastLoginTime','Last Login Time','Last
Login Time','carLicense',-1234,1,0,0,7,0)/


INSERT INTO UM_CLAIM (
   UM_DIALECT_ID,
   UM_CLAIM_URI,
   UM_DISPLAY_TAG,
   UM_DESCRIPTION,
   UM_MAPPED_ATTRIBUTE,
   UM_TENANT_ID,
   UM_READ_ONLY)

SELECT DIALECT.UM_ID,
  'http://wso2.org/claims/identity/lastLoginTime',
   'Last Login Time',
   'Last Login Time',
   'carLicense',
  DIALECT.UM_TENANT_ID,
   1
   FROM UM_DIALECT as DIALECT JOIN UM_TENANT as TENANT ON
DIALECT.UM_TENANT_ID=TENANT.UM_ID WHERE DIALECT.UM_DIALECT_URI='
http://wso2.org/claims'/


INSERT INTO UM_CLAIM (
UM_DIALECT_ID,
UM_CLAIM_URI,
UM_DISPLAY_TAG,
UM_DESCRIPTION,
UM_MAPPED_ATTRIBUTE,
UM_TENANT_ID,
UM_READ_ONLY,
   UM_SUPPORTED,
   UM_REQUIRED,
   UM_DISPLAY_ORDER,
   UM_CHECKED_ATTRIBUTE)
VALUES ((SELECT UM_ID FROM UM_DIALECT WHERE UM_DIALECT_URI='
http://wso2.org/claims' AND UM_TENANT_ID=-1234),
'http://wso2.org/claims/identity/lastPasswordUpdateTime','Last Password
Update','Last Password Update','businessCategory',-1234,1,0,0,7,0)/


INSERT INTO UM_CLAIM (
   UM_DIALECT_ID,
   UM_CLAIM_URI,
   UM_DISPLAY_TAG,
   UM_DESCRIPTION,
   UM_MAPPED_ATTRIBUTE,
   UM_TENANT_ID,
   UM_READ_ONLY)

SELECT DIALECT.UM_ID,
'http://wso2.org/claims/identity/lastPasswordUpdateTime',
'Last Password Update',
'Last Password Update',
'businessCategory',
DIALECT.UM_TENANT_ID,
1
FROM UM_DIALECT as DIALECT JOIN UM_TENANT as TENANT ON
DIALECT.UM_TENANT_ID=TENANT.UM_ID WHERE DIALECT.UM_DIALECT_URI='
http://wso2.org/claims'/


CREATE INDEX REG_LOG_IND_BY_P1
ON REG_LOG(REG_LOGGED_TIME, REG_TENANT_ID)/

CREATE INDEX REG_RESOURCE_IND_3
ON REG_RESOURCE(REG_UUID)/

CREATE INDEX REG_RESOURCE_IND_4
ON REG_RESOURCE(REG_TENANT_ID, REG_UUID)/

CREATE INDEX REG_RESOURCE_IND_5
ON REG_RESOURCE(REG_TENANT_ID, REG_MEDIA_TYPE)/
-- 
Rajith Roshan
Software Engineer, WSO2 Inc.
Mobile: +94-72-642-8350 <%2B94-71-554-8430>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Dynamically redraw grid-stack content through UUFClient

2017-04-24 Thread Rajith Roshan
Hi,

I once had a offline discussion with SajithAR regarding zoneMaps not
initializing. He said zone maps are initialized once  because its a heavy
operation. He asked me to use renderFragment method without passing the
defzone attribute. I am not sure whether this will be a valid for your use
case.

Thanks !
Rajith

On Mon, Apr 24, 2017 at 11:45 AM, Udara Rathnayake  wrote:

> I tried populateZonesMap(); before calling renderFragmentImpl() inside
> UUFClient.renderFragment function. This works.
>
> Can we make this a configuration property if there is no other way?
>
>
>
>
> On Mon, Apr 24, 2017 at 10:56 AM, Udara Rathnayake 
> wrote:
>
>> ​Assume we have following grid-stack div rendered through the UUFClient.​
>>
>>
>>
>> ​
>> ​Now I want to re-render the same with a different content (Eg:- Change
>> the dashboard layout )
>> There is a grid-stack function to destroy the existing content[1].
>>
>> $('.grid-stack').data('gridstack').destroy(true);
>>>
>>
>> So this will basically remove following also, used by the UUF to append
>> the content.
>>
>> 
>>> 
>>>
>>
>> Tried manually adding above before calling the UUFClient.renderFragment()
>> but it seems not working. zonesMap which is there in the UUFClient still
>> contains the gridContent zone.
>>
>> Any idea?
>>
>> [1] https://github.com/troolee/gridstack.js/tree/develop/doc#des
>> troydetachgrid​
>>
>>
>
>
> --
> Regards,
> UdaraR
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Rajith Roshan
Software Engineer, WSO2 Inc.
Mobile: +94-72-642-8350 <%2B94-71-554-8430>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [C5] APIM URL styling

2017-04-04 Thread Rajith Roshan
Thanks Manu, There might be other places as well we need to fix.

Thanks!
Rajith

On Tue, Apr 4, 2017 at 6:26 PM, Manuranga Perera  wrote:

> I see camlCasing in some URL [1]. I think should stick to dash patten for
> consistency.
>
> [1] https://github.com/wso2/carbon-apimgt/tree/C5/
> components/web/apps/org.wso2.carbon.apimgt.store/src/main/pages/statistic
> --
> 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
>
>


-- 
Rajith Roshan
Software Engineer, WSO2 Inc.
Mobile: +94-72-642-8350 <%2B94-71-554-8430>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Is there a hard and fast rule to chose java 8 streams over for loops

2017-03-29 Thread Rajith Roshan
Hi all,

Most of our C5 development have used java8 streams api frequently more than
the for loops.
But there are some research have done to compare the performance of streams
api compared to for loops. They have shown that stream API is slow compared
to for loops in many scenarios (even for parallel streams). [1][2]

Is there any proper guidance to use which one over the other or are we
using streams as a practice in C5 development

[1] -
https://blog.jooq.org/2015/12/08/3-reasons-why-you-shouldnt-replace-your-for-loops-by-stream-foreach/
[2] -
https://jaxenter.com/java-performance-tutorial-how-fast-are-the-java-8-streams-118830.html

Thanks!
Rajith

-- 
Rajith Roshan
Software Engineer, WSO2 Inc.
Mobile: +94-72-642-8350 <%2B94-71-554-8430>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [APIM_REST_API] What are the properties to include in DTO

2017-03-23 Thread Rajith Roshan
Hi

On Thu, Mar 23, 2017 at 11:33 AM, Anuruddha Liyanarachchi <
anurudd...@wso2.com> wrote:

> Hi,
>
> As per the current publisher REST API [1], there is a resource to get the
> subscription for a given API.
>
> This returns the following subscriptionDTO with subscription details and
> IDs of other objects associated with it (applicationId, apiId).
>
> @JsonProperty("subscriptionId")
> private String subscriptionId = null;
>
> @JsonProperty("applicationId")
> private String applicationId = null;
>
> @JsonProperty("apiId")
> private String apiId = null;
>
> @JsonProperty("subscriptionTier")
> private String subscriptionTier = null;
>
> @JsonProperty("subscriptionStatus")
> private SubscriptionStatusEnum subscriptionStatus = null;
>
> For the UI we need the application name and API name to be displayed along
> with the subscription status.
>
> In order to do get APP_NAME and API_NAME, we need to do two additional
> network calls with apiID and applicationID to two different resources.
>
> Therefore if we are to display 10 subscriptions in the UI we need to do 21
> network calls.
>
>  1. One network call to get list of subscriptions which return List with
> 10 subscription DTO objects (1 network call)
> *publisher/v1/subscriptions?api_id=fe855359-b3fd-4bbf-8f5c-6fb3f020011e*
>
>  2. For each subscriptionDTO, we need to do 2 network calls to get API
> name and Application Name. (2 * 10 = 20 network calls)
> *publisher/v1/apis?api_id=fe855359-b3fd-4bbf-8f5c-6fb3f020011e*
> *publisher/v1/applications?**application_id*
> *=fe855359-b3fd-4bbf-8f5c-6fb3f020011e*
>
> There are two ways to handle this.
>
> 1. Include the API_NAME and APPLICATION_NAME in the same DTO.
> @JsonProperty("applicationName")
> private String applicationName = null;
>
> @JsonProperty("apiName")
> private String apiName = null;
>
>
> 2. Include the *API* *object* and *Application* *object* in the
> subscription DAO with required fields populated.
> @JsonProperty("applicationObj")
> private Application applicationObj = null;
>
> @JsonProperty("apiObj")
> private API apiObj = null;
>
> IMO 2nd approach is more suitable. Please share your thoughts.
>

Are we going to filter out API object from subscription dto if the
particular user only have "apim:subscription_view" scope .(not
apim:api_view scope)

>
> [1] https://github.com/wso2/carbon-apimgt/blob/master/
> components/apimgt/org.wso2.carbon.apimgt.rest.api.
> publisher/src/main/resources/publisher-api.yaml
> <https://github.com/wso2/carbon-apimgt/blob/master/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher/src/main/resources/publisher-api.yaml#L3400-L3429>
> --
> Thanks and Regards,
> Anuruddha Lanka Liyanarachchi
> Software Engineer - WSO2
> Mobile : +94 (0) 712762611 <+94%2071%20276%202611>
> Tel  : +94 112 145 345 <+94%2011%202%20145345>
> anurudd...@wso2.com
>
> --
> *Thanks and Regards,*
> Anuruddha Lanka Liyanarachchi
> Software Engineer - WSO2
> Mobile : +94 (0) 712762611
> Tel  : +94 112 145 345
> a nurudd...@wso2.com
>



-- 
Rajith Roshan
Software Engineer, WSO2 Inc.
Mobile: +94-72-642-8350 <%2B94-71-554-8430>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [APIM_REST_API] What are the properties to include in DTO

2017-03-23 Thread Rajith Roshan
On Thu, Mar 23, 2017 at 11:50 PM, Malintha Amarasinghe 
wrote:

> Hi Rajith,
>
> I think what we need to include here is not the full API object, but an
> object that has minimal information of an API or an Application such as
> name and version (E.g like the list of minimal API info objects we are
> returning from GET /apis ). So I guess it will not do harm although we do
> not filter that out since it does not contain any sensitive information.
>
+1

>
> IMO 2nd approach is cleaner than the first approach. May be we can rename
> them as apiInfo and applicationInfo, just a thought.
>
> Thanks!
>
> On Thu, Mar 23, 2017 at 11:19 PM, Rajith Roshan  wrote:
>
>> Hi
>>
>> On Thu, Mar 23, 2017 at 11:33 AM, Anuruddha Liyanarachchi <
>> anurudd...@wso2.com> wrote:
>>
>>> Hi,
>>>
>>> As per the current publisher REST API [1], there is a resource to get
>>> the subscription for a given API.
>>>
>>> This returns the following subscriptionDTO with subscription details and
>>> IDs of other objects associated with it (applicationId, apiId).
>>>
>>> @JsonProperty("subscriptionId")
>>> private String subscriptionId = null;
>>>
>>> @JsonProperty("applicationId")
>>> private String applicationId = null;
>>>
>>> @JsonProperty("apiId")
>>> private String apiId = null;
>>>
>>> @JsonProperty("subscriptionTier")
>>> private String subscriptionTier = null;
>>>
>>> @JsonProperty("subscriptionStatus")
>>> private SubscriptionStatusEnum subscriptionStatus = null;
>>>
>>> For the UI we need the application name and API name to be displayed
>>> along with the subscription status.
>>>
>>> In order to do get APP_NAME and API_NAME, we need to do two additional
>>> network calls with apiID and applicationID to two different resources.
>>>
>>> Therefore if we are to display 10 subscriptions in the UI we need to do
>>> 21 network calls.
>>>
>>>  1. One network call to get list of subscriptions which return List with
>>> 10 subscription DTO objects (1 network call)
>>> *publisher/v1/subscriptions?api_id=fe855359-b3fd-4bbf-8f5c-6fb3f020011e*
>>>
>>>  2. For each subscriptionDTO, we need to do 2 network calls to get API
>>> name and Application Name. (2 * 10 = 20 network calls)
>>> *publisher/v1/apis?api_id=fe855359-b3fd-4bbf-8f5c-6fb3f020011e*
>>> *publisher/v1/applications?**application_id*
>>> *=fe855359-b3fd-4bbf-8f5c-6fb3f020011e*
>>>
>>> There are two ways to handle this.
>>>
>>> 1. Include the API_NAME and APPLICATION_NAME in the same DTO.
>>> @JsonProperty("applicationName")
>>> private String applicationName = null;
>>>
>>> @JsonProperty("apiName")
>>> private String apiName = null;
>>>
>>>
>>> 2. Include the *API* *object* and *Application* *object* in the
>>> subscription DAO with required fields populated.
>>> @JsonProperty("applicationObj")
>>> private Application applicationObj = null;
>>>
>>> @JsonProperty("apiObj")
>>> private API apiObj = null;
>>>
>>> IMO 2nd approach is more suitable. Please share your thoughts.
>>>
>>
>> Are we going to filter out API object from subscription dto if the
>> particular user only have "apim:subscription_view" scope .(not
>> apim:api_view scope)
>>
>>>
>>> [1] https://github.com/wso2/carbon-apimgt/blob/master/compon
>>> ents/apimgt/org.wso2.carbon.apimgt.rest.api.publisher/src/ma
>>> in/resources/publisher-api.yaml
>>> <https://github.com/wso2/carbon-apimgt/blob/master/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher/src/main/resources/publisher-api.yaml#L3400-L3429>
>>> --
>>> Thanks and Regards,
>>> Anuruddha Lanka Liyanarachchi
>>> Software Engineer - WSO2
>>> Mobile : +94 (0) 712762611 <+94%2071%20276%202611>
>>> Tel  : +94 112 145 345 <+94%2011%202%20145345>
>>> anurudd...@wso2.com
>>>
>>> --
>>> *Thanks and Regards,*
>>> Anuruddha Lanka Liyanarachchi
>>> Software Engineer - WSO2
>>> Mobile : +94 (0) 712762611
>>> Tel  : +94 112 145 345
>>> a nurudd...@wso2.com
>>>
>>
>>
>>
>> --
>> Rajith Roshan
>> Software Engineer, WSO2 Inc.
>> Mobile: +94-72-642-8350 <%2B94-71-554-8430>
>>
>
>
>
> --
> Malintha Amarasinghe
> Software Engineer
> *WSO2, Inc. - lean | enterprise | middleware*
> http://wso2.com/
>
> Mobile : +94 712383306 <+94%2071%20238%203306>
>



-- 
Rajith Roshan
Software Engineer, WSO2 Inc.
Mobile: +94-72-642-8350 <%2B94-71-554-8430>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [UUF]Handling events of fragments

2017-03-18 Thread Rajith Roshan
Hi,

I have used button register event on document ready[1] of the front end js
which is inside the fragment(public/js) folder. This works fine for me. I
haven't used success call back for event register.


[1] - $(function () {

$('#addThrottleBtn').on('click', addPolicyToBackend);
});

I think this should work for all fragments. If it's not working then its a
bug right?

Thanks!
Rajith

On Sat, Mar 18, 2017 at 3:48 PM, Manuranga Perera  wrote:

> Why does someone has to use a seccuess event? Can't they just put it in
> public/js and get the same result ?
>
> On 18 Mar 2017 10:06, "Chandana Napagoda"  wrote:
>
> Hi Manu,
>
> This is not a bug in uuf client. Once js is dynamically loaded, they can
> bind events from that javascript. You can verify it by modifying the sample
> I have mentioned in my previous mail.
>
> BTW, could you please elaborate more on what you meant by "special"
> fragments?
>
> Regards,
> Chandana
>
> On Thu, Mar 16, 2017 at 5:12 PM, Manuranga Perera  wrote:
>
>> Hi Denuwanthi, Rajith,
>>
>>> onCLick()
>>
>> Please don't do this, What I meant is to put in public/js dir inside the
>> fragment, not in fragment hbs. No JS in HBS please, don't mix logic and
>> pretension.
>>
>> Hi Napa, Sajith,
>>
>>> you should bind/initialize javascript events using the success event of
>>> the renderFragment method.
>>
>> I don't think this is a good constraint, that means people have to write
>> "spacial" fragments if they want to work with client side. UUF client
>> should attach the script after it attaches the HBS, if not it's bug in UUF
>> client.
>>
>> On Thu, Mar 16, 2017 at 4:22 AM, Denuwanthi De Silva > > wrote:
>>
>>> Hi Chandana,
>>>
>>> Thank you, it works .
>>>
>>>
>>> Thanks,
>>>
>>> On Thu, Mar 16, 2017 at 9:46 AM, Chandana Napagoda 
>>> wrote:
>>>
>>>> Hi Denuwathi,
>>>>
>>>> As I explained offline, you should bind/initialize javascript events
>>>> using the success event of the renderFragment method. As mentioned, please
>>>> refer client-side fragment sample in the uuf-common sample app.
>>>>
>>>>
>>>> Regards,
>>>> Chandana
>>>>
>>>> On Thu, Mar 16, 2017 at 8:41 AM, Denuwanthi De Silva <
>>>> denuwan...@wso2.com> wrote:
>>>>
>>>>> Thanks all for valuable suggestions.
>>>>>
>>>>> When rendering fragment via UUFClient, what we noticed is the
>>>>> corresponding front-end js did not pickup.
>>>>>
>>>>> Therefore, as Rajith mentioned used the onCLick() in the button html
>>>>> tag.
>>>>> But it would be more easier if we can do the front-end js logic of the
>>>>> fragment inside the fragment public js itself when using
>>>>> UUFclient.renderFragment() method to load the fragment
>>>>>
>>>>> Thanks
>>>>>
>>>>>
>>>>> On Tue, Mar 14, 2017 at 10:31 PM, Manuranga Perera 
>>>>> wrote:
>>>>>
>>>>>> Fragment is a self contained re usable component. I think its better
>>>>>>> to  have the all the front end logic related to the fragment inside that
>>>>>>> fragment.
>>>>>>>
>>>>>> +1
>>>>>>
>>>>>> On Tue, Mar 14, 2017 at 4:36 PM, Rajith Roshan 
>>>>>> wrote:
>>>>>>
>>>>>>> Hi
>>>>>>>
>>>>>>> On Tue, Mar 14, 2017 at 7:32 PM, Denuwanthi De Silva <
>>>>>>> denuwan...@wso2.com> wrote:
>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> I'm currently rendering a fragment inside a page using
>>>>>>>> 'UUFClient.renderFragment' method.
>>>>>>>> Then I display it in the page using "{{#defineZone}} helper.
>>>>>>>>
>>>>>>>> This fragment contains a button.
>>>>>>>> When I click that button I need to do an ajax call to a micro
>>>>>>>> service.
>>>>>>>>
>>>>>>>> I make the ajax call inside the front-end js of the current page.
>>>>>>>> This seems not to be working,

Re: [Dev] [UUF]Handling events of fragments

2017-03-14 Thread Rajith Roshan
Hi

On Tue, Mar 14, 2017 at 7:32 PM, Denuwanthi De Silva 
wrote:

> Hi,
>
> I'm currently rendering a fragment inside a page using
> 'UUFClient.renderFragment' method.
> Then I display it in the page using "{{#defineZone}} helper.
>
> This fragment contains a button.
> When I click that button I need to do an ajax call to a micro service.
>
> I make the ajax call inside the front-end js of the current page.
> This seems not to be working, as the button is in the fragment.
>
This is may be due to, by the time you are registering the on click event
for button the dom does not actually have the button element, since
uufrender client works asynchronously.
If you use onclick attribute on the button element itself and write your
logic in the current page then this should work. No need to move it to the
fragment.

>
> So, is it ok to define a front-end js in the fragment and do the ajax call
> from it, instead of the front-end js of the current page .?
>

Fragment is a self contained re usable component. I think its better to
 have the all the front end logic related to the fragment inside that
fragment.

>
>
> Thanks
>
> --
> Denuwanthi De Silva
> Senior Software Engineer;
> WSO2 Inc.; http://wso2.com,
> Email: denuwan...@wso2.com
> Blog: https://denuwanthi.wordpress.com/
>
> _______
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Rajith Roshan
Software Engineer, WSO2 Inc.
Mobile: +94-72-642-8350 <%2B94-71-554-8430>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DEV][APIM][C5] - Caching requirement for OAuth2 protected microservices

2017-03-14 Thread Rajith Roshan
+Azeez, +Kishanthan

On Tue, Mar 14, 2017 at 12:57 PM, Harsha Thirimanna 
wrote:

> Hi Rajith,
>
> Yes as Shani said, do we have any final decision to do this as a platform
> level solution  ?
>
> *Harsha Thirimanna*
> *Associate Tech Lead | WSO2*
>
> Email: hars...@wso2.com
> Mob: +94715186770 <+94%2071%20518%206770>
> Blog: http://harshathirimanna.blogspot.com/
> Twitter: http://twitter.com/harshathirimann
> Linked-In: linked-in: http://www.linkedin.com/pub/
> harsha-thirimanna/10/ab8/122
> <http://wso2.com/signature>
>
> On Mon, Mar 13, 2017 at 5:55 PM, Shani Ranasinghe  wrote:
>
>> Hi all,
>>
>> Just want to know if there has been a final decision being made on the
>> cache used?
>>
>> On Sat, Feb 25, 2017 at 12:47 AM, Rajith Roshan  wrote:
>>
>>> Hi all,
>>> Since distributed caches are no longer used in C5, we thought of using
>>> this as a local cache. If the token is missing in the cache then it will be
>>> validated using the key manager. So having this as a local cache is enough
>>> for our scenario.
>>> But the only issue we have is if token is revoked from one node, then
>>> invalid token can be there in the cache of the other node. We need a way to
>>> handle that scenario maybe using notification based cache synchorinization,
>>> JMS or using small validity period for tokens.
>>> Since IS have a requirement to replicate local cache in real time, Its
>>> better to use a platform wise caching mechanism with such capability. WDYT?
>>>
>>> Thanks!
>>> Rajith
>>>
>>> On Fri, Feb 24, 2017 at 10:22 PM, Harsha Thirimanna 
>>> wrote:
>>>
>>>> We also did some poc using Memcache and it is like a centralized
>>>> caching system rather than distributing cache among the nodes. And it is
>>>> released only very light weight engine and we have to implement our own way
>>>> to manage it.
>>>> Anyway, don't you guys have to replicate loca cache among the other
>>>> node in real time ? Because in that case we have to go either centralize or
>>>> some notification based local cache synchronizer mechanism. Otherwise we
>>>> have to find another solution for IS. Because we have that requirement. I
>>>> think we can try out the Redis also if we think about the the cluster.
>>>> Anyway we can't think about a distributed cache like Hazelecast again
>>>> because of it is giving lot of issues.
>>>>
>>>> *Harsha Thirimanna*
>>>> *Associate Tech Lead | WSO2*
>>>>
>>>> Email: hars...@wso2.com
>>>> Mob: +94715186770 <+94%2071%20518%206770>
>>>> Blog: http://harshathirimanna.blogspot.com/
>>>> Twitter: http://twitter.com/harshathirimann
>>>> Linked-In: linked-in: http://www.linkedin.com/pub/ha
>>>> rsha-thirimanna/10/ab8/122
>>>> <http://wso2.com/signature>
>>>>
>>>> On Fri, Feb 24, 2017 at 1:45 PM, Uvindra Dias Jayasinha <
>>>> uvin...@wso2.com> wrote:
>>>>
>>>>> Its great if we can have some feedback about this, active C5
>>>>> development needs this moving forward.
>>>>>
>>>>> @Azeez and @Kishanthan, do we have any preferences?
>>>>>
>>>>> On 24 February 2017 at 13:12, Sagara Gunathunga 
>>>>> wrote:
>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Fri, Feb 24, 2017 at 7:28 AM, Uvindra Dias Jayasinha <
>>>>>> uvin...@wso2.com> wrote:
>>>>>>
>>>>>>> This will function like any of the local container classes we
>>>>>>> use(example: HashMap). I think its fine to use one of the available
>>>>>>> implementations(such as Guava since we already have it as a dependency) 
>>>>>>> for
>>>>>>> this. Testing will reveal its suitability but I don't anticipate any 
>>>>>>> issues
>>>>>>> since this is not as complicated as a distributed cache.
>>>>>>>
>>>>>>
>>>>>> It's ok to pick one of the local cache implementations but make sure
>>>>>> you discuss with others without limiting to your own use case and pick a
>>>>>> good one so that others can use the same for their local caching
>>>>>> requirements, it

Re: [Dev] [UUF] Handling Tab view

2017-03-07 Thread Rajith Roshan
, breadcrumbs, and 
>>>>>>> *right-side
>>>>>>> menu will be the same for all pages*. Then we can put the markup
>>>>>>> for those into a layout and use that layout in pages (e.g. overview 
>>>>>>> page,
>>>>>>> users page).
>>>>>>
>>>>>>  So, having the menu in the layout will make it appear on all 4 pages.
>>>>>>
>>>>>> Thanks.
>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> [2]https://raw.githubusercontent.com/wso2-dev-ux/product-is/
>>>>>>> master/Wireframes/admin-portal/v2/3.3%20Add%20users%20-%20op
>>>>>>> tions.png
>>>>>>> [3]https://raw.githubusercontent.com/wso2-dev-ux/product-is/
>>>>>>> master/Wireframes/admin-portal/v2/4.3%20Group%20Listing.png
>>>>>>>
>>>>>>> - Top bar (logo, product name, and usermenu), breadcrumbs, and
>>>>>>>>> right-side menu will be the same for all pages. Then we can put the 
>>>>>>>>> markup
>>>>>>>>> for those into a layout and use that layout in pages (e.g. overview 
>>>>>>>>> page,
>>>>>>>>> users page).
>>>>>>>>>
>>>>>>>>> - You can configure the menu in the app.yaml (see pets-store,
>>>>>>>>> features-app samples). And using the {{#menu }} helper, you can 
>>>>>>>>> populate
>>>>>>>>> the menu (see sample apps)
>>>>>>>>>
>>>>>>>>> Thanks.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Mon, Mar 6, 2017 at 6:15 PM, Denuwanthi De Silva <
>>>>>>>>> denuwan...@wso2.com> wrote:
>>>>>>>>>
>>>>>>>>>> Hi,
>>>>>>>>>>
>>>>>>>>>> We need to provide a tab like view as in [1].
>>>>>>>>>> When moving between each tab  we plan to load a page.
>>>>>>>>>>
>>>>>>>>>> Is there a notation where we can insert a page inside the tab
>>>>>>>>>> similar to fragment notation?
>>>>>>>>>> or any other approach to achieve this behavior?
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> 
>>>>>>>>>> Overview
>>>>>>>>>>
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>>
>>>>>>>>>> 
>>>>>>>>>>
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> [1]https://raw.githubusercontent.com/wso2-dev-ux/product-is/
>>>>>>>>>> master/Wireframes/admin-portal/v2/2.1%20Landing%20page%20-%2
>>>>>>>>>> 0with%20no%20existing%20users.png
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Denuwanthi De Silva
>>>>>>>>>> Senior Software Engineer;
>>>>>>>>>> WSO2 Inc.; http://wso2.com,
>>>>>>>>>> Email: denuwan...@wso2.com
>>>>>>>>>> Blog: https://denuwanthi.wordpress.com/
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Sajith Janaprasad Ariyarathna
>>>>>>>>> Software Engineer; WSO2, Inc.;  http://wso2.com/
>>>>>>>>> <https://wso2.com/signature>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Denuwanthi De Silva
>>>>>>>> Senior Software Engineer;
>>>>>>>> WSO2 Inc.; http://wso2.com,
>>>>>>>> Email: denuwan...@wso2.com
>>>>>>>> Blog: https://denuwanthi.wordpress.com/
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Denuwanthi De Silva
>>>>>>> Senior Software Engineer;
>>>>>>> WSO2 Inc.; http://wso2.com,
>>>>>>> Email: denuwan...@wso2.com
>>>>>>> Blog: https://denuwanthi.wordpress.com/
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Sajith Janaprasad Ariyarathna
>>>>>> Software Engineer; WSO2, Inc.;  http://wso2.com/
>>>>>> <https://wso2.com/signature>
>>>>>>
>>>>>> ___
>>>>>> 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
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Sajith Janaprasad Ariyarathna
>>>> Software Engineer; WSO2, Inc.;  http://wso2.com/
>>>> <https://wso2.com/signature>
>>>>
>>>
>>>
>>>
>>> --
>>> With regards,
>>> *Manu*ranga Perera.
>>>
>>> phone : 071 7 70 20 50
>>> mail : m...@wso2.com
>>>
>>
>>
>>
>> --
>> Denuwanthi De Silva
>> Senior Software Engineer;
>> WSO2 Inc.; http://wso2.com,
>> Email: denuwan...@wso2.com
>> Blog: https://denuwanthi.wordpress.com/
>>
>
>
>
> --
> Denuwanthi De Silva
> Senior Software Engineer;
> WSO2 Inc.; http://wso2.com,
> Email: denuwan...@wso2.com
> Blog: https://denuwanthi.wordpress.com/
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Rajith Roshan
Software Engineer, WSO2 Inc.
Mobile: +94-72-642-8350 <%2B94-71-554-8430>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DEV][APIM][C5] - Caching requirement for OAuth2 protected microservices

2017-02-24 Thread Rajith Roshan
Hi all,
Since distributed caches are no longer used in C5, we thought of using this
as a local cache. If the token is missing in the cache then it will be
validated using the key manager. So having this as a local cache is enough
for our scenario.
But the only issue we have is if token is revoked from one node, then
invalid token can be there in the cache of the other node. We need a way to
handle that scenario maybe using notification based cache synchorinization,
JMS or using small validity period for tokens.
Since IS have a requirement to replicate local cache in real time, Its
better to use a platform wise caching mechanism with such capability. WDYT?

Thanks!
Rajith

On Fri, Feb 24, 2017 at 10:22 PM, Harsha Thirimanna 
wrote:

> We also did some poc using Memcache and it is like a centralized caching
> system rather than distributing cache among the nodes. And it is released
> only very light weight engine and we have to implement our own way to
> manage it.
> Anyway, don't you guys have to replicate loca cache among the other node
> in real time ? Because in that case we have to go either centralize or some
> notification based local cache synchronizer mechanism. Otherwise we have to
> find another solution for IS. Because we have that requirement. I think we
> can try out the Redis also if we think about the the cluster. Anyway we
> can't think about a distributed cache like Hazelecast again because of it
> is giving lot of issues.
>
> *Harsha Thirimanna*
> *Associate Tech Lead | WSO2*
>
> Email: hars...@wso2.com
> Mob: +94715186770 <+94%2071%20518%206770>
> Blog: http://harshathirimanna.blogspot.com/
> Twitter: http://twitter.com/harshathirimann
> Linked-In: linked-in: http://www.linkedin.com/pub/
> harsha-thirimanna/10/ab8/122
> <http://wso2.com/signature>
>
> On Fri, Feb 24, 2017 at 1:45 PM, Uvindra Dias Jayasinha 
> wrote:
>
>> Its great if we can have some feedback about this, active C5 development
>> needs this moving forward.
>>
>> @Azeez and @Kishanthan, do we have any preferences?
>>
>> On 24 February 2017 at 13:12, Sagara Gunathunga  wrote:
>>
>>>
>>>
>>>
>>>
>>>
>>> On Fri, Feb 24, 2017 at 7:28 AM, Uvindra Dias Jayasinha <
>>> uvin...@wso2.com> wrote:
>>>
>>>> This will function like any of the local container classes we
>>>> use(example: HashMap). I think its fine to use one of the available
>>>> implementations(such as Guava since we already have it as a dependency) for
>>>> this. Testing will reveal its suitability but I don't anticipate any issues
>>>> since this is not as complicated as a distributed cache.
>>>>
>>>
>>> It's ok to pick one of the local cache implementations but make sure you
>>> discuss with others without limiting to your own use case and pick a good
>>> one so that others can use the same for their local caching requirements,
>>> it's really ugly to use several local caching F/W across the platform other
>>> than really exceptional cases.
>>>
>>> Thanks !
>>>
>>>>
>>>> On 16 February 2017 at 22:45, Maduranga Siriwardena >>> > wrote:
>>>>
>>>>> Hi Rajith,
>>>>>
>>>>> I think this is a generic requirement for all the C5 based products
>>>>> rather than for this specific use case. So we need to come up with a
>>>>> solution that can be used across the platform.
>>>>>
>>>>> Thanks,
>>>>>
>>>>> On Thu, Feb 16, 2017 at 12:37 AM, Rajith Roshan 
>>>>> wrote:
>>>>>
>>>>>> Hi all,
>>>>>>
>>>>>> In C5 API Manager  back end REST APIs (micro services) are protected
>>>>>> using oauth2 token. Every time request comes to micro services, 
>>>>>> interceptor
>>>>>> will validate the access token sent in the authorization header of the
>>>>>> request. In order to validate the token we need to do a introspection 
>>>>>> call
>>>>>> to the key manager.  We can not do this introspection call to the key
>>>>>> manager for each and every request. We need a caching layer at the
>>>>>> interceptor level in order to cache the access tokens.
>>>>>>
>>>>>> We are going to use local cache with small cache timeout periods for
>>>>>> this. What are the best caching systems we can use for this.
>>>>>> We can us

Re: [Dev] [VOTE] Release WSO2 Governance Registry 5.4.0 RC2

2017-02-19 Thread Rajith Roshan
Hi all,
Tested following scenarios.

   - Getting started sample
   - Bi directional associations
   - Life cycle transitions
   - Attribute search in publisher

Found no blockers.

[+] Stable - go ahead and release

Thanks!
Rajith



On Mon, Feb 20, 2017 at 10:46 AM, Kasun Thennakoon  wrote:

> Hi all,
>
> Tested following scenarios:
>
>- Adding and then editing user reviews
>- Voting on user reviews
>- Store notifications when Lifecycle State Change and Information
>Update
>- Create new version of an asset
>- Sorting assets in Store and Publisher
>
> Found no major issues.
>
> [X] Stable - Go ahead and release
>
> On Sun, Feb 19, 2017 at 4:12 PM, Chandana Napagoda 
> wrote:
>
>> Hi Devs,
>>
>> WSO2 Governance Registry 5.4.0 RC2 Release Vote.
>>
>>
>> This release fixes the following issues:
>> https://wso2.org/jira/issues/?filter=13649
>>
>> The vote will be open for 24 hours or as needed. Please download, test
>> and vote. Please refer the release verification guide for detailed
>> information on verifying this release.
>>
>> Source & binary distribution files:
>> https://svn.wso2.org/repos/wso2/scratch/G-Reg/5.4.0/RC2
>>
>> Maven staging repo:
>> https://maven.wso2.org/nexus/content/repositories/orgwso2greg-1010
>>
>> The tag to be voted upon:
>> https://github.com/wso2/product-greg/releases/tag/v5.4.0-RC2
>>
>>
>> [+] Stable - go ahead and release
>> [-]  Broken - do not release (explain why)
>>
>> Thanks and Regards
>> G-Reg team
>>
>> --
>> *Chandana Napagoda*
>> Associate Technical Lead
>> WSO2 Inc. - http://wso2.org
>>
>> *Email  :  chand...@wso2.com **Mobile : +94718169299
>> <+94%2071%20816%209299>*
>>
>> *Blog  :http://cnapagoda.blogspot.com <http://cnapagoda.blogspot.com>
>> | http://chandana.napagoda.com <http://chandana.napagoda.com>*
>>
>> *Linkedin : http://www.linkedin.com/in/chandananapagoda
>> <http://www.linkedin.com/in/chandananapagoda>*
>>
>>
>> _______
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> *Kasun Thennakoon*
> Software Engineer
> WSO2, Inc.
> Mobile:+94 711661919
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Rajith Roshan
Software Engineer, WSO2 Inc.
Mobile: +94-72-642-8350 <%2B94-71-554-8430>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Nullpointer print intermittently when the C5 product start

2017-02-19 Thread Rajith Roshan
Hi all,

We have also witnessed this intermittently in C5 APIM server recently.
Could not found any exact steps to reproduce.

Thanks!
Rajith

On Mon, Feb 20, 2017 at 9:23 AM, Harsha Thirimanna  wrote:

> Hi,
>
> When the IS server get start, we can see this error log intermittently.
> Any idea about this ?
>
> Exception in thread "Timer-0" java.lang.NullPointerException
> at org.wso2.carbon.kernel.internal.startupresolver.
> StartupOrderResolver$1.run(StartupOrderResolver.java:170)
> at java.util.TimerThread.mainLoop(Timer.java:555)
> at java.util.TimerThread.run(Timer.java:505)
>
> thanks
>
> *Harsha Thirimanna*
> *Associate Tech Lead | WSO2*
>
> Email: hars...@wso2.com
> Mob: +94715186770 <+94%2071%20518%206770>
> Blog: http://harshathirimanna.blogspot.com/
> Twitter: http://twitter.com/harshathirimann
> Linked-In: linked-in: http://www.linkedin.com/pub/
> harsha-thirimanna/10/ab8/122
> <http://wso2.com/signature>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Rajith Roshan
Software Engineer, WSO2 Inc.
Mobile: +94-72-642-8350 <%2B94-71-554-8430>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [DEV][APIM][C5] - Caching requirement for OAuth2 protected microservices

2017-02-15 Thread Rajith Roshan
Hi all,

In C5 API Manager  back end REST APIs (micro services) are protected using
oauth2 token. Every time request comes to micro services, interceptor will
validate the access token sent in the authorization header of the request.
In order to validate the token we need to do a introspection call to the
key manager.  We can not do this introspection call to the key manager for
each and every request. We need a caching layer at the interceptor level in
order to cache the access tokens.

We are going to use local cache with small cache timeout periods for this.
What are the best caching systems we can use for this.
We can use either JCache (javax.cache), google guava cache[1] which are
specially used as local caches. "Memcached" [2] is also another option but
mostly used in distributed systems.

[1] - https://github.com/google/guava/wiki/CachesExplained
[2] - https://memcached.org/
-- 
Rajith Roshan
Software Engineer, WSO2 Inc.
Mobile: +94-72-642-8350 <%2B94-71-554-8430>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [UUF] Common "OnGet" method for all requests for a particular app

2017-02-06 Thread Rajith Roshan
For now I have included following check on the main.hbs (layout included
for all pages) . If the token is missing then it will redirect to login
page.


Re: [Dev] [UUF] Common "OnGet" method for all requests for a particular app

2017-02-06 Thread Rajith Roshan
Hi Manu,

Yes we can say that this is almost 90%  a front end app. But in order to
provide access token and to prompt login when access token is missing we
use back end functionalities of UUF.
We are not trying to protect UI templates through cookies. What we are
trying to do is provide access token via the uuf app. We are trying to do
the login prompt using the uuf app. So if token is missing micro service
layer will not be invoked and login will be prompted through the uuf app.
AFAIU what you are suggesting is to move this logic to micro service layer
and prompt login from there.

On Mon, Feb 6, 2017 at 5:44 PM, Manuranga Perera  wrote:

> I assume you guys have a /auth API, this can set a cookie [1] just has
> easily as UUF. And all your other APIs can read the cookie.
>

Yes we have /token api as a micro service bind to the uuf app which sets
the cookie.

>
>
> [1] http://stackoverflow.com/questions/3340797/can-an-ajax-
> response-set-a-cookie
>
> On Mon, Feb 6, 2017 at 12:06 PM, Manuranga Perera  wrote:
>
>> So you guys don't want to use UUF for its backend rending, just as a
>> static server and want to do a frontend app, that's cool. But then properly
>> write a frontend app. Seems like you guys don't know how to write a SPA and
>> running back to bankend app logic.
>>
>> If your UUF UI don't have any data (just templates) then there why do you
>> need to cookie protect them. You need a custom auth mechanism for your
>> microservices where half of the value is picked from the cookies, this has
>> nothing to do with protecting UI.
>>
>
>
>
> --
> With regards,
> *Manu*ranga Perera.
>
> phone : 071 7 70 20 50
> mail : m...@wso2.com
>



-- 
Rajith Roshan
Software Engineer, WSO2 Inc.
Mobile: +94-72-642-8350 <%2B94-71-554-8430>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [UUF] Common "OnGet" method for all requests for a particular app

2017-02-06 Thread Rajith Roshan
Hi all,

We are trying to implement password grant type based authentication for
publisher and store apps in APIM.
Initially consumer key and secret for publisher and store apps will be
created from external key manager(IS) through DCR (Dynamic client
registration)
Any user accessing the publisher or store micro services  would require to
login using either publisher or store apps.

During the login process access token will be requested from key manager
and sent in as cookies in the response. We will  split the access token in
to two parts and one part will be stored as "HttpOnly" cookie which can not
be accessed from javascript (front end). other part will be stored in a
normal cookie. These cookies will be set to the domain and the context
(/publisher or /store) so all the following requests would contain these
two cookies for a particular app.
So when a particular UUF page is requested we need to check whether this
cookies are present in the request. If so resources will be fetched from
micro services. Here through the interceptor access token will be re
created using cookies and validates with the key manager.
If the cookies are missing in the request we need to redirect to the login
page.

Now we have implemented a micro service (bind with publisher uuf app) which
will be called for a login request. This will provide a response with
cookies. What we tried to do is to check for this cookies for each and
every page request that comes to the uuf app.

Thanks!
Rajith



On Mon, Feb 6, 2017 at 4:28 PM, Manuranga Perera  wrote:

> @Rajith
> Is that true, are you doing auth in frontend (btw what app is this?)
> Then why do you need cookies? You just have to send auth header [1] ?
>
> [1] https://docs.google.com/drawings/d/1wtiF_
> UK2e4sZVorvfBUZh2UCaZq9sTCGoaDojSdwp7I/edit
>
> --
> With regards,
> *Manu*ranga Perera.
>
> phone : 071 7 70 20 50
> mail : m...@wso2.com
>



-- 
Rajith Roshan
Software Engineer, WSO2 Inc.
Mobile: +94-72-642-8350 <%2B94-71-554-8430>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [UUF] Common "OnGet" method for all requests for a particular app

2017-02-05 Thread Rajith Roshan
Hi Shan,

Thanks for your prompt response. This works fine. But my actual requirement
is not calling the method in module inside from each and every js file
(pages/index.js or pages/create.js and etc). A person who writing a new
page will have to call this method in the module in his JS file. If he/her
misses this logic then validating cookie for that page will be missed. Is
there any common place we can do this so this method will be invoked for
each onGet and onPost automatically rather than specifying it in individual
files.
If there is no other way would you recommend for us to call the module
inside each and every onGet/onPost method?

Thanks!
Rajith

On Sun, Feb 5, 2017 at 1:14 PM, Shan Mahanama  wrote:

> Hi Rajith,
>
> We can use modules for reusable js codes. Please refer modules sample in
> the Features app[1]. So in your case, I think we can add the *onGet*
> function to a module since it is reusable and include that module in all
> the js files where you want to perform this check.
>
> [1] https://github.com/wso2/carbon-uuf/blob/master/
> samples/apps/org.wso2.carbon.uuf.sample.features-app.app/
> src/main/pages/include-module.hbs
>
> Thanks,
> Shan.
>
>
> On Sun, Feb 5, 2017 at 12:14 PM, Rajith Roshan  wrote:
>
>> Hi Devs,
>>
>> I have written a logic to check for a cookie[1] when /publisher context
>> is requested. It will hit the OnGet method of index.js of publisher app.
>> But I need to perform this logic for all requests like /publisher/apis,
>> /publisher/create and etc. I can not copy the same logic to all js files.
>> Is there a common place in UUF where we can handle this kind of scenario
>> using back end Javascript.
>>
>> [1] - function onGet(env) {
>>
>> if(!env.request.getCookieValue("token1")) {
>> sendRedirect("commons/login");
>> }
>> sendRedirect("apis");
>> }
>>
>>
>> Thanks!
>> Rajith
>>
>>
>> Rajith Roshan
>> Software Engineer, WSO2 Inc.
>> Mobile: +94-72-642-8350 <%2B94-71-554-8430>
>>
>
>
>
> --
> Shan Mahanama
>
> Software Engineer, WSO2 Inc. http://wso2.com
> <http://l.facebook.com/l.php?u=http%3A%2F%2Fwso2.com&h=gAQEswASa>
> Email: sh...@wso2.com
> Mobile: +94 71 2000 498
>
>
>


-- 
Rajith Roshan
Software Engineer, WSO2 Inc.
Mobile: +94-72-642-8350 <%2B94-71-554-8430>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [UUF] Common "OnGet" method for all requests for a particular app

2017-02-04 Thread Rajith Roshan
Hi Devs,

I have written a logic to check for a cookie[1] when /publisher context is
requested. It will hit the OnGet method of index.js of publisher app.
But I need to perform this logic for all requests like /publisher/apis,
/publisher/create and etc. I can not copy the same logic to all js files.
Is there a common place in UUF where we can handle this kind of scenario
using back end Javascript.

[1] - function onGet(env) {

if(!env.request.getCookieValue("token1")) {
sendRedirect("commons/login");
}
sendRedirect("apis");
}


Thanks!
Rajith


Rajith Roshan
Software Engineer, WSO2 Inc.
Mobile: +94-72-642-8350 <%2B94-71-554-8430>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [Architecture] [VOTE] Release WSO2 API Manager 2.1.0 RC4

2017-01-30 Thread Rajith Roshan
Hi,

Tested API manager with third party key manager.

[+] Stable - go ahead and release


Thanks!
Rajith

On Tue, Jan 31, 2017 at 12:23 PM, Anuruddha Liyanarachchi <
anurudd...@wso2.com> wrote:

> Hi,
>
> Tested following:
>
> 1. Websocket API create, publish and invocation.
> 2. SOAP endpoint API create, publish and invocation.
>
> [+] Stable - go ahead and release
>
> On Mon, Jan 30, 2017 at 10:28 PM, Malintha Amarasinghe  > wrote:
>
>> Hi All,
>>
>> This is the 4th Release Candidate of WSO2 API Manager 2.1.0
>>
>> Please download, test the product and vote. The vote will be open for 72
>> hours or as needed.
>>
>> Source and distribution
>>
>> Run-time : https://github.com/wso2/product-apim/releases/download/v2.
>> 1.0-rc4/wso2am-2.1.0-RC4.zip
>> Analytics : https://github.com/wso2/anal
>> ytics-apim/releases/download/v2.1.0-rc3/wso2am-analytics-2.1.0-RC3.zip
>> Tooling : https://github.com/wso2/devstudio-tooling-apim/releases/ta
>> g/v2.1.0-rc2
>>
>>
>> This release fixes the following issues:
>> Runtime : https://wso2.org/jira/issues/?filter=13623
>> Analytics : https://wso2.org/jira/issues/?filter=13624
>> Tooling : https://wso2.org/jira/browse/DEVTOOLAPI-1
>>
>>
>> Please vote as follows.
>> [+] Stable - go ahead and release
>> [-] Broken - do not release (explain why)
>>
>> Thanks,
>> - WSO2 API Manager Team -
>>
>> --
>> Malintha Amarasinghe
>> Software Engineer
>> *WSO2, Inc. - lean | enterprise | middleware*
>> http://wso2.com/
>>
>> Mobile : +94 712383306 <+94%2071%20238%203306>
>>
>> ___
>> Architecture mailing list
>> architect...@wso2.org
>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>
>>
>
>
> --
> *Thanks and Regards,*
> Anuruddha Lanka Liyanarachchi
> Software Engineer - WSO2
> Mobile : +94 (0) 712762611
> Tel  : +94 112 145 345
> a nurudd...@wso2.com
>
> ___
> Architecture mailing list
> architect...@wso2.org
> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>
>


-- 
Rajith Roshan
Software Engineer, WSO2 Inc.
Mobile: +94-72-642-8350 <%2B94-71-554-8430>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Carbon feature plugin - Error when version is specified as x.x.x_x

2017-01-18 Thread Rajith Roshan
Hi Devs,

When bundling the bundle[1] using feature plugin (2.1.0), I got the
error[2]. But after having offline discussion with Neranjan we found out
that bundle version is specified as 3.5.0.1 in manifest.mf.
So in order to build the feature we have to add dependency version as
3.5.0_1 [3] and add the bundle version as 3.5.0.1 [4].
So we had to maintain two version parameters in the root pom for same
bundle. I think its better if can we handle this kind of scenarios using
carbon feature plugin.

[1] - 

org.apache.servicemix.bundles.lucene
3.5.0_1


[2] - Failed to execute goal
org.wso2.carbon.maven:carbon-feature-plugin:2.1.0:generate
(1-p2-feature-generation) on project org.wso2.carbon.apimgt.core.feature:
Bundle org.apache.servicemix.bundles.lucene_3.5.0_1 is not found in project
dependency list

[3] - 

org.apache.servicemix.bundles
org.apache.servicemix.bundles.lucene
3.5.0_1



[4] - 

org.apache.servicemix.bundles.lucene
3.5.0.1



Thanks!
Rajith

Rajith Roshan
Software Engineer, WSO2 Inc.
Mobile: +94-72-642-8350 <%2B94-71-554-8430>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] CSRF issue when doing SSO.

2016-11-30 Thread Rajith Roshan
Hi,

You need to exclude the acs url as below[1] in
"Owasp.CsrfGuard.Carbon.properties" file in
/wso2es-2.1.0/repository/conf/security directory.

[1] - org.owasp.csrfguard.unprotected.ServicesACS=%servletContext%/acs

Thanks!
Rajith

On Wed, Nov 30, 2016 at 12:21 PM, Shakila Sivagnanarajah 
wrote:

> Hi,
>
> I'm trying to configure SSO in wso2es 2.1.0 in our staging environment. I
> configured the SAML2SSOAuthenticator in 
> /repository/conf/security/authenticators.xml as
> shown in [1]. I get the exception [2] when I try to login the mgt console.
> The issuer carbonServerSP is configured with the Assertion Consumer
> URL https://:/acs in staging IS.
>
> I tried to prevent from this CSRF by configuring the CSRF Valve as
> mentioned in the documentation [3]. But still experiencing the same. Could
> you please advice me to resolve this?
>
> [1]
> 
>10
>
>/carbon/admin/login.jsp
>carbonServerSP
>https://
> /samlsso
>urn:
> oasis:names:tc:SAML:1.1:nameid-format:unspecified
>wso2carbon
>
> 
>
> [2]
>
> TID: [-1234] [] [2016-11-30 12:09:21,767]  WARN 
> {org.owasp.csrfguard.log.JavaLogger}
> -  potential cross-site request forgery (CSRF) attack thwarted
> (user:, ip:xx.xxx.x.xxx, method:POST, uri:/acs, error:required
> token is missing from the request)
>
> [3] https://docs.wso2.com/display/IS500/Mitigating+Cross+Site+
> Request+Forgery+(CSRF)+Attacks#MitigatingCrossSiteRequestForg
> ery(CSRF)Attacks-MitigatingusingtheCSRFValve
>
> Thank you
>
> --
> Shakila Sivagnanarajah
> Software Engineer
> Mobile :+94 (0) 768 856837 <+94%2076%20885%206837>
> shak...@wso2.com
> WSO2, Inc.
> lean . enterprise . middleware
> http://www.wso2.com/
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Rajith Roshan
Software Engineer, WSO2 Inc.
Mobile: +94-72-642-8350 <%2B94-71-554-8430>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] javax.naming.NameNotFoundException Name [jdbc/WSO2CarbonDB] is not bound in this Context

2016-11-29 Thread Rajith Roshan
SimpleCORS(
> CorsFilter.java:302)
> at org.apache.catalina.filters.CorsFilter.doFilter(
> CorsFilter.java:170)
> at org.apache.catalina.core.ApplicationFilterChain.
> internalDoFilter(ApplicationFilterChain.java:241)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(
> ApplicationFilterChain.java:208)
> at org.apache.catalina.core.StandardWrapperValve.invoke(
> StandardWrapperValve.java:220)
> at org.apache.catalina.core.StandardContextValve.invoke(
> StandardContextValve.java:122)
> at org.apache.catalina.authenticator.AuthenticatorBase.invoke(
> AuthenticatorBase.java:504)
> at org.apache.catalina.core.StandardHostValve.invoke(
> StandardHostValve.java:170)
> at org.apache.catalina.valves.ErrorReportValve.invoke(
> ErrorReportValve.java:103)
> at org.wso2.carbon.statistics.webapp.RequestIntercepterValve.
> invoke(RequestIntercepterValve.java:47)
> at org.wso2.carbon.bam.webapp.stat.publisher.
> WebAppStatisticPublisherValve.invoke(WebAppStatisticPublisherValve.
> java:104)
> at org.wso2.carbon.tomcat.ext.valves.CompositeValve.
> continueInvocation(CompositeValve.java:99)
> at org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.
> invoke(CarbonTomcatValve.java:47)
> at org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(
> TenantLazyLoaderValve.java:57)
> at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.
> invokeValves(TomcatValveContainer.java:47)
> at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(
> CompositeValve.java:62)
> at org.wso2.carbon.tomcat.ext.valves.
> CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValv
> e.java:159)
> at org.apache.catalina.valves.AccessLogValve.invoke(
> AccessLogValve.java:950)
> at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.
> invoke(CarbonContextCreatorValve.java:57)
> at org.apache.catalina.core.StandardEngineValve.invoke(
> StandardEngineValve.java:116)
> at org.apache.catalina.connector.CoyoteAdapter.service(
> CoyoteAdapter.java:421)
> at org.apache.coyote.http11.AbstractHttp11Processor.process(
> AbstractHttp11Processor.java:1074)
> at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.
> process(AbstractProtocol.java:611)
> at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.
> doRun(NioEndpoint.java:1739)
> at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.
> run(NioEndpoint.java:1698)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(
> ThreadPoolExecutor.java:1145)
>     at java.util.concurrent.ThreadPoolExecutor$Worker.run(
> ThreadPoolExecutor.java:615)
> at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(
> TaskThread.java:61)
> at java.lang.Thread.run(Thread.java:745)
>
> Thanks, Wenxing
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Rajith Roshan
Software Engineer, WSO2 Inc.
Mobile: +94-72-642-8350 <%2B94-71-554-8430>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Any risk to upgrade the Carbon Core to 4.4.10 on AS 5.3.0

2016-11-29 Thread Rajith Roshan
Hi,

You can not simply update the kernel version from 4.4.1 to 4.4.10. You have
to update all the dependent components as well in order to build the
application server.

Thanks!
Rajith

On Fri, Nov 25, 2016 at 11:45 AM, wenxzhen  wrote:

> Dear all,
>
> Is there any potential risk to upgrade the Core version from v4.4.1 to
> v4.4.10 on AS 5.3.0? As we can see from the POM.xml from AS 5.3.0:
>
> *5.3.0*
> *${product.as.version}*
>
> **
>
> *4.5.3*
> *4.4.1*
> *4.4.7*
> *4.4.8*
> *4.5.5*
> *4.4.3*
>
> Do I need to do the corresponding on the other components, e.g. Commons,
> Registry, Identify, Multitenancy and etc
>
> Thanks, Wenxing
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Rajith Roshan
Software Engineer, WSO2 Inc.
Mobile: +94-72-642-8350 <%2B94-71-554-8430>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] How to clear up the Registry Cache?

2016-11-07 Thread Rajith Roshan
Hi ,

You don't need to explicitly clear the registry cache. The cache will
automatically invalidate within 15 minutes. Or the cache will be cleared
when server is re started.
The issue you are facing is trying to access the cache using newly crated
tenant which causing a security issue. Seems like the owner of cache
instance still the old tenant.

Thanks!
Rajith

On Tue, Nov 8, 2016 at 8:48 AM, wenxzhen  wrote:

> Dear experts,
>
> Please advice a way to clear up the Registry Cache, which is really good
> to have.
>
> Thanks, Wenxing
>
>
> -- Original --
> *From: * "wenxzhen";;
> *Date: * Nov 7, 2016
> *To: * "wenxzhen"; "Rajith Roshan";
>
> *Cc: * "dev";
> *Subject: * Re: [Dev] How to clear up the Registry Cache?
>
> Appreciated if anyone can shed some light on how to clear up the Registry
> Cache.
>
> Thanks, Wenxing
>
> -- Original --
> *From: * "wenxzhen";;
> *Date: * Nov 7, 2016
> *To: * "Rajith Roshan";
> *Cc: * "dev";
> *Subject: * Re: [Dev] How to clear up the Registry Cache?
>
> Hi Rajith,
>
> You are right, there is no well defined way. Before deleting the UM data
> and Registry data, I have already deactivated the tenant.
>
> The exception below happened on my re-creation of the tenant with the same
> name. Please advice whether it's the problem that the Registry cache was
> not cleared up?
>
> Thanks, Wenxing
>
>
> -- Original --
> *From: * "Rajith Roshan";;
> *Send time:* Monday, Nov 7, 2016 2:22 PM
> *To:* "wenxzhen";
> *Cc:* "KasunG Gajasinghe"; "dev";
> *Subject: * Re: [Dev] How to clear up the Registry Cache?
>
> Hi,
>
> ASFAIK there is no well defined way to delete a tenant. You can deactivate
> a tenant. If you are using custom code then this error may be due to
> starting a wrong tenant flow in your code.
>
> Thanks!
> Rajith
>
> On Mon, Nov 7, 2016 at 10:46 AM, wenxzhen  wrote:
>
>> Thanks to Lakshani and Kasun.
>>
>> Regarding the TenantMgtListener extension, any reference or example to do
>> the cache clearing since our application is a WEB application?
>>
>> Thanks again, Wenxing
>>
>>
>> -- Original --
>> *From: * "KasunG Gajasinghe";;
>> *Send time:* Monday, Nov 7, 2016 1:43 PM
>> *To:* "wenxzhen";
>> *Cc:* "dev";
>> *Subject: * Re: [Dev] How to clear up the Registry Cache?
>>
>>
>> This sounds like a bug. When a tenant is deleted, the cache should be
>> cleared automatically. You shouldn't have to wait for the periodic cache
>> cleanup.
>>
>> My suggestion is to write a TenantMgtListener extension, and add it to
>> the product. In there, you can add a cache clearing operation for the
>> tenant pre/post delete method.
>>
>> On Monday, November 7, 2016, wenxzhen  wrote:
>>
>>> Dear all,
>>>
>>> I am trying to remove a Tenant from the WSO2, but I found the following
>>> exception after removing a Tenant and then re-create it:
>>>
>>> Caused by: java.lang.SecurityException: Illegal access attempt to cache
>>> ] owned by tenant {[testdomain7],[17]} by tenant {[testdomain7],[18]}
>>> at org.wso2.carbon.caching.impl.Util.checkAccess(Util.java:46)
>>> at org.wso2.carbon.caching.impl.CarbonCacheManager.getCache(Car
>>> bonCacheManager.java:111)
>>> at org.wso2.carbon.registry.core.utils.RegistryUtils.getResourc
>>> eCache(RegistryUtils.java:297)
>>> at org.wso2.carbon.registry.core.caching.CacheBackedRegistry.ge
>>> tCache(CacheBackedRegistry.java:62)
>>> at org.wso2.carbon.registry.core.caching.CacheBackedRegistry.re
>>> sourceExists(CacheBackedRegistry.java:289)
>>> at org.wso2.carbon.registry.core.session.UserRegistry.resourceE
>>> xistsInternal(UserRegistry.java:770)
>>> at org.wso2.carbon.registry.core.session.UserRegistry.access$80
>>> 0(UserRegistry.java:60)
>>> at org.wso2.carbon.registry.core.session.UserRegistry$9.run(Use
>>> rRegistry.java:753)
>>> at org.wso2.carbon.registry.core.session.UserRegistry$9.run(Use
>>> rRegistry.java:750)
>>> at java.security.AccessController.doPrivileged(Native Method)
>>> at org.wso2.carbon.registry.core.session.UserRegistry.resourceE
>>> xists(UserRegistry.java:750)
>>> ... 62 more
>>>
&

Re: [Dev] How to clear up the Registry Cache?

2016-11-06 Thread Rajith Roshan
Hi,

ASFAIK there is no well defined way to delete a tenant. You can deactivate
a tenant. If you are using custom code then this error may be due to
starting a wrong tenant flow in your code.

Thanks!
Rajith

On Mon, Nov 7, 2016 at 10:46 AM, wenxzhen  wrote:

> Thanks to Lakshani and Kasun.
>
> Regarding the TenantMgtListener extension, any reference or example to do
> the cache clearing since our application is a WEB application?
>
> Thanks again, Wenxing
>
>
> -- Original --
> *From: * "KasunG Gajasinghe";;
> *Send time:* Monday, Nov 7, 2016 1:43 PM
> *To:* "wenxzhen";
> *Cc:* "dev";
> *Subject: * Re: [Dev] How to clear up the Registry Cache?
>
>
> This sounds like a bug. When a tenant is deleted, the cache should be
> cleared automatically. You shouldn't have to wait for the periodic cache
> cleanup.
>
> My suggestion is to write a TenantMgtListener extension, and add it to the
> product. In there, you can add a cache clearing operation for the tenant
> pre/post delete method.
>
> On Monday, November 7, 2016, wenxzhen  wrote:
>
>> Dear all,
>>
>> I am trying to remove a Tenant from the WSO2, but I found the following
>> exception after removing a Tenant and then re-create it:
>>
>> Caused by: java.lang.SecurityException: Illegal access attempt to cache ]
>> owned by tenant {[testdomain7],[17]} by tenant {[testdomain7],[18]}
>> at org.wso2.carbon.caching.impl.Util.checkAccess(Util.java:46)
>> at org.wso2.carbon.caching.impl.CarbonCacheManager.getCache(Car
>> bonCacheManager.java:111)
>> at org.wso2.carbon.registry.core.utils.RegistryUtils.getResourc
>> eCache(RegistryUtils.java:297)
>> at org.wso2.carbon.registry.core.caching.CacheBackedRegistry.ge
>> tCache(CacheBackedRegistry.java:62)
>> at org.wso2.carbon.registry.core.caching.CacheBackedRegistry.re
>> sourceExists(CacheBackedRegistry.java:289)
>> at org.wso2.carbon.registry.core.session.UserRegistry.resourceE
>> xistsInternal(UserRegistry.java:770)
>> at org.wso2.carbon.registry.core.session.UserRegistry.access$80
>> 0(UserRegistry.java:60)
>> at org.wso2.carbon.registry.core.session.UserRegistry$9.run(Use
>> rRegistry.java:753)
>> at org.wso2.carbon.registry.core.session.UserRegistry$9.run(Use
>> rRegistry.java:750)
>> at java.security.AccessController.doPrivileged(Native Method)
>> at org.wso2.carbon.registry.core.session.UserRegistry.resourceE
>> xists(UserRegistry.java:750)
>> ... 62 more
>>
>> My question is how I can remove the related Registry cache of a tenant?
>> Thank you very much.
>>
>> Regards, Wenxing
>>
>>
>
> --
>
> *Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
> email: kasung AT spamfree wso2.com
> linked-in: http://lk.linkedin.com/in/gajasinghe
> blog: http://kasunbg.org
> phone: +1 650-745-4499, 77 678 0813
>
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Rajith Roshan
Software Engineer, WSO2 Inc.
Mobile: +94-72-642-8350 <%2B94-71-554-8430>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Shall we change the convention for placement of DB Query String in Java Code.

2016-10-31 Thread Rajith Roshan
T?
>>>>>
>>>>> --
>>>>>
>>>>> *Ruwan Abeykoon*
>>>>> *Associate Director/Architect**,*
>>>>> *WSO2, Inc. http://wso2.com <https://wso2.com/signature> *
>>>>> *lean.enterprise.middleware.*
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Sagara Gunathunga
>>>>
>>>> Associate Director / Architect; WSO2, Inc.;  http://wso2.com
>>>> V.P Apache Web Services;http://ws.apache.org/
>>>> Linkedin; http://www.linkedin.com/in/ssagara
>>>> Blog ;  http://ssagara.blogspot.com
>>>>
>>>>
>>>
>>>
>>> --
>>> S.Uthaiyashankar
>>> VP Engineering
>>> WSO2 Inc.
>>> http://wso2.com/ - "lean . enterprise . middleware"
>>>
>>> Phone: +94 774895474
>>>
>>
>
>
> --
> *Afkham Azeez*
> Director of Architecture; WSO2, Inc.; http://wso2.com
> Member; Apache Software Foundation; http://www.apache.org/
> * <http://www.apache.org/>*
> *email: **az...@wso2.com* 
> * cell: +94 77 3320919 <%2B94%2077%203320919>blog: *
> *http://blog.afkham.org* <http://blog.afkham.org>
> *twitter: **http://twitter.com/afkham_azeez*
> <http://twitter.com/afkham_azeez>
> *linked-in: **http://lk.linkedin.com/in/afkhamazeez
> <http://lk.linkedin.com/in/afkhamazeez>*
>
> *Lean . Enterprise . Middleware*
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Rajith Roshan
Software Engineer, WSO2 Inc.
Mobile: +94-72-642-8350 <%2B94-71-554-8430>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] How to debug an App under WSO2 AS 5.3.0

2016-10-20 Thread Rajith Roshan
Hi,

Add a new Remote configuration using intellij (Run -> Edit configurations).
Default port will be 5005.
Then start the AS with following command

sh wso2server.sh debug 5005

Thanks!
Rajith

On Thu, Oct 20, 2016 at 4:57 PM, wenxzhen  wrote:

> Dear all,
>
> I have deployed a Web APP under AS 5.3.0, how to debug the App with the
> Intellij IDEA?
>
> Appreciated for your advice
> Thanks, Wenxing
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Rajith Roshan
Software Engineer, WSO2 Inc.
Mobile: +94-72-642-8350 <%2B94-71-554-8430>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] DB script location for C5 based products

2016-10-20 Thread Rajith Roshan
What is the ${subject}?

Is it ${Carbon_Home}/dbscripts ?

Thanks!
Rajith

-- 
Rajith Roshan
Software Engineer, WSO2 Inc.
Mobile: +94-72-642-8350 <%2B94-71-554-8430>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [GREG] Issue with updating artifact using Registry Java API

2016-09-29 Thread Rajith Roshan
Hi,

You can use the "updateGovernanceArtifact" method in the
GovernanceArtifactManager class.

governanceArtifactManager.updateGovernanceArtifact(governanceArtifact);

Thanks!
Rajith

On Thu, Sep 29, 2016 at 12:15 PM, Shenavi de Mel  wrote:

> Hi Rajith,
>
> To update i have used this method bekiw. In this case should we update
> uisng the normal registry put method?
>
> manager.updateGenericArtifact(apiGenericArtifact);
>
> *Shenavi de Mel*
> Software Engineer
> WSO2 Inc: http://wso2.com
> email: shen...@wso2.com
> mobile: 0711644470
>
>
> On Thu, Sep 29, 2016 at 10:01 AM, Rajith Roshan  wrote:
>
>> Hi Shenavi,
>>
>> As Danesh suggested can you check whether the following method works.
>>
>> Registry registry = requestContext.getRegistry();
>> String resourcePath = requestContext.getResourcePath().getPath();
>>
>> governanceArtifact = 
>> GovernanceUtils.retrieveGovernanceArtifactByPath(requestContext.getSystemRegistry(),
>>  resourcePath);
>>
>> governanceArtifact.setAttribute("","");
>>
>>
>> Thanks!
>>
>> Rajith
>>
>>
>> On Thu, Sep 29, 2016 at 9:31 AM, Danesh Kuruppu  wrote:
>>
>>> Hi Shenavi,
>>>
>>> Did you try with the registry comes with requestContext as below.
>>> requestContext does have a registry, we can use that for registry
>>> operations
>>>
>>> requestContext.getRegistry()
>>>>
>>>
>>>
>>> Thanks
>>> Danesh
>>>
>>> On Thu, Sep 29, 2016 at 12:55 AM, Shenavi de Mel 
>>> wrote:
>>>
>>>> Hi All,
>>>>
>>>> I am trying to update an artifact created out of my custom API rxt in
>>>> greg inside the lifecycle executor class. Inside the lifecycle executer
>>>> class I need to modify the value of the field "implement_sandboxURL". When
>>>> i try to  update it using the java API it returns as a success but the
>>>> registry asset does not get updated with the value being passed in the
>>>> registry.
>>>>
>>>> Am I doing something wrong in how I am updating it? Your help would be
>>>> appreciated. Below is a block of code from inside the execution class which
>>>> corresponds to the update.
>>>>
>>>> {code}
>>>> Resource apiResource = requestContext.getResource();
>>>> String apiUUID = apiResource.getUUID();
>>>>
>>>> PrivilegedCarbonContext.startTenantFlow();
>>>> PrivilegedCarbonContext.getThreadLocalCarbonContext().setTen
>>>> antDomain(carbonContext.getTenantDomain());
>>>> PrivilegedCarbonContext.getThreadLocalCarbonContext().setTen
>>>> antId(carbonContext.getTenantId());
>>>>
>>>> *** Registry userRegistry = getUserRegistry();*
>>>> GenericArtifactManager manager = new GenericArtifactManager(userReg
>>>> istry,"api");
>>>> GenericArtifact apiGenericArtifact = manager.getGenericArtifact(api
>>>> UUID);
>>>> apiGenericArtifact.setAttribute("implement_sandboxURL","http
>>>> ://test.wso2.com");
>>>> manager.updateGenericArtifact(apiGenericArtifact);
>>>>
>>>> PrivilegedCarbonContext.endTenantFlow();
>>>>
>>>> {code}
>>>>
>>>>
>>>> *** Different methods tried to retrieve the registry instance*
>>>>
>>>> Method 1
>>>>
>>>> protected Registry getUserRegistry() throws RegistryException {
>>>> CarbonContext carbonContext = PrivilegedCarbonContext.getThr
>>>> eadLocalCarbonContext();
>>>> RegistryService registryService = (RegistryService)
>>>> carbonContext.getOSGiService(RegistryService.class, null);
>>>> return registryService.getGovernanceUserRegistry("admin",
>>>> carbonContext.getTenantId());
>>>> }
>>>>
>>>> Method 2
>>>>
>>>> protected Registry getUserRegistry() {
>>>> return (Registry)CarbonContext.getThr
>>>> eadLocalCarbonContext().getRegistry(RegistryType.USER_GOVERNANCE);
>>>> }
>>>>
>>>> Method 3
>>>>
>>>> protected Registry getUserRegistry() {
>>>>   ServiceDataHolder.getInstance().getTenantRegistryLoader().lo
>>>> adTenantRegistry(carbonContext.getTenantId());
>>>>  return ServiceDataHolder.getInstance(
>>>> ).getRegistryService().getGovernanceUserRegistry("admin");
>>>> }
>>>>
>>>> Am I missing something? What may be the reason the artifact does not
>>>> get updated? When i update using the edit option in the UI it works but not
>>>> through the code. Also i debugged in both cases and the flow was identical
>>>> as well.
>>>>
>>>> Thanks
>>>> Shenavi
>>>>
>>>> *Shenavi de Mel*
>>>> Software Engineer
>>>> WSO2 Inc: http://wso2.com
>>>> email: shen...@wso2.com
>>>> mobile: 0711644470
>>>>
>>>>
>>>
>>>
>>> --
>>>
>>> *Danesh Kuruppu*
>>> Senior Software Engineer | WSO2
>>>
>>> Email: dan...@wso2.com
>>> Mobile: +94 (77) 1690552
>>> Web: WSO2 Inc <https://wso2.com/signature>
>>>
>>>
>>
>>
>> --
>> Rajith Roshan
>> Software Engineer, WSO2 Inc.
>> Mobile: +94-72-642-8350 <%2B94-71-554-8430>
>>
>
>


-- 
Rajith Roshan
Software Engineer, WSO2 Inc.
Mobile: +94-72-642-8350 <%2B94-71-554-8430>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [GREG] Issue with updating artifact using Registry Java API

2016-09-28 Thread Rajith Roshan
Hi Shenavi,

As Danesh suggested can you check whether the following method works.

Registry registry = requestContext.getRegistry();
String resourcePath = requestContext.getResourcePath().getPath();

governanceArtifact =
GovernanceUtils.retrieveGovernanceArtifactByPath(requestContext.getSystemRegistry(),
resourcePath);

governanceArtifact.setAttribute("","");


Thanks!

Rajith


On Thu, Sep 29, 2016 at 9:31 AM, Danesh Kuruppu  wrote:

> Hi Shenavi,
>
> Did you try with the registry comes with requestContext as below.
> requestContext does have a registry, we can use that for registry
> operations
>
> requestContext.getRegistry()
>>
>
>
> Thanks
> Danesh
>
> On Thu, Sep 29, 2016 at 12:55 AM, Shenavi de Mel  wrote:
>
>> Hi All,
>>
>> I am trying to update an artifact created out of my custom API rxt in
>> greg inside the lifecycle executor class. Inside the lifecycle executer
>> class I need to modify the value of the field "implement_sandboxURL". When
>> i try to  update it using the java API it returns as a success but the
>> registry asset does not get updated with the value being passed in the
>> registry.
>>
>> Am I doing something wrong in how I am updating it? Your help would be
>> appreciated. Below is a block of code from inside the execution class which
>> corresponds to the update.
>>
>> {code}
>> Resource apiResource = requestContext.getResource();
>> String apiUUID = apiResource.getUUID();
>>
>> PrivilegedCarbonContext.startTenantFlow();
>> PrivilegedCarbonContext.getThreadLocalCarbonContext().setTen
>> antDomain(carbonContext.getTenantDomain());
>> PrivilegedCarbonContext.getThreadLocalCarbonContext().setTen
>> antId(carbonContext.getTenantId());
>>
>> *** Registry userRegistry = getUserRegistry();*
>> GenericArtifactManager manager = new GenericArtifactManager(userReg
>> istry,"api");
>> GenericArtifact apiGenericArtifact = manager.getGenericArtifact(apiUUID);
>> apiGenericArtifact.setAttribute("implement_sandboxURL","http
>> ://test.wso2.com");
>> manager.updateGenericArtifact(apiGenericArtifact);
>>
>> PrivilegedCarbonContext.endTenantFlow();
>>
>> {code}
>>
>>
>> *** Different methods tried to retrieve the registry instance*
>>
>> Method 1
>>
>> protected Registry getUserRegistry() throws RegistryException {
>> CarbonContext carbonContext = PrivilegedCarbonContext.getThr
>> eadLocalCarbonContext();
>> RegistryService registryService = (RegistryService)
>> carbonContext.getOSGiService(RegistryService.class, null);
>> return registryService.getGovernanceUserRegistry("admin",
>> carbonContext.getTenantId());
>> }
>>
>> Method 2
>>
>> protected Registry getUserRegistry() {
>> return (Registry)CarbonContext.getThr
>> eadLocalCarbonContext().getRegistry(RegistryType.USER_GOVERNANCE);
>> }
>>
>> Method 3
>>
>> protected Registry getUserRegistry() {
>>   ServiceDataHolder.getInstance().getTenantRegistryLoader().lo
>> adTenantRegistry(carbonContext.getTenantId());
>>  return 
>> ServiceDataHolder.getInstance().getRegistryService().getGovernanceUserRegistry("admin");
>>
>> }
>>
>> Am I missing something? What may be the reason the artifact does not get
>> updated? When i update using the edit option in the UI it works but not
>> through the code. Also i debugged in both cases and the flow was identical
>> as well.
>>
>> Thanks
>> Shenavi
>>
>> *Shenavi de Mel*
>> Software Engineer
>> WSO2 Inc: http://wso2.com
>> email: shen...@wso2.com
>> mobile: 0711644470
>>
>>
>
>
> --
>
> *Danesh Kuruppu*
> Senior Software Engineer | WSO2
>
> Email: dan...@wso2.com
> Mobile: +94 (77) 1690552
> Web: WSO2 Inc <https://wso2.com/signature>
>
>


-- 
Rajith Roshan
Software Engineer, WSO2 Inc.
Mobile: +94-72-642-8350 <%2B94-71-554-8430>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] WSO2 Committers += Lahiru J Ekanayake

2016-09-05 Thread Rajith Roshan
Congratz Lahiru

On Tue, Sep 6, 2016 at 12:09 PM, Malintha Fernando 
wrote:

> Congrats Lahiru! :)
>
> On Tue, Sep 6, 2016 at 12:04 PM, Sameera Medagammaddegedara <
> samee...@wso2.com> wrote:
>
>> Congratulations Lahiru!
>>
>> On Tue, Sep 6, 2016 at 11:13 AM, Madawa Soysa  wrote:
>>
>>> Congratulations Lahiru...!!!
>>>
>>> On Tue, Sep 6, 2016 at 11:03 AM, Mushthaq Rumy 
>>> wrote:
>>>
>>>> Congratulation Lahiru...!!! :)
>>>>
>>>> Thanks & Regards,
>>>> Mushthaq
>>>>
>>>> On Tue, Sep 6, 2016 at 11:00 AM, Chandana Napagoda 
>>>> wrote:
>>>>
>>>>> Hi All,
>>>>>
>>>>> It is my pleasure to welcome Lahiru J Ekanayake as a WSO2 Committer.
>>>>> Lahiru has made some great contributions to WSO2 Governance Registry and
>>>>> WSO2 Enterprise Store products during the last few months, specially to
>>>>> implement the taxonomy feature. In recognition of his commitment and
>>>>> contributions, Lahiru has been voted as a Committer for WSO2.
>>>>>
>>>>> Lahiru, welcome aboard and keep up the good work.
>>>>>
>>>>> Best Regards,
>>>>> Chandana
>>>>>
>>>>> --
>>>>> *Chandana Napagoda*
>>>>> Associate Technical Lead
>>>>> WSO2 Inc. - http://wso2.org
>>>>>
>>>>> *Email  :  chand...@wso2.com **Mobile :
>>>>> +94718169299 <%2B94718169299>*
>>>>>
>>>>> *Blog  :http://cnapagoda.blogspot.com
>>>>> <http://cnapagoda.blogspot.com> | http://chandana.napagoda.com
>>>>> <http://chandana.napagoda.com>*
>>>>>
>>>>>
>>>>> ___
>>>>> Dev mailing list
>>>>> Dev@wso2.org
>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Mushthaq Rumy
>>>> *Software Engineer*
>>>> Mobile : +94 (0) 779 492140 <%2B94%20%280%29%20773%20451194>
>>>> Email : musht...@wso2.com
>>>> WSO2, Inc.; http://wso2.com/
>>>> lean . enterprise . middleware.
>>>>
>>>> <http://wso2.com/signature>
>>>>
>>>> ___
>>>> Dev mailing list
>>>> Dev@wso2.org
>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>
>>>>
>>>
>>>
>>> --
>>>
>>> Madawa Soysa / Software Engineer
>>> mada...@wso2.com / +94714616050
>>>
>>> *WSO2 Inc.*
>>> lean.enterprise.middleware
>>>
>>>   <https://wso2.com/signature>
>>>
>>>
>>>
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Sameera Medagammaddegedara
>> Software Engineer
>>
>> Contact:
>> Email: samee...@wso2.com
>> Mobile: + 94 077 255 3005
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Malintha Fernando
> Software Engineer
> WSO2 Inc. | http://wso2.com
> Mobile : +94 718874922
> Blog : http://blog.malintha.org
>
> Lean . Enterprise . Middleware
>
>
>
>
>
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Rajith Roshan
Software Engineer, WSO2 Inc.
Mobile: +94-72-642-8350 <%2B94-71-554-8430>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] NoSuchAlgorithmException when starting DAS using IBM JDK

2016-08-11 Thread Rajith Roshan
Hi all,

Since this is applicable to all the products based on kernel 4.4.6 or
above, its better to add this in the docs where it points to set the java
home variable (under "installing the product" of each product documentation)

Thanks!
Rajith

On Thu, Aug 11, 2016 at 3:14 PM, Niranda Perera  wrote:

> Hi all,
>
> When I start DAS using IBM JDK, I get the following exception. [1]
>
> Upon further investigations, I found that [2] the following change needs
> to be done.
>
> "Please set the following property[1] in "Owasp.CsrfGuard.Carbon.properties"
> file (SERVER_HOME/repository/conf/security) which is default set to [2].
> [1] - org.owasp.csrfguard.PRNG.Provider=IBMJCE
> [2] - org.owasp.csrfguard.PRNG.Provider=SUN"
>
> It actually resolved my issue. My question is, is this a platform wide
> configuration? and If that is so, I suggest we add it in all the docs.
>
> Best
>
>
> [1]
> ERROR {org.apache.catalina.core.StandardContext} -  Exception sending
> context initialized event to listener instance of class org.owasp.csrfguard.
> CsrfGuardServletContextListener
> java.lang.RuntimeException: java.lang.RuntimeException: 
> java.security.NoSuchAlgorithmException:
> no such algorithm: SHA1PRNG for provider SUN
> at org.owasp.csrfguard.config.PropertiesConfigurationProviderFactory.
> retrieveConfiguration(PropertiesConfigurationProviderFactory.java:34)
> at org.owasp.csrfguard.config.overlay.ConfigurationAutodetectProvide
> rFactory.retrieveConfiguration(ConfigurationAutodetectProvide
> rFactory.java:73)
> at org.owasp.csrfguard.CsrfGuard.retrieveNewConfig(CsrfGuard.java:112)
> at org.owasp.csrfguard.CsrfGuard.config(CsrfGuard.java:86)
> at org.owasp.csrfguard.CsrfGuard.isPrintConfig(CsrfGuard.java:685)
> at org.owasp.csrfguard.CsrfGuardServletContextListene
> r.printConfigIfConfigured(CsrfGuardServletContextListener.java:97)
> at org.owasp.csrfguard.CsrfGuardServletContextListener.contextInitialized(
> CsrfGuardServletContextListener.java:86)
> at org.apache.catalina.core.StandardContext.listenerStart(
> StandardContext.java:5068)
> at org.apache.catalina.core.StandardContext.startInternal(
> StandardContext.java:5584)
> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
> at org.apache.catalina.core.ContainerBase$StartChild.call(
> ContainerBase.java:1572)
> at org.apache.catalina.core.ContainerBase$StartChild.call(
> ContainerBase.java:1562)
> at java.util.concurrent.FutureTask.run(FutureTask.java:267)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(
> ThreadPoolExecutor.java:1143)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(
> ThreadPoolExecutor.java:618)
> at java.lang.Thread.run(Thread.java:785)
> Caused by: java.lang.RuntimeException: java.security.NoSuchAlgorithmException:
> no such algorithm: SHA1PRNG for provider SUN
> at org.owasp.csrfguard.config.PropertiesConfigurationProvider.(
> PropertiesConfigurationProvider.java:234)
> at org.owasp.csrfguard.config.PropertiesConfigurationProviderFactory.
> retrieveConfiguration(PropertiesConfigurationProviderFactory.java:32)
> ... 15 more
> Caused by: java.security.NoSuchAlgorithmException: no such algorithm:
> SHA1PRNG for provider SUN
> at sun.security.jca.GetInstance.getService(GetInstance.java:99)
> at sun.security.jca.GetInstance.getInstance(GetInstance.java:218)
> at java.security.SecureRandom.getInstance(SecureRandom.java:342)
> at org.owasp.csrfguard.config.PropertiesConfigurationProvider.(
> PropertiesConfigurationProvider.java:121)
> ... 16 more
>
> [2] https://wso2.org/jira/browse/ESBJAVA-4772
>
> --
> *Niranda Perera*
> Software Engineer, WSO2 Inc.
> Mobile: +94-71-554-8430
> Twitter: @n1r44 <https://twitter.com/N1R44>
> https://pythagoreanscript.wordpress.com/
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Rajith Roshan
Software Engineer, WSO2 Inc.
Mobile: +94-72-642-8350 <%2B94-71-554-8430>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [VOTE] Release WSO2 Enterprise Store 2.1.0 RC 2

2016-08-10 Thread Rajith Roshan
Hi all,

Tested following basic scenarios with Oracle 11 database

Test Application Status
Login to the Publisher Publisher Passed
Logout of the Publisher Publisher Passed
Create an asset with a thumbnail Publisher Passed
Create an asset Publisher Passed
Update an asset Publisher Passed
Update an asset with a thumbnail Publisher Passed
Create an asset with a tag Publisher Passed
Create an asset with a taxonomy Publisher Passed
Remove tag from an asset Publisher Passed
Remove a taxonomy from an asset Publisher Passed
Create a new version of an asset Publisher Passed
Delete an asset Publisher Passed
Perform a lifecycle operation on an asset Publisher Passed
Login to the Store Store Passed
Logout of the Store Store Passed
Visit the top-assets page Store Passed
Visit a listing page Store Passed
Visit a details page Store Passed
Add a user review Store Passed
Delete your review Store Passed
Check if the search history appears in the top-assets page Store Passed
Check if the search history appears in the asset listing page Store Passed
Click the sort by Date - ASC Store Passed
Click the sort by Date - DESC Store Passed
Click the sort by Name - ASC Store Passed
Click the sort by Name - DESC Store Passed
Select a tag in the listing page Store Passed
Select a taxonomy in the listing page Store Passed
Select a taxonomy + tag Store Passed
Select a category + tag Store Passed
Remove tag from taxonomy + tag Store Passed
Remove taxonomy from taxonomy + tag Store Passed
Remove all from taxonomy + tag Store Passed
Did not found any blocking issues.

[+] Stable - go ahead and release

Thanks!
Rajith

On Tue, Aug 9, 2016 at 6:01 PM, Chanaka Jayasena  wrote:

> Following senarios tested and found no issue. [+] Stable - go ahead and
> release.
>
> Create new user
> sign in from the new user
> comment and rate other users assets
> bookmark  and unbookmark assets
>
> Search assets
> By Asset Name
> By Asset Content
> By Asset Tag
> By Asset Version
> By Lifecycle Name
> By Lifecycle State
>
> Filter by tags
> Remove tag filter
>
> Sort by date/time
> Sort by name
>
> Create new asset type
> Override default icon with a custom asset extension
>
> Create new asset
> Update asset
> Change lifecycle state
> Copy an asset to a new version
> Delete asset
>
> thanks,
> Chanaka
>
> On Fri, Aug 5, 2016 at 8:40 PM, Sameera Medagammaddegedara <
> samee...@wso2.com> wrote:
>
>> Hi Devs,
>>
>> WSO2 Enterprise Store 2.1.0 RC2 Release Vote
>>
>> This release fixes the following issues:
>> https://wso2.org/jira/issues/?filter=13171
>>
>> Please download, test and vote. Please refer the release verification
>> guide for detailed information on verifying this release.
>>
>> Source & binary distribution files:
>>  https://svn.wso2.org/repos/wso2/scratch/ES/2.1.0/rc2/
>>
>> Maven staging repo:
>> https://maven.wso2.org/nexus/content/repositories/orgwso2es-1006/
>>
>> The tag to be voted upon:
>> https://github.com/wso2/product-es/tree/v2.1.0-rc2
>>
>>
>> [+] Stable - go ahead and release
>> [-]  Broken - do not release (please explain why)
>>
>> Thanks and Regards
>> ES/G-Reg team
>> --
>> Sameera Medagammaddegedara
>> Software Engineer
>>
>> Contact:
>> Email: samee...@wso2.com
>> Mobile: + 94 077 255 3005
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Chanaka Jayasena
> Associate Tech Lead,
> email: chan...@wso2.com; cell: +94 77 4464006
> blog: http://chanaka3d.blogspot.com
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Rajith Roshan
Software Engineer, WSO2 Inc.
Mobile: +94-72-642-8350 <%2B94-71-554-8430>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


  1   2   >