IDM is core API.
I need to create Web Application according to my need which will use IDM and IDM will store identity in DB.
so i need DB to maintain identity.
i need to use LDAP or DB for authentication in SSO.
so if i use LDAP i need to keep updating LDAP based on user creation/activation/deactivation.
IDM is mainly a framework that expose API to manage identities such as users, groups or roles that can be stored in different stores. You can create stores federation like with LDAP and DB - store part of groups and users in LDAP and other groups and roles in DB. IDM doesn't provide SSO but it is fairly easy to use it for authentication using standard JAAS mechanism (LoginModule - look at this example that can be deployed into JBoss AS 5.1: http://anonsvn.jboss.org/repos/picketlink/idm/tags/1.1.1.GA/example/auth/)
1> DB SCRIPT is required or DB will be created automatically from hbm file. or need to use some tool?
2> i need to setup idm-config.xml & hibernate.cfg.xml as described.
3> How do i initiate IDM from main() and create some sample entry of user,roles and groups ??
if any code snippet.
i also have other questions to ask but let me first have clear idea of possibility.
any suggestion and thoughts are welcome
i really appreciate core framework and initiative taken by members of Picketlink
1) DB schema can be created by hibernate. Mapping xml files are bundled inside picketlink-idm-hibernate jar.
2) Yes, those two files are enough to start
3) Please look at this example maven project: http://anonsvn.jboss.org/repos/picketlink/idm/tags/1.1.1.GA/example/simple/ This is the best place to start and experiment with the API. For example this test case provides quite rich example of how IDM API can be used: http://anonsvn.jboss.org/repos/picketlink/idm/tags/1.1.1.GA/example/simple/src/test/java/org/picketlink/idm/example/DBTestCase.java
I will try to come with more tutorials and better documented examples soon.
i have started with sample u have given but i found error.
i am using MYSQL DB
Caused by: org.hibernate.MappingException: Could not determine type for: org.hibernate.type.PrimitiveByteArrayBlobType, at table: jbid_attr_bin_value, for columns: [org.hibernate.mapping.Column(VALUE)]
... 4 more
Could you share which version of mysql are you using and what kind of changes did you make to configuration in samples?
i found hibernate annotation jar was not preset and
i have change it to MySQL5Dialect and its working fine now.
thnx once again.
here is a Question if u can help.
when i add user in IDM i need some id to be generated along with it
actually i need to maintain userid(LONG) in many of application for entity association.
but i found there is no such facility so may be i need to use some sequence to get and add as attribute?
You will have two separate unique user ids - one String and one Long then... Maybe try to come up with some String<->Long encoding to be able to recreate IDM user name to avoid keeping those in sync?