cancel
Showing results for 
Search instead for 
Did you mean: 

How to make SSO works with Activiti and open am

penusila611621
Champ in-the-making
Champ in-the-making
Hi All,

I have configured the open am stuff as authentication mechanism to activiti explorer and activiti rest application.  this cofiguration is working as below

1) open am login page is thrown when I try to access activiti explorer url
2) again activiti explorer login page is coming up upon successful authentication in step 1
3) open am is running on tomocat & Activiti app & rest are running in separate jboss eap
4) both open am & activiti are pointed to same ldap through open dj ldap

I want activiti login page should be skipped of through sso mechanism. Please anybody let me know how to pass autheticated token to activiti app to use and skipe the login action.
6 REPLIES 6

penusila611621
Champ in-the-making
Champ in-the-making
any inputs please

jbarrez
Star Contributor
Star Contributor
This is a very specific question … And my knowledge of openam is limited … But my gues is that you will need to override the default classes in explorer, to catch the unauthenticated user and redirect.

penusila611621
Champ in-the-making
Champ in-the-making
Thanks jbarrez.

Have removed the existing authentication and coded openam specific and it's working fine.

jbarrez
Star Contributor
Star Contributor
Perfect. Would be cool if you could describe a bit in detail the steps you did to get there!

penusila611621
Champ in-the-making
Champ in-the-making
How to disable default auhtentication in Activiti rest
……………………………………………………………….
1. Implement RestAuthenticator.java by overrride requestRequiresAuthentication and isRequestAuthorized methods and make them to return always false.
2. if (authenticate() == false) line of code in all the rest api related resources will not attempt authentication because if(restAuthenticator != null && !restAuthenticator.requestRequiresAuthentication(request)) { piece of code in ActivitiRestApplication java class returnds true which make sure the line boolean authenticated = super.authenticate(request, response); never executes. This only only does the actual authentication in rest api

3. Corresponding classes in achieving the code should be overridden and web.xml should contain the extension class of ActivitiRestApplication

Now the openam part
………………………………
1.  Follow the below links to use open am authentication in rest application.
https://wikis.forgerock.org/confluence/display/openam/3+OpenAM+Server+Configuration#id-3OpenAMServer...
http://openam.forgerock.org/openam-documentation/openam-doc-source/doc/jee-install-guide/index/chap-...

2. After following the steps given in the above links, any rest call tries to access rest application will go through the open am authentication web page


jbarrez
Star Contributor
Star Contributor
Thank you for writing this down for the generations to come!