Wednesday, October 14, 2015

Purging Cassandra data in WSO2 BAM 2.5.0


WSO2 BAM is capable of monitoring a wide range of business activities. BAM allows users to perform following operations to the data.
  • Aggregate
  • Analyze
  • Present
  • Purge

In this post I am going to talk about data purging task performed by BAM. It is really simple to schedule a data purging/deleting task in BAM 2.5.0. Follow the below steps to create a data deletion task.

Step 01

Download WSO2 BAM 2.5.0. navigate to <BAM_HOME>/bin and start the server using wso2server.sh script. Login using admin:admin credentials.

Step 02

Go to Configure tab in the left bar and you will get the following .


Add Archive/Purge Data.


Add the stream name and version which you need to delete data from. I have given the retention period as 1 day.

And here we can specify a cron expression which schedules the task. In my cron expression the task will trigger for each minute.
Please refer to the following table to get more information on cron expressions. And also please note that the we are using quartz scheduler cron expressions.

Field Name Allowed Values Allowed Special Characters
Seconds 0-59 , - * /
Minutes 0-59 , - * /
Hours 0-23 , - * /
Day of month 1-31 , - * ? / L W
Month 1-12 or JAN-DEC , - * /
Day of week 1-7 or SUN-SAT , - * ? / L #
Year empty, 1970-2099 , - * /

Monday, October 12, 2015

Using Federated Authentication in WSO2 IS 5.0.0


In federated authentication, WSO2 IS will not handle the authentication process. Thus it will be handled by an external applications such as Facebook, Google, Yahoo, Microsoft Windows Live etc. and send the response back to the Identity server. In this post I will guide you to use Facebook as federated authentication.

Step 01

Go to the URL https://developers.facebook.com/apps/ and login using your Facebook credentials. Add a new app using MyApps -> Add a new App. You will get the following popup window.
Click on the advanced setup to create the new application. Give the relevant information and click on Create App ID.


Then you will get an App ID and an App Secret for your app. Go to Settings tab and "Add a platform" as Web. Provide the site URL as https://localhost:9443/ ,  App Domain as localhost and save the changes.

Go to Advanced tab Client Auth Login and provide the Valid OAuth redirect URIs as https://localhost:9443/commonauth/

Step 02

Download WSO2 Identity Server from http://wso2.com/products/identity-server/ and start the server using wso2server.sh script located in <CARBON_HOME>/bin folder.

Add an identity provider with following configurations.

Basic information

Federated Authentication


Provide your Client ID and Client secret relevant to the created app. 

Claim configuration

Step 03

Add a Service provider using the following configurations.

Inbound authentication configuration > SAML2 Web SSO configuration

Basic information

Claim configuration

Local inbound and Authentication configuration

 

Step 04



Click on the first link (Click here to login with  SAML from WSO2 IS) and you will be redirected to Facebook login page. Login using Facebook credentials.


You will be now redirected to the travelocity application.