Sergeonclear

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Wednesday, November 14, 2007

Single Sign on - OpenSSO

Posted on 11:54 PM by Unknown
Single Sign on using OpenSSO.

OpenSSO was earlier called as access manager.
OpenFM is openSSO + federation (Cross domain support?)

It was a herculian effort to get it going with openfm/OpenSSO.

  1. Access Manager(opensso/openfm) configuration:
Mainly it seems to be having bugs in the user interface of the webapp it provides.
  • First thing I came across when deploying the openfm.war on linux was as below:

  • -First time when we go to http://localhost:8080/openfm and try to
    configure the openfm, it gives a error with no stack trace nothing . It
    misleads you with a path to log file which you can find in their(sso
    developers) dreams.GRRRR.
  • Had to search around
    in Red hat linux Enterprise edition 5. Later figured that it creates a
    folder with name @BASEDIR@ under tomcat/bin/... Who can imagine a
    cryptic folder for logging sso errors that too under tomcat/bin/...
    Wasted almost 1.5 days on that ....
  • In another version of linux, the above didn't work out. It was in tomcat logs catalina.out. Lucky!!
  • The
    problem usually tends to be due to wrong JDK. The Sun JCE comes as
    default with Sun JDK but not with IBM JDK. The Sun JCE is used for
    encryption of password by open SSO.

  • Another important thing. First time you setup access manager you should
    be careful. Next time, if you try setting it up(by deploying new
    openfm.war) , it complains. Under windows u can simply delete the
    access manager folder created during installation (default is C:\Doc and settings\user name\)...
  • Under linux it should be somewhere under /home/ by default. Search using locate access manager. The custom path would be the one which you setup openSSO using Configurator.jsp.
  • If
    you mess up access manager by configuring authentication chain or data
    store, the work around is use the default module=DataStore as URL parameter eg: http://localhost:8080/openfm/UI/Login?module=DataStore
Then you can login as amAdmin
  • By
    default the openfm ships with set of authentication plugin like JDBC,
    LDAP based , etc .Our requirement needed to compare the user entered
    auth password with MD5 encrypted password. Hence had to build a custom
    authentication plugin. Luckily sun provide service provider
    interface(SPI).Implementing this was a major effort as there is hardly
    any documentation or forum talking about it.Took a short cut by
    extending the sun provided com.sun.identity.authentication.modules.jdbc.JDBC.java
    and over riding transform() method. It works smooth

To add a custom authentication plugin, follow the below steps:
  1. Move the custom

    authentication jar which you wrote (opensso_xmp_plug_v1.0.1.jar) into
    the ~/openfm/WEB-INF/lib folder.All the related property files should
    be on class path.


  1. Copy the custom
    Authentication JDBC configuration file. amAuthxmpJDBC.xml into ~/openfm/WEB-INF/classes
    folder.Refer amAuthJDBC.xml in the same folder for creating a similar one for your custom auth module.

  1. Register the module in
    serviceNames.properties abailable under openfm/WEB-INF/classes to have
    amAuthXMPJDBC.xml. (Add amAuthxmpJDBC.xml at the end)

  1. Copy XMPJDBC.xml into ~/openfm/config/auth/default
  2. Restart tomcat.
  3. Login to Access Manager, Goto
    Configuration
    -- Authentication --Core
  4. Enter com.xmp.security.plugin.XMPJDBC as New Value and click on Add to configure
    the new service.
  5. Go to Access Control and
    select the realm (opensso). Click on Authentication > Module Instances
    and Add the previously configured XMPJDBC module to the authentication
    chain as shown below: Save the information.
  6. Now the Login of opensso will use xmpJDBC module as default for
    authentication. If you want to login with the amAdmin user,
    module=DataStore need to be added to login URL (like
    http://localhost/openfm?module=DataStore)
  7. Login with a valid userId and password (sample xello@xello.com/xello)
    The user is taken to the successful login page.

NOTE:
  • Once a user is logged in successfully, the access manager by default
    looks for the user's profile through Id repo. This is the default
    behaviour. This can be over ridden by setting the property in
    realm(opensso) -- Authentication -- Advanced (look profile) to ignored.

  • Using custom com.sun.identity.agents.filter.SSOTaskHandler class, we can
    insert a session attribute which is used by the SSO agent/application
    for auto login (discussed later , for now agent is like a client to
    open sso). The sample code is below:
public class SSOTaskHandler extends AmFilterTaskHandler implements ISSOTaskHandler
{...
public AmFilterResult process(AmFilterRequestContext amfilterrequestcontext) throws AgentException
{

.........
amfilterrequestcontext.getHttpServletRequest().getSession().setAttribute("SSO_VALIDATION_RESULT",ssovalidationresult);
.............
}
........
}



TODO: J2EE agent
The agent J2ee 007 would be hiding in the web application root web.xml(as AmAgentFilter) to provide secured access. ;)
AMAgent.properties is where the whole good behaviors of the badly behaving J2ee agent is configured. This is generated by amadmin tool and updated later. Check it below for only the important parameters to manually update
----------------------------------------------------------------------------------------------------------

