Re: [Dev] Engage tomcat filters when original request is dispatched towards a different context.

2018-02-25 Thread Isura Karunaratne
On Sun, Feb 25, 2018 at 11:32 PM Hasintha Indrajee 
wrote:

> We have the tenant context rewrite valve which dispatches original request
> to a the context after removing tenant context (/t/tenantDomain). Hence
> servlet filters are not getting engaged for these dispatched requests. We
> need to add an extra  element to our servlet filters in order
> to execute them for dispatched requests as well. Below are two examples
> without and with extra dispatcher element.
>
> Shall we add this for all our filters ?
>
+1

Also, check whether the filters are getting executed for non web app
requests. (Ex. Identity servlet).



/api/identity/user/v1.0/
/api/identity/consent-mgt/v1.0/
/api/identity/recovery/v0.9/
/oauth2/
/scim2/
/api/identity/entitlement/
/api/identity/oauth2/dcr/v1.0/


/identity/(.*)





Thanks
Isura.

>
>
> Without FORWARD dispatcher
>
> 
>
> CaptchaFilter
>
> /*
>
> REQUEST
>
> 
>
>
> With FORWARD dispatcher (additionally we can have INCLUDE dispatcher as
> well if we are including without forwarding)
>
> 
>
> CaptchaFilter
>
> /*
>
> REQUEST
>
> FORWARD
>
> INCLUDE
>
> 
>
>
>
>
> --
> Hasintha Indrajee
> WSO2, Inc.
> Mobile:+94 771892453 <077%20189%202453>
>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Engage tomcat filters when original request is dispatched towards a different context.

2018-02-25 Thread Hasintha Indrajee
We have the tenant context rewrite valve which dispatches original request
to a the context after removing tenant context (/t/tenantDomain). Hence
servlet filters are not getting engaged for these dispatched requests. We
need to add an extra  element to our servlet filters in order
to execute them for dispatched requests as well. Below are two examples
without and with extra dispatcher element.

Shall we add this for all our filters ?

Without FORWARD dispatcher



CaptchaFilter

/*

REQUEST




With FORWARD dispatcher (additionally we can have INCLUDE dispatcher as
well if we are including without forwarding)



CaptchaFilter

/*

REQUEST

FORWARD

INCLUDE






-- 
Hasintha Indrajee
WSO2, Inc.
Mobile:+94 771892453 <077%20189%202453>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Access list of HTTP methods associated with resource path in Interceptor level

2018-02-25 Thread Renuka Fernando
Hi All,

The above requirement for the feature "Multi-Environment Support" for API
Manager 3.0.0 is resolved by reading the swagger definition [1]. Defined
HTTP methods for the resource path is read from the swagger file and set it
to the “Access-Control-Allow-Methods” header.

[1]
https://github.com/wso2/carbon-apimgt/pulhttps://github.com/wso2/carbon-apimgt/pull/5095l/5095


Thanks and regards

On 22 November 2017 at 15:11, Renuka Fernando  wrote:

> Hi All,
>
> The feature “Environment Support” for API Manager requires making CORS
> requests.
>
> In CORS preflight requests browser sends request method with “
> Access-Control-Request-Method” header. The server should respond allowed
> HTTP methods with “Access-Control-Allow-Methods” header. In order to set
> the header, the request method should be validated by checking whether
> the request method is within HTTP methods associated with the resource path.
>
> In interceptor level these http methods (http methods associate with the
> resource path) are not accessible.
>
> org.wso2.msf4j.Interceptor
>
> preCall method.
>
> response.setHeader("Access-Control-Allow-Methods", allowedMethods);
>
> These http methods can be found in org.wso2.msf4j.internal.
> MSF4JMessageProcessor dispatchMethod method.
>
> resourceModel.httpMethods
>
> Can the preCall method in org.wso2.msf4j.Interceptor to be improved to
> extract Http-Methods associate with the Resource-Path in interceptor level.
>
> Regards,
>
> --
> *Renuka Fernando*
> Software Engineering Intern | WSO2 Inc
>
> Email : ren...@wso2.com
> Mobile : +94 76 667 8752 <+94%2076%20667%208752>
> Web : http://wso2.com
> 
>



-- 
*Renuka Fernando*
Software Engineering Intern | WSO2 Inc

Email : ren...@wso2.com
Mobile : +94 76 667 8752
Web : http://wso2.com

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


[Dev] [VOTE] Release WSO2 IoT Server 3.2.0 RC2

2018-02-25 Thread Rasika Perera
Hi Devs,

We are pleased to announce the release candidate of WSO2 IoT Server 3.2.0.

This is the second release candidate (RC) of the WSO2 IoT Server 3.2.0
release.

This release carries 275+ issue fixes [1-12] over the last GA (3.1.0)
release.

Reported Issues:

   - https://github.com/wso2/product-iots/issues

Source and distribution packages:

   - https://github.com/wso2/product-iots/releases/tag/v3.2.0-RC2

Tag to be voted upon:

   - https://github.com/wso2/product-iots/releases/tag/v3.2.0-RC2

Please download, test, and vote. The README file under the distribution
contains guide and instructions on how to try it out locally.

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

[1] https://github.com/wso2/product-iots/milestone/3?closed=1
[2] https://github.com/wso2/product-iots/milestone/4?closed=1
[3] https://github.com/wso2/product-iots/milestone/5?closed=1
[4] https://github.com/wso2/product-iots/milestone/6?closed=1
[5] https://github.com/wso2/product-iots/milestone/7?closed=1
[6] https://github.com/wso2/product-iots/milestone/11?closed=1
[7] https://github.com/wso2/product-iots/milestone/12?closed=1
[8] https://github.com/wso2/product-iots/milestone/13?closed=1
[9] https://github.com/wso2/product-iots/milestone/14?closed=1
[10] https://github.com/wso2/product-iots/milestone/18?closed=1
[11] https://github.com/wso2/product-iots/milestone/19?closed=1
[12] https://github.com/wso2/product-iots/milestone/20?closed=1

Regards,
The WSO2 IoT Team.

-- 
With Regards,

*Rasika Perera*
Senior Software Engineer
LinkedIn: http://lk.linkedin.com/in/rasika90



WSO2 Inc. www.wso2.com
lean.enterprise.middleware
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev