Posts

Showing posts from 2019

Configure Kerberos based Authentication into WSO2 Datasources

As you know, Kerberos can be used to authenticate System or users reside on a none secured network. In my use case, I have Windows AD and MSSQL server and I have a couple of WSO2 Servers running on Linux systems. In my initial setup I have configured, WSO2 servers has to use SQL users. But instead of using SQL users, I prefer to use AD users. So I have started configuring Kerberos and faced a lot of troubles. If you are starting from scratch, I would recommend writing a Java class to connect MSSQL server using Kerberos. Then You can identify all small mistakes such as character case issues, typos, JDBC driver compatibility issues, etc.  Below are a few issues I have faced: 1) CASE is significant in krb5.conf file 2) I found that we need to use MSSQL JDBC 6.4 version in order to get new tickets. But if you are just planning use pre-generated tickets, you can use the older version as well. Here are the steps you need follow when configuring Kerberos with WSO2 Enterp

Compare Two XML Elements and Filter using WSO2 EI

Think about an integration scenario, where you are getting a list of data from a service endpoint(Data 1) and you want to exclude or match this response against the data returned by another service endpoint(Data 2). In such a situation, first, you need to have a unique attribute in both data set to exclude or match elements. So in my use case, list of data and matching content is as below <CodeLists> <CodeList> <Id> O </Id> <Name> Open </Name> </CodeList> <CodeList> <Id> C </Id> <Name> Cancelled </Name> </CodeList> <CodeList> <Id> X </Id> <Name> Denied </Name> </CodeList> <CodeList> <Id> P </Id> <Name> Pending </Name> </CodeList> <CodeList> <Id> D </Id> <Name> Duplicate </Name>

XSLT - Modify Date and DateTime value

If you want to perform date and time related opertions with XSLT 'date' or 'dateTime' values, you can use 'xs:yearMonthDuration' or 'xs:dayTimeDuration' function to achieve this. You can add or reduce years, months, date, hours or even minutes through those functions.  xs:yearMonthDuration For this function input value is year month duration and it should be passed in  ISO_8601 format n- the [n] is replaced by the value for each of the date and time elements P - The duration designator(for period). nY- the number of years. nM- the number of months. ex: xs:yearMonthDuration('P1Y2M') - 1 Year and 2 Months ex:  xs:yearMonthDuration('-P1Y2M')  - Negative 1 Year and 2 Months xs:dayTimeDuration For this function input value is day time duration and it also needs to be passed in  ISO_8601 format n- the [n] is replaced by the value for each of the date and time elements P - The duration designator(for period). nD- the