#
# CDSSO PROCESSING PROPERTIES
com.sun.identity.agents.config.cdsso.enable = true
com.sun.identity.agents.config.cdsso.redirect.uri = /agentapp/sunwCDSSORedirectURI
com.sun.identity.agents.config.cdsso.cdcservlet.url[0] = http://172.20.41.39:6060/openfm/cdcservlet
com.sun.identity.agents.config.cdsso.clock.skew = 0
com.sun.identity.agents.config.cdsso.trusted.id.provider[0] = http://172.20.41.39:6060/openfm/cdcservlet

#
# LOGOUT PROCESSING PROPERTIES
com.sun.identity.agents.config.logout.application.handler[] =
com.sun.identity.agents.config.logout.uri[DefaultWebApp] =/web/xmpXMS/logout
com.sun.identity.agents.config.logout.request.param[] =
com.sun.identity.agents.config.logout.introspect.enabled = false
com.sun.identity.agents.config.logout.entry.uri[DefaultWebApp] =/web/xmpXMS/home
#
# NOT-ENFORCED URI PROCESSING PROPERTIES
# - notenforced.uri: A LIST of URIs for which protection is not enforced
# by the Agent.
# - notenforced.uri.invert: A flag that specifies if the list of URIs
# specified by the property notenforced.uri should be inverted. When
# set to true, it indicates that the URIs specified should be enforced
# and all other URIs should be not enforced by the Agent. Entries in
# this list can have wild card character '*'.
# Example of notenforced.uri:
# com.sun.identity.agents.config.notenforced.uri[0]=*.gif
# com.sun.identity.agents.config.notenforced.uri[1]=/public/*
# com.sun.identity.agents.config.notenforced.uri[2]=/images/*
#
com.sun.identity.agents.config.notenforced.uri[0] =
com.sun.identity.agents.config.notenforced.uri.invert = false
com.sun.identity.agents.config.notenforced.uri.cache.enable = true
com.sun.identity.agents.config.notenforced.uri.cache.size = 1000

#
# DEBUG SERVICE PROPERTIES
# - com.iplanet.services.debug.level: Specifies the debug level to be used.
# The value is one of: off, error, warning, message. ******** Funny thing, debug is missing but it actually is very useful for developers********
com.iplanet.services.debug.level=debug
--------------------------------------------------------------------------------------------------------------

TODO: Web Agent







Powered by ScribeFire.

Email ThisBlogThis!Share to XShare to Facebook
Posted in Single Sign on - OpenSSO with Liferay | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • LinuxPerformance Tuning(apache,tomcat,linux) and related
    Web profiling -- HTTPAnalyzer -- -- YSlow --CSS,Javascript report , time/size measurement for individual component is good. -- F...
  • (no title)
    Hardware/Software stack:  iPhone 3Gs having iOS 5.1.1(latest as of today).  The Xcdode 4.2 failed to detect this iphone as it has support on...
  • Spring interceptor ordering
    SimpleUrlHandlerMapping uses a hashMap to hold the interceptors. Ordering can only be guaranteed by setting  order property.. By default it ...
  • SVN/ Subversion Tips and traps
    SVN could be tricky and waste a hell lot of time. Case Issue : Normally we run SVN server in linux. Our dev env will be in windows NT. Windo...
  • Liferay CMS/ web content management/ workflow/ staging
    Liferay out of the box has a web content management system. The web pages can mostly have these web content (articles) as web pages. The web...
  • Cobertura- junit coverage tool
    First, you need to add a task definition to the build.xml file. This top-level taskdef element specifies that the cobertura.jar file is i...
  • XSLT caching Transformers
     The usage of cached transformer objects is recommended here A sample implementation of CachingTransformerFactory is here The above code abs...
  • Rewrite rules in apache and IIS
    Well we can control how the server serves stuff to clients by defining rewrite rules. As servers are dumb, its important to explain well abo...
  • Real-Time Tracking and Tuning for Busy Tomcat Servers
    A very nice article which details on possible options for tomcat server monitoring to tweak its performance. http://www.devx.com/Java/Articl...
  • External Javascript from Java Servlets
    Copied from http://myappsecurity.blogspot.com/2007/01 Like to thank anurag for the content. /breaking-same-origin-barrier-of.html External ...

