Asynchronous Event listeners and security

Hi,
I have written an asynchronous event listener that would record a users "login time" when the user logs into my portal. I record this login time as a property value in a custom user property set.
Unfortunately, the thread that executes the logic in the listener, does not have the rights to modify the property set data, as you can see from the following trace :
com.xyz.user.UserException: Unable to set user property
at com.nokia.npp.user.impl.UserImpl.setProperty(UserImpl.java:113)
at com.xyz.postlogin.TrackPostLoginTask.handleEvent(TrackPostLoginTask.java:95)
at com.bea.p13n.events.internal.AsynchronousEventHandler$EventRequest.execute(AsynchronousEventHandler.java:145)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
Caused by: java.rmi.RemoteException: EJB Exception: ; nested exception is:
java.lang.SecurityException: User <WLS Kernel> does not have permission to modify data for joesmith. Users can only be modified by themselves, or by a member of the role [Admin, PortalSystemAdministrator].
at weblogic.ejb20.internal.EJBRuntimeUtils.throwRemoteException(EJBRuntimeUtils.java:102)
at weblogic.ejb20.internal.BaseEJBHome.handleSystemException(BaseEJBHome.java:307)
at weblogic.ejb20.internal.BaseEJBObject.postInvoke(BaseEJBObject.java:263)
at weblogic.ejb20.internal.StatelessEJBObject.postInvoke(StatelessEJBObject.java:140)
at com.bea.p13n.usermgmt.profile.internal.UserProfileManager_mfa736_EOImpl.setProperty(UserProfileManager_mfa736
_EOImpl.java:215)
at com.bea.p13n.usermgmt.profile.internal.ProfileWrapperImpl.setProperty(ProfileWrapperImpl.java:231)
at com.nokia.npp.user.impl.UserImpl.setProperty(UserImpl.java:109)
... 4 more
Caused by: java.lang.SecurityException: User <WLS Kernel> does not have permission to modify data for dnataraj. Users ca
n only be modified by themselves, or by a member of the role [Admin, PortalSystemAdministrator].
at com.bea.p13n.usermgmt.profile.internal.UserProfileManagerImpl.authorizeModification(UserProfileManagerImpl.ja
va:133)
at com.bea.p13n.usermgmt.profile.internal.ProfileManagerImpl.setProperty(ProfileManagerImpl.java:525)
at com.bea.p13n.usermgmt.profile.internal.UserProfileManager_mfa736_EOImpl.setProperty(UserProfileManager_mfa736
_EOImpl.java:205)
this comes across as a bit odd to me. Does anyone have any advice/ideas?
cheers!
BR,
deepak

take a look at runAs()
http://edocs.beasys.com/wlp/docs81/javadoc/com/bea/p13n/security/Authentication.html
Chris Jolley
Portal Architect

