Posts

Showing posts from 2013

Install Liferay over a MySQL Database

Image
With this post I will share how to get started with Liferay Portal including initial configurations and login. Environment: Linux Pre-requisites : MySQL installation (Refer this post for steps to install MySQL ) Java 1.6 or above Let's download the Liferay pack from here . I got the Community Edition of bundle with Tomcat. Extract it to a folder of your choice, let's call the extracted folder LR_HOME. Ok, the resources are ready.. Let's go.. MySQL Login to MySQL. If you just installed following command will do. mysql -uroot -p Enter the password (default root). Create database to be used for Liferay. create database lportal; Create user for Liferay. create user 'lr_user'@'localhost' identified by 'user123'; Give access to the created database for this user. grant all privileges on lportal.* to 'lr_user'@'localhost' with grant option; Mysql work is over now. Let's go to Liferay. LifeRay Go

How to Write a Custom User Store Manager - WSO2 Identity Server 4.5.0

Image
With this post I will be demonstrating writing a simple custom user store manager for WSO2 Carbon and specifically in WSO2 Identity Server 4.5.0 which is released recently. The Content is as follows, Use case Writing the custom User Store Manager Configuration in Identity Server You can download the sample here. Use Case By default WSO2 Carbon has four implementations of User Store Managers as follows. org.wso2.carbon.user.core.jdbc.JDBCUserStoreManager org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager org.wso2.carbon.user.core.ldap.ReadWriteLDAPUserStoreManager org.wso2.carbon.user.core.ldap.ActiveDirectoryLDAPUserStoreManager Let's look at a scenario where a company has a simple user store where they have kept customer_id, customer_name and the password (For the moment let's not worry about salting etc. as purpose is to demonstrate getting a custom user store into action). So the company may want to keep this as it is, as there may be other serv

WSO2 Identity Server 4.5.0 - User Store Management

Image
In this post we will be going through the high level view of user management in WSO2 Carbon Products from Kernel 4.2.0 on. Specifically in WSO2 IS 4.5.0 which is based on this Kernel. These versions are armed with the capability to configure user stores at run time.  Org.wso2.carbon.user.core is the  OSGI component responsible for handling users in Carbon products. There we have the concept of 'User Realm' which is a collection of users with attributes. It consists of following four aspects, Use store management Authorization Management Claim management Profile configuration management You can get a clear picture of these 4 aspects from this blog, http://xacmlinfo.org/2012/06/21/user-core-concepts-in-wso2-identity-server/ . Here we will see into the improvements done in User Store Management aspects with the newly released version. It provides the capability to configure user stores at run time, even in a clustered mode as described in this previous post by myse

Cluster mode - User Store Management Configuration at Run Time

We can even simply try this out with following simple steps in WSO2 Identity Server . In the extracted pack go to,  CARBON_HOME/repository/conf/axis2/axis2.xml and enable clustering <clustering class="org.wso2.carbon.core.clustering.hazelcast.HazelcastClusteringAgent"                 enable="true"> CARBON_HOME/repository/conf/carbon.xml and set-up deployment synchronizer,  <DeploymentSynchronizer>         <Enabled>true</Enabled>         <AutoCommit>true</AutoCommit>         <AutoCheckout>true</AutoCheckout>         <RepositoryType>svn</RepositoryType>         <SvnUrl>http://svnrepo.example.com/repos/</SvnUrl>         <SvnUser>username</SvnUser>         <SvnPassword>password</SvnPassword>         <SvnUrlAppendTenantId>true</SvnUrlAppendTenantId> </DeploymentSynchronizer> This is our primary node in the cluster. Now take two copi

Deploying Identity Server over a JDBC Based User Store

Image
With this post I am to demonstrate how to configure WSO2 Identity Server with a JDBC user store. For the demonstration I am using a MySQL user store, but same procedure applies to any other JDBC user store as well. My environment is, OS - Ubuntu 12.10 Java - 1.6 WSO2 IS 4.5.0 Setting up MySQL database User Store Configuration in IS - Primary User Store Configuration in IS - Secondary (I am referring to extracted wso2is folder as CARBON_HOME in this post) Setting up MySQL database We need MySQL running at first. This post will be helpful in setting up the MySQL database , if it's not already done. Once MySQL is running we have to set up the database as required by the Identity Server. The server packs the necessary sql scripts within itself, which can be located at CARBON_HOME/dbscripts.  Let's login to MySQL server and execute the following, Create a database, mysql> create database JDBC_demo_user_store; Check out the creation, mysql> sho

