In default WSO2 products have a single user store. In this post we will going to configure Secondary User Stores (ReadWriteLDAPUserStoreManager). You can also configure your own customized user stores and connect them with the products as secondary stores. In my previous post[1], we create new custom LDAP and we will going to use that LDAP as our secondary user ...
This post will give all the steps for creating LDAP from Apache Directory Studio. Here post will be using Apache Directory Studio 1.5.3 version. 1. Create LDAP Server 2. Start server 3. Create the Connection (for the default instance of the Apache directory server, user name is ‘uid=admin,ou=system’ and the Bind password is ‘secret’) 4. Then browser LDPA by click ...
Adding policy from Home > Entitlement > PAP > Policy Administration Here I am using add from “Import Existing Policy” TestPolicy0006.xml (IS sample test Policy will be used) <Policy xmlns="urn:oasis:names:tc:xacml:3.0:core:schema:wd-17" xmlns:xacml="urn:oasis:names:tc:xacml:3.0:core:schema:wd-17" PolicyId="TestPolicy0006" RuleCombiningAlgId="urn:oasis:names:tc:xacml:1.0:rule-combining-algorithm:first-applicable" Version="1.0"> <Description>Test POlicy 0006 : boolean-from-string function
As Representational State Transfer (REST) is more popular post illustrates the getting REST api from wso2 ESB concepts through the XML. <api xmlns="http://ws.apache.org/ns/synapse" name="MY_API" context="/student"> <resource methods="GET" url-mapping="/list" inSequence="sequence1" outSequence="sequence2"/></api> Steps of the Flow When request is dispatched to a resource it will be mediated through the in-sequence of the resource At the end of the in-sequence the request will ...
post will explain how to create proxy service in WSO2 ESB with using mock service end point. Mock service will be created from SoapUI[1]. This very basic post regards to subject. In here I will be using WSO2 ESB 4.8.0 SoapUI 4.6.2 Use case. Use case will be very basic one. - Mock service will be create from echo service ...
This very basic post mainly using WSO2 API manger with MYSQL rather H2 database. 1. Creating Database in MYSQL mysql -u root –p create database regdb; 2. Giving authorization of the database to the user "root." GRANT ALL ON regdb.* TO root@localhost IDENTIFIED BY "root" 3. Add data source for APIM <datasource> <name>WSO2_CARBON_DB</name> <description>The datasource used for registry and user ...
This post will illustrate how share Cassandra Keyspaces in wso2 products. I will be using WSO2 Business Activity Monitor 2.4.0 in here. I create new role called ‘testRole1’and add user called 'madhuka' assign newly created role for user. This user management can (Home --> Configure --> Users and Roles) BAM sample (httpd-logs) I will used BAM sample (httpd-logs) to test ...
Now we will try SSO with cluster of AS (Fronted by ELB)[1].1. I will start IS with standalone with offset 4 (So IS will start in port 9447). Here we will used wso2 IS 4.5.0 <Offset>4</Offset> 2. Open wso2is-4.5.0\repository\conf\security\application-authenticators.xml <Authenticators> <Authenticator name="BasicAuthenticator" disabled="false" factor="1"> <Status value="10" loginPage="https://localhost:9447/authenticationendpoint/login.do" /> </Authenticator> </Authentic
In here I will we using ELB 2.1.0 and AS 5.2.0. Cluster will be setup on window environment. I have built this cluster for few time with wso2 product and think it worth to write. The post have main three sub topic Setting up Elastic Load Balancer Setting up AS as manger Setting up AS as worker node Setting up ...
This post will illustrate the setups to be follow to added jaggery test for jaggery application. From ‘sugarcane’[1] we can test jaggery modules, jaggery app modules (.js), and .js and .jag files. ‘Sugarcane’ is solution for jaggery unit testing[2]. Here is setup to added sugarcane to you jaggery. 1. Add ‘sugarcane’ modules[1] to jaggery level. (Or p2[1] feature) 2. Go ...
Immediately calling an anonymous function with a specific parameter. Here I will explain some simple JavaScript method for calling anonymous function with a specific parameter in immediately. (function(){}); Here is sample (function (name) { console.log(name);})('jhon') This log name 'jhon'. In jQuery we can this concept a easily. create anonymous function (function without name that can be "nested" inside other function) ...
Last 4 week I was work on developing test framework for jaggery[1]. You can find Source and Beta of product in github[2]. Now jaggery is been used in lot of products in wso2 so we can’t expect people to added it manually. Therefore here I am creating new p2 features called ‘Sugarcane’ that contain jaggery test frame work[3] . Here ...
1. Firstly download wso2 http://wso2.com/products/enterprise-store/ and unzip it. 2. Download test module from https://github.com/Madhuka/jaggery-test-framewrok/tree/m8/jaggery-module/test 3. Then add 'test' module in to 'wso2store-1.0.0\modules\' 4. Then go to store app in 'wso2store-1.0.0\repository\deployment\server\jaggeryapps\store' 4.1 Add new folder called 'test' where we will added our test specs files 4.2 Inside 'test' Folder added 'executer.jag'[1] add below line in there <%require("test").cola
When you writing test you will need matcher compare your values. Here are a few you’ll probably find useful when you working jaggery test framework or jasmine. toBeDefined / toBeUndefinedIf you just want to make sure a variable or property is defined, there’s a matcher for that. There’s also one to confirm that a variable or property is undefined. it("is ...
In wso2 jaggery we can find try { //cod that can return error (exception) } catch (error) { //code for print/returning error } finally { //final block } In jaggery errors can be filter by below ways by defaults. It is worth to know, when building error messages. When you know specific error type can occur in code segment then ...
Unit tests are supposed to test only one component of our application.A component can be a function, an object, a module, basically everything self-contained that acts like a black box to the outside world. Therefore we want to test our components in isolation as much as possible and to avoid that our unit tests fail because another component failed. Think ...
There are plenty of methods in JavaScript today that execute asynchronously, such as setTimeout(), Ajax calls, as well as event-driven processes. These examples all share one thing in common in that they have to wait until the current execution thread comes to an end and surrenders to the next event. As a result, there is going to be a time ...
In java script we used ‘this’ keyword and ‘this’ as a keyword that "evaluates to the value of the ThisBinding of the current execution context". ThisBinding is something that the JavaScript interpreter maintains as it evaluates JavaScript code, like a special CPU register which holds a reference to an object. The interpreter updates the ThisBinding whenever establishing an execution context ...
I have seen lot coding with JS and have notice the $subject. There are mainly three ways and this post mainly for JS beginners. 1. Function declaration: A Function Declaration defines a named function variable without requiring variable assignment. Function Declarations occur as standalone constructs and cannot be nested within non-function blocks. eg: function innerFunction1 () { }; 2. Function ...
I came across those two test development Behaviour-Driven Development and Test-Driven Development while I was developing framework. Mainly we can looking to those from two perspectives Language and scope Firstly look for language. In here you need to think who will be using you frame work (means who will write test, who we run to get the results) TDD assertEuqals(count,5) ...