Skip to main content

Posts

Showing posts from July 9, 2015

WSO2 Products - How User Stores work

Today we keep our users and profiles in several forms. Some times they are in a LDAP. Some uses Active Directory (AD). Some uses databases and etc. WSO2 Products are written in a way any of these format could support. If some one have their own way of storing users and any one can easily plug them in to WSO2 products by just writing a custom user store. In this post I will explain how these user stores works and the other components connected to them. When we discuss about user management in WSO2 world, there are several key components. They are User Store Manager Authorization Manger Tenant Manager In simple user management we need to authorize some user to some action / permission. Normally we group these actions / permissions as groups and assign these groups / roles to users. So there are two kind of mappings that we need to consider. They are User to Role Mapping Role to Permission Mapping User to Role Mapping is managed by user store implementation and Role to Perm

How to include artifactid in a folder or file name or content of a file in a maven archetype.

When we create maven archetypes, specially the multi module ones, we might need to include the artifact id in to a folder or file name or include it to a content of a file. This can be done very easily. To include artifactid to a folder or file name you just have to add the place holder __rootArtifactId__ . **Note that there are two '_' characters before and after the word rootArtifactId. So for example if  you want a file name like -development.xml, then you can simply name it as __rootArtifactId__-development.xml. When file name is mentioned like this inside the archetype, when you run archetype generate command it will replace with the artifactid provided. Next thing is how to include this inside a file. This was tricky. I couldn't find a way to do it first. So I keep trying things and it works and it's simple. You can simply add the place holder ${rootArtifactId} . In the same pattern you can use other parameters like version as well by using __version