From portal-commits at lists.jboss.org Tue Jan 30 17:33:12 2007 Content-Type: multipart/mixed; boundary="===============0503837634035200752==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r6128 - docs/trunk/referenceGuide/en/modules. Date: Tue, 30 Jan 2007 17:33:12 -0500 Message-ID: --===============0503837634035200752== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: bdaw Date: 2007-01-30 17:33:11 -0500 (Tue, 30 Jan 2007) New Revision: 6128 Added: docs/trunk/referenceGuide/en/modules/authentication.xml docs/trunk/referenceGuide/en/modules/identity.xml docs/trunk/referenceGuide/en/modules/sso.xml Log: some initial work on identity, and placeholders for authentication and sso = chapters Added: docs/trunk/referenceGuide/en/modules/authentication.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- docs/trunk/referenceGuide/en/modules/authentication.xml = (rev 0) +++ docs/trunk/referenceGuide/en/modules/authentication.xml 2007-01-30 22:3= 3:11 UTC (rev 6128) @@ -0,0 +1,12 @@ + + + + Boleslaw + Dawidowicz + boleslaw.dawidowicz at jboss dot com + + + Authentication + This chapter describes authentication mechanisms in JBoss Portal<= /para> + = + Added: docs/trunk/referenceGuide/en/modules/identity.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- docs/trunk/referenceGuide/en/modules/identity.xml = (rev 0) +++ docs/trunk/referenceGuide/en/modules/identity.xml 2007-01-30 22:33:11 U= TC (rev 6128) @@ -0,0 +1,410 @@ + + + + Boleslaw + Dawidowicz + boleslaw.dawidowicz at jboss dot com + + + JBoss Portal Identity management + This chapter addresses identity management in JBoss Portal 2.6 + + Identity management API + In JBoss Portal currently there are 4 identity modules and 2= identity reletad objects. The goal about + having such wide API is to + enable flexible implementations related to different underlayi= ng technologies like RDBS or LDAP. With such + data storage mechanisms things like + User/Role relationship are defined in slightly different way. = Another thing is User Profile where + information about user can be grabbed from database + column or LDAP entry or even mixed. + + + + + User + interface which exposes such operations on User object: + + + + + + Important Note!!! Proper usage of getId() method is: + + + + This is because of that ID depends on User implementat= ion. It'll probably be String in LDAP and Long + in Hibernate but it can be anything else... + + + + + + Role + interface which exposes such operations on + User + object: + + + + + + + + UserModule + interface which exposes operations for users management + + + + + + + + RoleModule + interface which exposes operations for roles management + + + + + + + + MembershipModule + interface which exposes operations for obtaining or de= fining relationship beetween users and roles. + The role of this module is to + decouple relationship information from user and roles.= Whith different implementations definition of + such relationship can be specified on different sides. + With Relational DB it's quite simple, but in LDAP ther= e are several ways to store such information. + Role of this module is to bring flexibility + in defining contract beetween user and role. + + + + + + + + UserProfileModule + interface which exposes operations to access informati= ons stored in User profile. + + + + + + UserProfileModule?.getProperty() method returns Object. + In most cases with DB backend it will always be String= object. But normally you should check what + object will be retreived using getProfileInfo() method. + + + + + ProfileInfo + interface which can be obtained using + UserProfileModule + and exposes information about User profile properties = that are accessible: + + + + + + + + PropertyInfo + interface expose methods to obtain information about a= ccessible property in User profile + + + + + + + + + + Way to access identity modules + + The best way to access identity modules is by using JNDI: + + + import org.jboss.portal.identity.UserModule; + import org.jboss.portal.identity.RoleModule; + import org.jboss.portal.identity.MembershipModule; + import org.jboss.portal.identity.UserProfileModule; + + [...] + + (UserModule)new InitialContext().lookup("java:portal/UserM= odule"); + (RoleModule)new InitialContext().lookup("java:portal/RoleM= odule"); + (MembershipModule)new InitialContext().lookup("java:portal= /MembershipModule"); + (UserProfileModule)new InitialContext().lookup("java:porta= l/UserProfileModule"); + + + + Another way to do this is, if you are fimiliar with JBoss = Mikrokernel architecture is by obtaining + IdentityServiceController + mbean. You may want to inject it into your mbean like this: + + + portal:service=3DModule,type=3DIdent= ityServiceController]]> + + + or simply obtain in your code using + portal:service=3DModule,type=3DIde= ntityServiceController + name. Please refer to JBoss Application Server documentati= on if you want to learn more + about MBeans. Once you obtained the object you can use it: + + + + (UserModule)identityServiceController.getIdentityContext()= .getObject(IdentityContext.TYPE_USER_MODULE); + (RoleModule)identityServiceController.getIdentityContext()= .getObject(IdentityContext.TYPE_ROLE_MODULE); + (MembershipModule)identityServiceController.getIdentityCon= text().getObject(IdentityContext.TYPE_MEMBERSHIP_MODULE); + (UserProfileModule)identityServiceController.getIdentityCo= ntext().getObject(IdentityContext.TYPE_USER_PROFILE_MODULE); + + + + + API changes since 2.4 + Because in JBoss Portal 2.4 there were only + UserModule + , + RoleModule + , + User + and + Role + interfaces some API usages changed. Here are the most impo= rtant changes you will need to aply to your + code + while migrating your aplication to 2.6: + + + + + User + interface + + + + + + + + RoleModule + interface + + + + + + + + + = + + Added: docs/trunk/referenceGuide/en/modules/sso.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- docs/trunk/referenceGuide/en/modules/sso.xml (r= ev 0) +++ docs/trunk/referenceGuide/en/modules/sso.xml 2007-01-30 22:33:11 UTC (r= ev 6128) @@ -0,0 +1,13 @@ + + + + Boleslaw + Dawidowicz + boleslaw.dawidowicz at jboss dot com + + + Authentication + This chapter describes how to setup SSO in JBoss Portal + = + + --===============0503837634035200752==--