The document describes projects completed by Andun S.L. Gunawardana during an internship at WSO2 Lanka (Pvt) Ltd. The main projects included developing an entitlement servlet filter feature, a rawXSLT mediator for WSO2 ESB, and a new XPATH parser for WSO2 ESB. Other projects involved refactoring WSO2 Application Server samples and participating in a test automation hackathon. Details are provided on the requirements, design, and performance improvements of each project.
2. Projects Within Internship
Main Projects:
Entitlement Servlet Filter Feature
RawXSLT Mediator for WSO2 ESB
New XPATH Parser for WSO2 ESB
Other Projects:
Refactoring WSO2 Application Server Samples
Test Automation Hackathon
3. Projects Within Internship
Main Projects:
Entitlement Servlet Filter Feature
RawXSLT Mediator for WSO2 ESB
New XPATH Parser for WSO2 ESB
Other Projects:
Refactoring WSO2 Application Server Samples
Test Automation Hackathon
4. Entitlement Servlet Filter Feature
Requirement :
Providing XACML policy based fine grained
authorization to webapp requests, using WSO2
Identity Server.
6. Entitlement Servlet Filter Feature
Components Added to the Carbon
Platform :
• Entitlement PEP Proxy Component
• Entitlement Servlet Filter Component
• XACML Filter Feature
• Sample for WSO2 Application Server 5.0.1
7. Entitlement Servlet Filter Feature
Components Added to the Carbon
Platform :
• Entitlement PEP Proxy Component
• Entitlement Servlet Filter Component
• XACML Filter Feature
• Sample for WSO2 Application Server 5.0.1
8. Entitlement Servlet Filter Feature
Use of Entitlement Proxy Component :
◦ Act as a proxy for communication between
WSO2 IS(PDP) and PEP.
◦ Entitlement Servlet Filter and the Entitlement
Mediator use this new component.
10. Entitlement Servlet Filter Feature
Why Entitlement Proxy Component ?
◦ Make User Life Easy,
User have to invoke a method in the proxy to get a entitlement
decision.
User don't have to implement XACML request related things to
use a XACML policy hosted in IS. The proxy hides those
complexity from user.
User can use SOAP, Thrift or JSON to PDP PEP communication
without worrying about the implementations.
◦ Entitlement requests can be sent either using XACML 3.0
or XACML 2.0.
◦ Several PEPs can use same Proxy to communicate with
several PDPs(WSO2 IS instances) at the same time.
11. Entitlement Servlet Filter Feature
Components Added to the Carbon
Platform :
• Entitlement PEP Proxy Component
• Entitlement Servlet Filter Component
• XACML Filter Feature
• Sample for WSO2 Application Server 5.0.1
12. Entitlement Servlet Filter Feature
Use of Entitlement Servlet Filter
Component :
◦ Act as the PEP.
◦ Checking the authorization of requests which are
coming for webapps which are hosted in WSO2
Application Server or Any other WebApp
container.
14. Entitlement Servlet Filter Feature
How to use Entitlement Servlet Filter
Component :
◦ The webapp have to engage the Entitlement Servlet
filter using the web.xml.
◦ Necessary parameters to initialize the PEP proxy
have to be provided via the web.xml
◦ The webapp must have a J2EE authentication
mechanism.
16. Entitlement Servlet Filter Feature
Components Added to the Carbon
Platform :
• Entitlement PEP Proxy Component
• Entitlement Servlet Filter Component
• XACML Filter Feature
• Sample for WSO2 Application Server 5.0.1
17. Entitlement Servlet Filter Feature
Entitlement Servlet Filter Feature can be found in the
Carbon 4.0.2 P2 repo.
Entitlement Servlet Filter Feature ships with
Application Server 5.0.1 with a Sample to illustrate it’s
functionality.
18. Projects Within Internship
Main Projects:
Entitlement Servlet Filter Feature
RawXSLT Mediator for WSO2 ESB
New XPATH Parser for WSO2 ESB
Other Projects:
Refactoring WSO2 Application Server Samples
Test Automation Hackathon
19. RawXSLT Mediator
Requirement :
◦ Creating a performance improved XSLT
transformation Mediator.
◦ Do XSLT transformations in the Binary Relay Mode of
the WSO2 ESB.
20. RawXSLT Mediator
Weaknesses of the Existing XSLT
Mediator :
◦ It build AXIOM data model for each message. So bit large
messages will add hugh performance drawback.
◦ To overcome that Stream Level Transformation is
suggested, without creating AXIOM data model.
22. RawXSLT Mediator
Improvement :
Requests Handled Per Second : Message Size 500B
3,000.00
2,500.00
2,000.00
1,500.00
1,000.00
500.00
0.00
n =5000, n =2500, n =1250, n =625, n =250, n =125, n =50,
c=10 c=20 c=40 c=80 c=200 c=400 c=1000
Normal XSLT Mediator RawXSLT Mediator
23. RawXSLT Mediator
Improvement :
Requests Handled Per Second : Message Size 1K
2,000.00
1,800.00
1,600.00
1,400.00
1,200.00
1,000.00
800.00
600.00
400.00
200.00
0.00
n =5000, n =2500, n =1250, n =625, n =250, n =125, n =50,
c=10 c=20 c=40 c=80 c=200 c=400 c=1000
Normal XSLT Mediator RawXSLT Mediator
24. RawXSLT Mediator
Improvement :
Requests Handled Per Second : Message Size 5K
1,200.00
1,000.00
800.00
600.00
400.00
200.00
0.00
n =5000, n =2500, n =1250, n =625, n =250, n =125, n =50,
c=10 c=20 c=40 c=80 c=200 c=400 c=1000
Normal XSLT Mediator RawXSLT Mediator
25. RawXSLT Mediator
Improvement :
Requests Handled Per Second : Message Size 10K
600.00
500.00
400.00
300.00
200.00
100.00
0.00
n =5000, c=10 n =2500, c=20 n =1250, c=40 n =250, c=200 n =50, c=1000
Normal XSLT Mediator RawXSLT Mediator
26. RawXSLT Mediator
Limitations of the RawXSLT Mediator :
◦ It can be only used in Binary Relay Mode of ESB.
◦ The XSLT transformation sheets have mandatory
conditions. So flexibility of the transformation is
limited.
27. Projects Within Internship
Main Projects:
Entitlement Servlet Filter Feature
RawXSLT Mediator for WSO2 ESB
New XPATH Parser for WSO2 ESB
Other Projects:
Refactoring WSO2 Application Server Samples
Test Automation Hackathon
28. New XPATH Parser
Requirement :
◦ Create a XAPTH parser which will suite to parse
simple XPATH expressions with better
performance.
29. New XPATH Parser
Weaknesses of the Current XPATH
Parser :
◦ It reads and build full XML tree for parse XPATH
which can be parsed without building the
complete tree.
◦ That is a big performance drawback, so new
XPATH parser is suggested which can parse
simple XPATH expression with better
performance using Streams of XML and on top
of AXIOM.
30. New XPATH Parser
Lets XPATH : /data/book/author/name with the
following XML,
31. Entitlement Servlet Filter Feature
New implementation of XPATH Parser:
◦ Create small components which are responsible
to do simple operations to AXIOM data model.
◦ For Example,
Component to return XML node if it matches some
conditions.
Component to return set of children of a XML node if it
matches some conditions.
Component to return an attribute of a XML node.
32. New XPATH Parser
Using those created small components we can get a
result of a XPATH expression,
33. New XPATH Parser
New implementation of XPATH Parser:
◦ So the new XAPTH parser will do the following,
◦ When we give a XPATH expression to the parser
it will create the component chain which will do
the processing to get the result of the XAPTH.
◦ When the parsing happens, the input XML is
passed though the component chain and output
the result.
◦ To create the component chain we have analyze
the given XPATH expression.
◦ For that We use Antlr Parser Generator.
35. New XPATH Parser
Improvement :
Requests Handled Per Second : Message Size 10K
4,000.00
3,500.00
3,000.00
2,500.00
2,000.00
1,500.00
1,000.00
500.00
0.00
n =50, n =100, n =200, n =400, n =800, n =2000,
c=2000 c=1000 c=500 c=250 c=125 c=50
Synapse XPATH New XPATH
36. Projects Within Internship
Main Projects:
Entitlement Servlet Filter Feature
RawXSLT Mediator for WSO2 ESB
New XPATH Parser for WSO2 ESB
Other Projects:
Refactoring WSO2 Application Server Samples
Test Automation Hackathon
37. Refactoring App Server Samples
◦ Adding Apache Ant Build Files to the APP Server
samples, with more flexibility to run
independently.
◦ Added run scripts to samples which will make
the samples complete.
◦ Structuring samples with necessary documents.
◦ Creating Wiki Docs for the Samples.
◦ Refactored JAX-WS & JAX-RS samples to run
with in the current platform.
38. Projects Within Internship
Main Projects:
Entitlement Servlet Filter Feature
RawXSLT Mediator for WSO2 ESB
New XPATH Parser for WSO2 ESB
Other Projects:
Refactoring WSO2 Application Server Samples
Test Automation Hackathon
39. Test Automation Hackathon
◦ Wrote number of test cases to WSO2 ESB.
Mediators, Endpoints,VFS Tranport
◦ Added improvement to Clarity Test Framework.
REST Support
Failover Test Support
Load Balance Endpoint Test Support
◦ Added a alternative mechanism to check ESB logs
using custom Mediator. This required because
ESB’s Log Reading Functionality is broken.