Getting Started with MySQL

Image
This is a simple beginners guide to use MySQL in linux, from installation to querying the databases. Installation Login Databases and tables Installation First let's make sure our package management tools are up-to date. For that run the following commands in command line. sudo apt-get update sudo apt-get dist-upgrade Once it finishes update and upgrading, we can install MySQL with following command. sudo apt-get install mysql-server mysql-client This will take a moment to install and now we are ready to go.  Login At first start up MySQL server is not set up with a password for root and we can login with, mysql -u root -p If we are setting the password for the first time we can use following to set-up, mysqladmin -u root -p NEWPASSWORD   If we want to change a previously set password following command can be used, mysqladmin -u root -p'oldpassword' password newpassword Databases and Tables First we should login to MySQL server with, mysql

Implemention of Support for Mutiple User Store Configuration at Run Time (A touch on the Beauty of WSO2 Carbon Architecture)

Image
As I have shared in the previous post, WSO2 IS 4.5.0 version is released with added support for dynamic configuration of multiple user stores. While implementing this piece of component, I could touch some beautiful areas of WSO2 Carbon architecture,  which is known to be inherently dynamic and flexible. With this post I am to list those characteristics of Carbon platform that came handy in this implementation.The content of this post is, How dynamic User Store Configuration happens Carbon characteristics that facilitated rapid development How dynamic User Store Configuration happens Following figure highlights the flow of a new user store configuration. The super admin or tenant admin can add user stores through the UI, to own domain. We have allowed dynamic configurations only for secondary user stores and 'Primary' user store is not configurable at run time. This was because it is available for all tenants and allowing changes to it's configurati

WSO2 Identity Server 4.5.0 brings support for dynamic configuration of multiple user stores

Image
WSO2 Identity Server 4.5.0 is going to be released by the end of this month, with a new set of features and lot of improvements to the existed features. Allowing dynamic configuration of multiple user stores is one such new addition in this release, that improves the flexibility of the server to cater changes in the production environments. This feature comes in handy when a requirement occurs to add more user stores, change some attributes of an existing user store or remove a user stores from the existing ones. With this new user store configuration UI, above scenarios can be executed smoothly and burden of editing XML files is taken away. This operates in dynamic manner that no server restart is required and changes are effective in few seconds. Here are few screen-shots of the UI to be released. The default view of user store configuration UI(Configure>User Store Management) will be as follows, when there are no secondary user stores added. (we will refer all the user

How to Install Windows in a Virtual Machine in Linux(Ubuntu)

Recently I wanted to run Windows inside my Primary OS -  Ubuntu 12.04. I didn't want to go for dual boot option so I decided to use a virtual machine and install Windows inside Ubuntu. I faced couple of problems and here share my experience with how I overcame them. In choosing a Virtual machine I tried out 2 options. Oracle VM VirtualBox and VMware Player that is available in Ubuntu Software Centre. I could create a virtual machine successfully hitting 'new' button and following the wizard. Then I started the created machine, pointing to the CD image. It tried to load Windows files and then printed the following error on screen. Attempting to load a 64-bit application, This CPU is not compatible with 64-bit mode. But my machine has a 64 bit processor. So something has gone wrong. The issue has been my BIOS settings in the host machine has not enabled hardware virtualization. So I manually did it. My machine was a Lenovo ThinkPad T530 and could find this settin

Hadoop Multi Node Set Up

   With this post I am hoping to share the procedure to set up Apache Hadoop in multi node and is a continuation of the post,  Hadoop Single Node Set-up . The given steps are to set up a two node cluster which can be then expanded to more nodes according to the volume of data. The unique capabilities of Hadoop can be well observed when performing on a BIG volume of data in a multi node cluster of commodity hardware.    It will be useful to have a general idea on the  HDFS(Hadoop Distributed File System) architecture which is the default data storage for Hadoop, before proceed to the set up, that we can well understand the steps we are following and what is happening at execution. In brief, it is a master-slave architecture where master act as the NameNode which manages file system namespace and slaves act as the DataNodes which manage the storage of each node. Also there are JobTrackers which are master nodes and TaskTrackers which are slave nodes.    This  Hadoop doc