ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » Workflow Engines - IBM MQ Workflow & Business Process Choreographer » [SOLVED]WebClient + Logon4 -- configure/code the webclient?

Post new topic  Reply to topic
 [SOLVED]WebClient + Logon4 -- configure/code the webclient? « View previous topic :: View next topic » 
Author Message
ben harris
PostPosted: Thu Aug 07, 2003 8:15 am    Post subject: [SOLVED]WebClient + Logon4 -- configure/code the webclient? Reply with quote

Novice

Joined: 25 Jun 2003
Posts: 19

I would like my WebClient to use one of the authentication logon methods when accessing my WFEngine. I don't want to use my WebServers BasicAuthentication. I would like the Logon.jsp to take the username and password and pass them to my Engine where the AuthExit will do the rest.

How do I configure my WebClient so that it uses the secure logon method over the unsecure (for example, use logon4 rather than logon2)?
It appears that the webclient uses either logon or logon2 by default, I'd like to change this but I am stuck.

I can't figure out which(if any) class I might need to override or whether I need to simply make some change in the webClient.properties file.

Thanks for any help.
Ben.
Back to top
View user's profile Send private message
vennela
PostPosted: Thu Aug 07, 2003 12:23 pm    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

I think what you are trying to do is achieved by Authentication Exit. Instead of Workflow authenticating the user, your Authentication Exit would validate the user credentials and return a corresponding workflow user.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ben harris
PostPosted: Thu Aug 07, 2003 12:42 pm    Post subject: Reply with quote

Novice

Joined: 25 Jun 2003
Posts: 19

Yes, your correct.
The AuthExit defined for my Workflow Server will validate the user. Tested and works like a champ.

But the AuthExit is only invoked when you logon using the Logon3() or Logon4() method. The other two methods validate using the definitions of a user within the Workflow Server.

The web client uses either the Logon() or Logon2() method by default.
I need to change that so the web client will attempt to logon and invoke the Workflow Server AuthExit to validate the user.

Any ideas?

I was thinking I might be able to either define a new CommandAdaptor or create a new Handler but I am not sure where to start. And I am not sure if that is the right direction. It seems like a lot of work just to get the webclient to access the workflow server using an authexit logon method.

This also assumes that the fmcohcli.jar has the logon object/method(?) coded so that it is possible to switch over from a Logon() to a Logon3().

Ben.
Back to top
View user's profile Send private message
jmac
PostPosted: Thu Aug 07, 2003 1:09 pm    Post subject: Reply with quote

Jedi Knight

Joined: 27 Jun 2001
Posts: 3081
Location: EmeriCon, LLC

Ben:

I think the issue is that you will need to write the getCredentials method in a command handler... When this method returns non-null Thin client does a logon4 otherwise it does a logon2

GOOD LUCK
_________________
John McDonald
RETIRED
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
ben harris
PostPosted: Fri Aug 08, 2003 7:32 am    Post subject: Reply with quote

Novice

Joined: 25 Jun 2003
Posts: 19

I did it. It was a lot easier then I thought.
Here is what I did for anyone who is referencing this thread for this info.
step1: Create a new handler. Below is my complete code:
package com.ben.workflow.servlet;
import java.beans.PropertyVetoException;
import javax.servlet.http.HttpServletRequest;
import com.ibm.workflow.servlet.client.ClientException;
import com.ibm.workflow.servlet.client.Config;
import com.ibm.workflow.servlet.client.GenericCommandHandler;
public class AuthenticationHandler extends GenericCommandHandler {
public byte[] getCredentials(HttpServletRequest req) throws ClientException
{
String user = req.getParameter("userID");
if ( user == null ) {
ClientException ce = new ClientException( req, "UserId is null");
throw ce;
}
String pwd = req.getParameter("password");
if ( pwd == null ) {
ClientException ce = new ClientException( req, "Password value is null");
throw ce;
}
// ----> This string format is specific to my personal AuthExit implementation
byte[] credBytes = (new String("User:" + user + ";PassWord:" + pwd)).getBytes();
return credBytes;
}
public void init(Config config)
{
super.init(config);
}
}

step 2: update the webclient.properties file:
....
[CommandHandlerAdapter]
com.ben.workflow.servlet.AuthenticationHandler = 0

step 3: restart webshpere. And access the server from the same Logon.jsp you were using before. (No changes required to the Logon.jsp)

And BAM! there it is.
Why did I do this? Iam using MQWF 3.3.2 and I don't want manage my users from build time. So I have an LDAP instance which shadows the employee database and caches just a subset of those users -- the workflow users. My LDAP is regularly checked and updated automatically. When an update occurs a new FDL file is generated which contains just users. That FDL is imported to my server. This also allows me to just focus on the user base and the users can manage their own passwords in the LDAP tree and I don't have to do it from the buildtime.

Thanks for the help.

Ben.
Back to top
View user's profile Send private message
vennela
PostPosted: Fri Aug 08, 2003 10:17 am    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

That information helps

Quote:
When an update occurs a new FDL file is generated which contains just users. That FDL is imported to my server.


How did you do this. Did you use LDAP bridge to do this or is it your home grown application that will do the task for you.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ben harris
PostPosted: Fri Aug 08, 2003 10:27 am    Post subject: Reply with quote

Novice

Joined: 25 Jun 2003
Posts: 19

I am not using the LDAP bridge. When I upgrade to version 3.4 I will look into using that feature.

I have a home grown tool that analyzes the LDAP tree structure and generates the FDL. It's some very short code as it lent itself well to some recursive programming. It's not flexable beyond my needs though. It serves me very well, but it wouldn't do much good to someone who requires strict roles or something.

Ben.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » Workflow Engines - IBM MQ Workflow & Business Process Choreographer » [SOLVED]WebClient + Logon4 -- configure/code the webclient?
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.