Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login




Remember Me
Forgot Password?
Join Us!

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Donate Today!

Do you enjoy these
technical forums?
Donate Today! Click Here

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.
Jobs from Indeed

Link To This Forum!

Partner Button
Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

cdfly (Programmer) (OP)
2 Feb 12 10:30
Hello,
I have a module that is used to upload multiple files, the HTML page uses an applet that does the file uploading and it also uses its own certificate to connect to the server.
The problem I'm having is that when I look under the Audit properties for the file after it's been uploaded it shows the user name in the cert not the Livelink user as the user who uploaded the files.
Is there a way to change the user name in our module before it gets added to the audit?

Thanks
 
appnair (Programmer)
2 Feb 12 10:33
Perhaps you have Livelink Directory services so it is authenticating based on REMOTE_USER.If the cert user is a SA in livelink you can get the session as the cert user and then use lapi or EWS impersonation to any user who has rights to create files.

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
http://www.tek-tips.com/faqs.cfm?fid=2884
http://www.linkedin.com/in/appunair

cdfly (Programmer) (OP)
2 Feb 12 10:42
Thanks appnair,
Do you know of any samples that show how to impersonate a user?

  
appnair (Programmer)
2 Feb 12 10:57
in what if it is lapi

Here's how session is invoked in java

CODE

LLSession suSession=new LLSession (Server, Port, DFT, "Admin","password");
//make a livelink api call jsut here like access enterprisews
//so you know it is hitting livelink
//we want to impersonate a guy in livelink
LLSession userSession=suSession.impersoanteuser("appu");
//make a livelink api call just here like access enterprisews
//so you know it is hitting livelink
LAPI_DOCUMENTS doc;
//invoke a session using that
  doc = new LAPI_DOCUMENTS (userSession);
//at this point all ctivities that you do in lapi is going to be reported as being done by appu provided he has access to do it.I used Admin in my above code but any user wh has SA privs can do it.

I did not test the above but bits and pieces from earlier code.In EWS also it is almost the same.

Session control is not this easy when you are using TUNNELING as livelink will ignore what you set in code if dirsvcs is employed and will always do based on REMOTE_USER hence to do impersonation you want a livelink server who does not look for REMOTE_USER

Let me know if you use session based on lapi port or webserver port,if it is lapi port you have better luck :)

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
http://www.tek-tips.com/faqs.cfm?fid=2884
http://www.linkedin.com/in/appunair

cdfly (Programmer) (OP)
2 Feb 12 11:04
Great - thanks for the code.
Could I do this in the module, once the uploads get to the module could I then create a new session like you've described and pass the prgCtx to the other Livelink methods?  
appnair (Programmer)
2 Feb 12 11:19

If you are getting this in oscript you have the same methods there as well.LAPI ,EWS everything is oscript finally

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
http://www.tek-tips.com/faqs.cfm?fid=2884
http://www.linkedin.com/in/appunair

cdfly (Programmer) (OP)
2 Feb 12 11:27
Cool - Thanks for help. I guess it would be the easiet to do it inside the mod instead of the applet because my applet uses a socket to make the connection and do the uploads, I'm not sure how hard it would be to make the changes inside my java code.

I did see the LL_SessionAllocFromCookieEX method in LAPI but I don't suppose there's an easy way of just casting that to a Java socket huh?
appnair (Programmer)
2 Feb 12 11:30
Not sure if this method is available in java
LL_SessionAllocFromCookieEX

They are for C,C++ and VB(old)

To use that function an applet has to first login to livelink using resgular sessions and then on succesive calls use that that is teh theory.When on firts login livelink gives you a LLCOOKIE encrypted to the browser,so to livelink it will look like the calls are coming form the same IP address that is te theory

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
http://www.tek-tips.com/faqs.cfm?fid=2884
http://www.linkedin.com/in/appunair

cdfly (Programmer) (OP)
2 Feb 12 11:33
No problem, I'll try and get it working inside the module.
I Appreciate all the help
 
ggriffit (Programmer)
2 Feb 12 17:05
cdfly, there is plenty of useful links etc at OTDN (https://knowledge.opentext.com/knowledge/cs.dll/open/16376487), also have you considered buying in an multi file upload control ? there are several providers such as Causeway Technologies (http://www.causeway.com)

Greg Griffiths
Livelink Certified Developer & ECM Global Star  Champion 2005 & 2006
http://www.greggriffiths.org/livelink/

cdfly (Programmer) (OP)
2 Feb 12 17:26
Thanks ggriffit I will take a look at the link.
Most of the code is done so we probably won't be able to use a different solution, it wasn't until testing that we found the incorrect user was in the audit

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close