Categories

  • AJAX javascript
  • All about UK Visa HSMP VS H1
  • All about UK Visa HSMP VS H1 hsmp assistance
  • amazon
  • android apps ship control radio hindi
  • Apache 2.x setup Quick guide for Linux
  • apache commons configurator usage
  • apache commons usage
  • arsenals for developers
  • article
  • Batch script to load developer environment
  • Blind folded chess
  • Castor castor convert dtd to xsd
  • cloud comparision price
  • cloud comparison blog
  • cloud computing monthly price
  • cloud usage
  • Cobertura- junit coverage tool
  • Code generators
  • cron jobs expressions
  • cruisecontrol cruise control
  • debugging eclipse tips
  • developer tools
  • document library
  • easy mock jmock vs mocking java tdd
  • External Javascript from Java Servlets
  • fedora 9 lenovo 3000 n200 windows xp dual boot problem
  • Fire fox plugins and tweaks
  • Free PHP hosting
  • gods debris the religion war scott adams dilbert
  • google app engine
  • gwt javascript
  • hibernate second level cache
  • i18n locale localization internationalization spring liferay portlet locale
  • ibatis sybase mapping
  • image gallery
  • iphone apps bri8 apple
  • iphone shsh 3gs ipsw downgrade ifaith tinyumbrella ios5.1.1 to ios5.0
  • java
  • java JDBC
  • javascript junit testing
  • Javascript trouble shooting tool
  • Jboss overview
  • jmeter load testing custom java sampler javasamplerclient xml test
  • JNDI test JSP page
  • Joomla CMS
  • JProfiler setup jprofiler on linux
  • jquery IE AJAX issues
  • jquery spring AJAX
  • keyboard music java typing soothing notes auto suggest
  • liferay kids version
  • liferay web 2.0 java/j2ee
  • linux - the difference between hard and soft links
  • linux mysql
  • linux mysql setup quick start
  • Linux ssh autologin with putty
  • LINUX usefuls
  • linux)
  • LinuxPerformance Tuning(apache
  • log4j setup useful
  • lucene solr
  • mac m701 android skype not working crash
  • maven
  • maven cut reduce build time
  • microsoft ODBC oracle dll connection issues
  • Mobile Ad Services (adwhirl)
  • opsourcecloud
  • oracle connect by hierarchy
  • oracle table previlege
  • Oracle thin vs OCI(type II/thick) drivers
  • pdf 2 text
  • Pega PRPC
  • php
  • rackspacecloud
  • Rewrite rules in apache and IIS
  • scaffold
  • setting up a static ip on SKY broadband
  • setup quick start
  • Single Sign on - OpenSSO with Liferay
  • smart gwt
  • smtp email test mock server james
  • SMTP MAIL telnet windows
  • Software tools mind map freemind j2ee tools
  • Speed typing tips.
  • Spring + Hibernate Usefuls BaseDAOHibernate
  • Spring annotations with spring-mock not working 2.0 2.5.6
  • spring jndi datasource lookup
  • Spring portlet mvc and spring servlet mvc validation
  • Spyware trojan and virus removal tools
  • struts magic
  • SVN/ Subversion Tips and traps
  • tabbed ms dos console cygwin console
  • Texter - An auto text expander autotyper
  • Textpad tricks
  • The art of debugging
  • tomcat
  • Tomcat Exploded war - cut deployment time
  • Tomcat on linux tips
  • Tomcat on linux tips commands
  • TypeIt4Me
  • Typinator
  • Useful Eclipse Plugins
  • Useful Eclipse Plugins eclipse shortcuts keys
  • Useful tools
  • web content
  • xcode cocos2d iphone box2d
  • xpath xml xquery

Blog Archive

  • ►  2013 (19)
    • ►  August (17)
    • ►  July (1)
    • ►  January (1)
  • ►  2012 (7)
    • ►  August (1)
    • ►  June (4)
    • ►  April (2)
  • ►  2011 (20)
    • ►  November (1)
    • ►  October (1)
    • ►  August (1)
    • ►  July (3)
    • ►  June (1)
    • ►  April (2)
    • ►  March (4)
    • ►  February (1)
    • ►  January (6)
  • ►  2010 (27)
    • ►  December (3)
    • ►  July (2)
    • ►  May (3)
    • ►  April (2)
    • ►  March (5)
    • ►  February (10)
    • ►  January (2)
  • ►  2009 (32)
    • ►  December (5)
    • ►  November (2)
    • ►  September (3)
    • ►  August (6)
    • ►  June (4)
    • ►  May (4)
    • ►  April (3)
    • ►  March (2)
    • ►  February (3)
  • ►  2008 (28)
    • ►  December (1)
    • ►  October (2)
    • ►  September (2)
    • ►  August (4)
    • ►  July (7)
    • ►  June (1)
    • ►  April (2)
    • ►  March (2)
    • ►  February (2)
    • ►  January (5)
  • ▼  2007 (24)
    • ►  December (3)
    • ▼  November (2)
      • Spring + Hibernate Usefuls
      • Single Sign on - OpenSSO
    • ►  October (6)
    • ►  September (1)
    • ►  August (3)
    • ►  July (8)
    • ►  June (1)
Powered by Blogger.

About Me

Unknown
View my complete profile