Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Audit user name

Status
Not open for further replies.

cdfly

Programmer
Jun 16, 2010
68
US
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
 
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
 
Thanks appnair,
Do you know of any samples that show how to impersonate a user?

 
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
 
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?
 
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
 
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?
 
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
 
No problem, I'll try and get it working inside the module.
I Appreciate all the help
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top