Similar Messages

  • [JS] Basic question about event listeners and event handlers

    I am very new to the whole topic of event listeners and event handlers.  I'd run the test for the following problem myself, but I don't know where to start, and I just want to know if it's impossible -- that is, if I'm misunderstanding what event listeners and event handlers do.
    Say I have an InDesign document with a text frame that is linked to an InCopy story.  Can I use an "afterImport" event listener on the text frame to perform some action any time the link to the InCopy story gets updated?  And will the event handler have access to both the story that is imported, and the pathname of the InCopy file?
    Thanks.

    Thank you, Kasyan.
    Both of those are good solutions.
    We are currently using InDesign CS4 and InCopy CS5.  I'm hoping to get them to purchase the whole CS5 suite soon, since I'd like to start writing scripts for InDesign CS5 as soon as possible, as long as I'm going to have to be doing it in the not too distant future anyway.  The greater variety of event handlers sounds like it might be something that is crucial to the project I'm working on, so that adds to the argument for getting CS5.
    Thanks again.  You have no idea how helpful this is.  I made some promises to my boss yesterday that I later realized were  based on assumptions of mine about the InDesign/InCopy system that didn't make any sense, and I was going  to have to retract my promises.  But after reading your response I think I can still deliver, in a slightly different way that I had been thinking before.
    Richard

  • All event listeners and models in one file?

    I have one java file for all my event listeners of a programm and one java file for all my models. Is this good?
    I create instances with new AllInOneHandler.MouseHandler() for example.
    Or should I have one file for each event and each model?

    Hi,
    you should have one file for each class or interface - this gives you best control and reusability. Also when you have javadoc-comments in it, big files with many classes in it will become hard to edit.
    When using one file for each class or interface you can import only the needed classes or interfaces instead of importing whole packages - so it is easier to see, what is exactly imported. As so a good structured application has many classes, where each of them is small (and in an own source file), you will have less problems during the evolution of your classes this way.
    If you want to group some classes, why not use sub-packages for this purpose?
    greetings Marsian

  • Regd Event Listeners and Objects to listen to File events

    I have a specific requirement wherein, I want to listen to a java.io.File object pointing to a windows directory and keep track of any sub-files and sub-directories. If any new file or directory is created, I want an event object to be fired and captured by an event listener. Are there any classes already provided in the JDK APIs to meet this requirement.
    The situation is pretty much like listening to events fired when emails are received on an Exchange Server using Java Mail API MessageListener and MessageEvent.

    You should get in touch with this guy:
    http://developer.berlios.de/projects/jfilenotify/
    Looks like he might need a little help.

  • Documentation for custom event listeners

    Hi,
    I am searching in portal 8.1 documents for using custom events, coding and registering event listeners, and using them in jsp pages. So far my search has been unsuccessful.
    Can some one let me know where i find this info?
    -thanks

    Hi J, 
    Thanks for your reply.
    I didn’t find the custom work item Web Access control Official documents, but you can refer to the information in these articles(it’s same in TFS 2013):
    http://blogs.msdn.com/b/serkani/archive/2012/06/22/work-item-custom-control-development-in-tf-web-access-2012-development.aspx
    http://blogs.msdn.com/b/serkani/archive/2012/06/22/work-item-custom-control-development-in-tf-web-access-2012-deployment.aspx
    For how to debug TFS Web Access Extensions, please refer to:
    http://www.alexandervanwynsberghe.be/debugging-tfs-web-access-customizations/.
    For the custom work item Web Access control Official documents, you can
    submit it to User Voice site at: http://visualstudio.uservoice.com/forums/121579-visual-studio. Microsoft engineers will evaluate them seriously.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to block execution of event listeners

    Hi all,
    JDev version : 11.1.1.6
    My requirement is that I want to block all event listeners like ActionListeners, SelectionListeners, DisclosureListeners, RowDisclosure listeners when the screen is opened in readonly mode.
    I could block ActionListeners by disabling command links and command buttons etc.
    But there's no way to block SelectionListeners, DisclosureListeners, RowDisclosure listeners.
    So Is there any common code which can block all listeners?
    Or is there any EventController or something like that which will allow me to control event execution?

    I would have if it was just one screen.
    There are hundreds of screens.
    Anyways, can't I use any javascript to do this? There are some interfaces like EventListeners , classes like EventConsumer etc. Do none of them provide feature to block event listeners?

  • Help me I'm trying to create event listeners

    I am trying to create event listeners
    Whenever any keyboard event occurs the string s gets appended by a,c
    or p.At the end of the program its supposed to print value of s
    But s always happens to null.Please tell me how to correct it....so
    that detection is possible for any case
    import java.io.*;
    import java.awt.event.*;
    public class trial {
    int x;
    public static String s;
    //OutputStream f1=new FileOutputStream("file2.txt");
    public static void keyReleased(KeyEvent e)
    s=s+"a";
    public static void keyPressed(KeyEvent e)
    s=s+"c";
    public static void keyTyped(KeyEvent e)
    s=s+"p";
    public static void main(String args[])
    throws IOException
    char c;
    BufferedReader br =new BufferedReader(new
    InputStreamReader(System.in));
    System.out.println("Entercharactes,'q' to quit.");
    do
    c=(char)br.read();
    System.out.println(c);
    while(c!='q');
    // for(int i=0;i<s.length();++i)
    System.out.println(s);

    I suggest looking at the java tutorial. Your code completely misses the mark and you need to see examples.

  • Allow Non-Administrator accounts to create event sources and write to event logs

    We are setting up BizTalk 2013 in Windows Server 2012 and one of the requirements is to allow the service account to create sources and write in event logs (Application) of the BizTalk servers. We have found what it seems to be a simple solution for this
    without giving service accounts local admin rights.
    Give Full control for the following registry keys to the service accounts or groups to allow creating of event sources and write to event logs:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Security
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Application
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Security
    Note: when changing permissions for EventLog key, the child keys will inherit the permissions by default except Security key which must be done manually.
    Initial tests using a .net test app seems to work as expected. New event sources are being created in the event logs and writing to the event logs after that works perfectly.
    The above method has been deployed in production and this is the most suitable solution for us.

    Hi Keong6806,
    Thanks a lot for posting and sharing here.
    Do you have any other questions regarding this topic? If not I would change the type as 'Discussion' then.
    Best Regards,
    Elaine
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • [Request] Move Windows Control Panel applet from "System and Security" to "Programs"

    The "Flash Player (32-bit)" Windows Control Panel applet should be  moved from "System and Security" to "Programs" where the Java applet is.
    Vote: https://bugbase.adobe.com/index.cfm?event=bug&id=2953107
    Thanks

    njb,
    Why not just run the ThinkVantage System Update and let it install as usual. You can also "un-check" those drivers that you don't want to install.
    *Non Lenovo employee*
    I have a Y2P (i5) ... Feel free to ping me if you want me to test some applications with your Y2P if you have the same model. I don't mind keep doing recovery on it if needed .... =)

  • "logon time" between USR41 and security audit log

    Dear colleagues,
    I got a following question from customer for security audit reason.
    > 'Logon date' and 'Logon time' values stored in table  USR41 are exactly same as
    > logon history of Security Audit Log(Tr-cd:SM20)?
    Table:USR41 saves 'logon date' and 'logon time' when user logs on to SAP System from SAP GUI.
    And the Security Audit Log(Tr-cd:SM20) can save user's logon history;
    at the time when user logged on, the security audit log is recorded .
    I tried to check SAP GUI logon program:SAPMSYST several ways, however,
    I could not check it because the program is protected even for read access.
    I want to know about specification of "logon time" between USR41 and security audit log,
    or about how to look into the program:SAPMSYST and debug it.
    Thank you.
    Best Regards.

    Hi,
    If you configure Security Audit you can achieve your goals...
    1-Audit the employees how access the screens, tables, data...etc
    Answer : Option 1 & 3
    2-Audit all changes by all users to the data
    Answer : Option 1 & 3
    3-Keep the data up to one month
    Answer: No such settings, but you can define maximum log size.
    4-Log retention period can be defined.
    Answer: No !.. but you can define maximum log size.
    SM19/SM20 Options:
    1-Dialog logon
    You can check how many users logged in and at what time
    2-RFC login/call
    Same as above you can check RFC logins
    3-Transaction/report start
    You can see which report or transaction are executed and at what time
    (It will help you to analyise unauthorized data change. Transactions/report can give you an idea, what data has been changed. So you can see who changed the data)
    4-User master change
    (You can see user master changes log with this option)
    5-System/Other events
    (System error can be logged using this option)
    Hope, it clear the things...
    Regards.
    Rajesh Narkhede

  • Using Multiple Event Listeners

    Hi,
    I have a movielcip (A) class in which I have used a Tween class effect on a child movieclip (B) scrollRect. The (B) Movieclip in turn has several movieclips whose have tween class effect being executed on thier child movieclips.
    the tweens are all unique to each movieclip
    and the event listeners are taken off once completed.
    This works all well and good in FLASH IDE...
    My problem arises when I try to view this in a browser on a Windows XP
    it doesnt work in
    Opera Version 9.63
    Firefox 2.0
    and Google Chrome 2.0
    The only browser it works fluently in is
    Internet Explorer 7.0.5
    What is happening in most cases it that the animation appears to "stick" but i think what may be happening is the listening or removal of the event listeners. The animations are left incompleted.
    Is there any rule of thumb when using multiple event listeners?
    here is a snippet of some of my code
    on click event from movieclip (A)
    private function scrollToSlidePrev(e:MouseEvent) {
                   if (((slideIndex - 1) >= 0)) {
                        nextButton.mouseEnabled = nextButton.enabled = previousButton.enabled = previousButton.mouseEnabled = false;
                        var position:Number = 0-SLIDEAREA.width;
                        var slide1:TileListSlide = slides[slideIndex] as TileListSlide;
                        var slide2:TileListSlide = slides[--slideIndex] as TileListSlide;
                        scrollSlide(position,slide1,slide2);
    tween animation in movieclip (A) on (B)
    private function scrollSlide(pos:int,slide1:TileListSlide,slide2:TileListSlide) {
                   slide1.resizeSlideTo(0.6); // execute tween on child movie clips in B
                   slide2.resizeSlideTo(1); // same as above;
                   var rect:Rectangle = sliderMc.scrollRect;
                   var tween1:Tween = new Tween(rect,"x",Regular.easeOut,rect.x,rect.x + pos,3,true);
                   tween1.addEventListener(TweenEvent.MOTION_CHANGE,setSliderScroll,false,4);
                   tween1.addEventListener(TweenEvent.MOTION_FINISH,toggleButtonEnabled,false,3);
    tween animation in movieclip (B) children
    public function resizeSlideTo(sc) {
                   var m:Matrix = tileList.transform.matrix as Matrix;
                   var p:Point = new Point (m.a, 0);
                   var tween2:Tween = new Tween(p,"x",Regular.easeOut,p.x,sc,3,true);
                   if (numericStepper != null) {
                        if (sc != 1) {
                             numericStepper.visible = false;
                             tween2.removeEventListener(TweenEvent.MOTION_FINISH,showStepper);
                        if (sc === 1) {
                             tween2.addEventListener(TweenEvent.MOTION_FINISH,showStepper,false,2);
                   tween2.addEventListener(TweenEvent.MOTION_CHANGE,setScaleOnScroll,false,3);
    here is the link
    http://visual_admin.web.aplus.net/ticker/ticker_widget.html
    the effect disables and re-enables the buttons when its done.... then the listeners are removed.
    each one with the exception cretes its own unique tween (obviously this is a custom class built as each clip)
    i really don't know what to make of it guys         

    apparantly making the tween a property of the class rather than a random variable in a function worked.....go figure

  • I have used a Seagate external hard drive for my Mac desktop. It is malfunctioning. Can I disconnect and depend on iCloud to keep my documents, music, and photos backed up safe and secure? I use the Cloud for phone, pad and desktop.

    Can I expect iCloud to safely back up and secure my documents, music and pictures? I am using Cloud on phone, pad, and desktop. Have depended on external hard drive in the past. It is malfunctioning. Will the Cloud replace it for storage and safety?

    Time Machine in itself, without an external drive may well be good for instances where you accidentally delete documents that you later require. However in the event of a hard drive failure, if Time Machine backup is kept on the same drive as the original items, it will not be much use to you.
    In my opinion, it is vitally important that you have an external drive for backup, whether you use Time Machine or a another backup solution is entirely up to you.
    My situation is slightly unusual, I have four hard drives in my computer and multiple arrays of hard drive enclosures with multiple hard drives within them (in total I have 40 TB of storage). As a result of this I tend to employ more than one backup procedure, I use Time Machine to backup some items and a utility called tri-backup to backup other items. I also keep two backups of everything.
    Time Machine is free, it's included with your operating system, I wonder if you mean time capsule.

  • Group Policy won't apply, No mapping between account names and security IDs was done.

    I am using Group Policy Preferences to remove users from the local admin group and add a local admin account.  This GPO is working on 90% of the Win7 machines on the network, but three laptops are not accepting the GPO.  I get the following error:
    Log Name:      Application
    Source:        Group Policy Local Users and Groups
    Date:          6/24/2014 8:49:28 AM
    Event ID:      4098
    Task Category: (2)
    Level:         Warning
    Keywords:      Classic
    User:          SYSTEM
    Computer:      laptop1.internal.com
    Description:
    The user 'Administrators' preference item in the 'Local Admin Policy - Remove Permissions {593ACD77-3663-4023-BEB8-938D83F7862E}' Group Policy object did not apply because it failed with error code '0x80070534 No mapping between account names and security
    IDs was done.' This error was suppressed.
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Group Policy Local Users and Groups" />
        <EventID Qualifiers="34305">4098</EventID>
        <Level>3</Level>
        <Task>2</Task>
        <Keywords>0x80000000000000</Keywords>
        <TimeCreated SystemTime="2014-06-24T13:49:28.000000000Z" />
        <EventRecordID>68771</EventRecordID>
        <Channel>Application</Channel>
        <Computer>laptop1.internal.com</Computer>
        <Security UserID="S-1-5-18" />
      </System>
      <EventData>
        <Data>user</Data>
        <Data>Administrators</Data>
        <Data>Local Admin Policy - Remove Permissions {593ACD77-3663-4023-BEB8-938D83F7862E}</Data>
        <Data>0x80070534 No mapping between account names and security IDs was done.</Data>
      </EventData>
    </Event>
    I've searched high and low for an answer and nothing I find on-line seems to apply.  I also notice that the option to 'Run as Administrator' does not work.  If I right-click on cmd.exe and select 'run as administrator', the command box opens but
    I am not prompted for credentials and the command box does not have admin rights.  Not sure if this is related or not.
    Any help on this would be greatly appreciated.
    Thanks,
    Joe

    Hi,
    Delete your  remove action from the GPP and push it again, does this issue still occur?
    If it still exists, let’s collect the GPP log for analysis:
    Group policy Preference debug logging policy settings are located under:
    Computer Configuration\Administrative Templates\System\Group Policy
    Click Logging and tracing, select local users and group preference logging and trace.
    Meanwhile, just a similar issue, but it is worth trying:
    A user is added to the wrong group on a client computer that is running Windows 7 or Windows Server 2008 R2
    http://support.microsoft.com/kb/2280515
    If you have any feedback on our support, please click
    here
    Alex Zhao
    TechNet Community Support

  • Order of execution for event listeners..??

    Hi there,
    Looking at the JDK source, I see that all classes that generate events, iterate through the listeners in reverse order. What is more, they start at size - 2. I am first, confused as to why it goes in this direction, and second, why size - 2 is used. Does the last added one not get called?
    As for reverse order, the problem I see with this is if a class that implements a listener in one way, then you want to add a listener, but your listener code depends on something being done within the first listener. For example, I created a simple file selection component. On the left is all files. On the right is the selected files. The component works fine. You can dbl-click a file to move it, or click the > or >> (or < or <<) to move selected files or ALL files in one direction or the other. The problem is, my component implements the ActionListener of the > and >> buttons. I made it public so that classes using this component could also add listeners. The main reason is, in the case of a "wizad", you do NOT want the NEXT button to be enabled until at least one selected file is in the right list box. So, when I add the listener, the component listener does NOT get called before my newly added listener. That listener does the job of moving the file and redisplaying the list of all files and selected files. But since my listener gets called first, that is not done, therefore the "selected" files list is NOT yet updated based on the button clicked. I am guessing that this occurs because of the reverse execution of listeners, and my listener is added after the component listener.
    So, is there any way to reverse this without having to reimplement the list myself? I'd hate to extend JButton just to handle executing listeners in the order they are added. Seems silly to me that this is not at least an optional boolean choice to indicate the direction to execute listeners, but I sure would love to know why Sun has gone this direction.
    Thanks.

    Thanks for the reply.
    That seems very odd to me, that it puts two entries per one listener. So let me ask you this, is this so that it can store the listeners in a list, but also store the type of listener? While at first this seems an odd way to use a list, I have come across several times when I wish I could store two objects in the list as one. I thus have created an inner class taking the two objects (usually a String for a "key" and an object), and then stored that in the list. The reson is, I want to store MORE than one of the same type, so a Set is out of the question, but a list only adds one object. I wish there was a class that allowed multiple values stored under the same key. I guess this would be easy enough to create, but it seems like something so often used that the JDK would have this in it already. Unless I am mistaken, I have not seen any Collection implementec class that can have multiple keys, and each key can have multiple values. Have you? So, I take it, just to verify, that the reason for storing the class type, then the actual instance is just this reason..to figure out the type it is, then the actual object that implements it (the reference to it).
    Thanks.

  • No mapping between account names and security IDs was done. (Exception from HRESULT: 0x80070534)

    We are getting below error message in MOSS 2007 server, every few minutes.
    Application Server Administration job failed for service instance Microsoft.Office.Server.Search.Administration.SearchServiceInstance (9daf0827-7c85-41c7-82c5-89f93ecd652a).
    Reason: No mapping between account names and security IDs was done. (Exception from HRESULT: 0x80070534)
    Techinal Support Details:
    System.Runtime.InteropServices.COMException (0x80070534): No mapping between account names and security IDs was done. (Exception from HRESULT: 0x80070534)
    at Microsoft.Office.Server.Search.Administration.MSSITLB.IGatherApplication2.SetUsersPermittedToQuery(String[] psaAccountNames, Int32 fForce)
    at Microsoft.Office.Server.Search.Administration.SearchServiceInstance.Synchronize()
    at Microsoft.Office.Server.Administration.ApplicationServerJob.ProvisionLocalSharedServiceInstances(Boolean isAdministrationServiceJob)
    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

    Hi Baskaran,
    For this issue, I think the main reason may be the original account is removed or changed from AD.
    In the following there is an article about this to reset the service account, you can refer to it for more information:
    http://edinkapic.blogspot.com/2009/10/moss-shared-services-provider.html
    Additionally, as you already tried to reset the service accounts, you could try to clear SharePoint configuration caches in case the caches were not updated, to clear SharePoint configuration caches, you can see the below article:
    http://social.technet.microsoft.com/Forums/en-US/sharepointadmin/thread/b97c4721-b37e-4a4a-a8e2-4a98b4c7b89c
    More information:http://farhanfaiz.wordpress.com/2009/04/08/moss-2007-event-id-6482-6481/
    Thanks,
    Qiao
    Qiao Wei
    TechNet Community Support

Maybe you are looking for