Who can give me a clear picture on getCalllerPrincipal in EJB

We keep on encountering some problems which are related with security issues. So
I hope can get a clear picture on how it is handled inside WebLogic.
Currently what we did is we create a common login function. Inside this function,
we declare a local InitialContext variable and initiate the variable by passing
in userid and password. After this program finished, the InitialContext object
will be removed by java garbage collection.
Our login function (JSP or Servlet) will trigger this common function to login
a particular user. Then the function will create other InitialContext object without
passing in any parameter. This InitialContext object will be cached in a class’
static variable. The rest of function will use this object to look EJBs. For getting
the best performance, we also cache the remote home interface for stateless Session
EJB and catch home interface for Entity EJB.
In one of our EJB function, we want to get current login user id. We use sessionContext.getCallerPrincipal()
to get current login user id from WebLogic Realm. This is working fine in our
in-house environment. But when we deploy our product into other project environment,
it doesn’t work. The error scenario is
User A login first, everything working fine. After that user A logout and User
B login using the same browser. Then the getCallerPrincipal always return UserA.
We try a lot of different way, but still cannot resolve this problem.
Is it because we cached InitialContext or EJB interface? I hope some body can
give me a clear picture on how the Web tier and EJB tier is linked by WebLogic;
Why EJB can share the same user principal with JSP or Servlet and never confuse
between other Web session.

Yes, it's because you cache the InitialContext. You need to refresh the context with
the current user's principal+credentials on each HTTP request.
regards,
-Ade
"James Zhang" <[email protected]> wrote in message news:3d36975b$[email protected]..
>
We keep on encountering some problems which are related with security issues. So
I hope can get a clear picture on how it is handled inside WebLogic.
Currently what we did is we create a common login function. Inside this function,
we declare a local InitialContext variable and initiate the variable by passing
in userid and password. After this program finished, the InitialContext object
will be removed by java garbage collection.
Our login function (JSP or Servlet) will trigger this common function to login
a particular user. Then the function will create other InitialContext object without
passing in any parameter. This InitialContext object will be cached in a class'
static variable. The rest of function will use this object to look EJBs. For getting
the best performance, we also cache the remote home interface for stateless Session
EJB and catch home interface for Entity EJB.
In one of our EJB function, we want to get current login user id. We use sessionContext.getCallerPrincipal()
to get current login user id from WebLogic Realm. This is working fine in our
in-house environment. But when we deploy our product into other project environment,
it doesn't work. The error scenario is
User A login first, everything working fine. After that user A logout and User
B login using the same browser. Then the getCallerPrincipal always return UserA.
We try a lot of different way, but still cannot resolve this problem.
Is it because we cached InitialContext or EJB interface? I hope some body can
give me a clear picture on how the Web tier and EJB tier is linked by WebLogic;
Why EJB can share the same user principal with JSP or Servlet and never confuse
between other Web session.

Similar Messages

  • Who can give me a suggestion about java crash with Internal Error ID?

    I running my server performance test, but after 7 hours, the jvm crashed and give a java internal error ID with "*53484152454432554E54494D450E43505001A8*",
    and I can not query any valuable information from Google by this internal Error ID. Who can give me a light?
    I have run the performance test on the other machine with the same service logic, the other environment not crash, It's very strange!
    h5. some content of The hs_err_xxx.log file:
    # An unexpected error has been detected by HotSpot Virtual Machine:
    # Internal Error (53484152454432554E54494D450E43505001A8), pid=16908, tid=1060293520
    # Java VM: Java HotSpot(TM) Server VM (1.5.0_19-b02 mixed mode)
    --------------- T H R E A D ---------------
    Current thread (0x425782e8): JavaThread "11d1def534ea1be0:656f6049:124caa54ac8:49c0,EventTypeID[com.telware.protocol.cid.eve
    nt.CIDContinueEvent#telware#1.0], #14" [_thread_in_Java, id=17068]
    Stack: [0x3f2ac000,0x3f32d000), sp=0x3f32b2a0, free space=508k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    V [libjvm.so+0x516863]
    V [libjvm.so+0x1ca6cc]
    V [libjvm.so+0x4a3c5f]
    V [libjvm.so+0x43ceb6]
    V [libjvm.so+0x43a0c4]
    Other Threads:
    0x08e0d850 VMThread [id=16914]
    0x08e20e20 WatcherThread [id=16923]
    VM state:not at safepoint (normal execution)
    VM Mutex/Monitor currently owned by a thread: None
    h6. Heap
    par new generation total 98304K, used 36214K [0x49360000, 0x51360000, 0x51360000)
    eden space 65536K, 29% used [0x49360000, 0x4a667c10, 0x4d360000)
    from space 32768K, 51% used [0x4d360000, 0x4e3b5e58, 0x4f360000)
    to space 32768K, 0% used [0x4f360000, 0x4f360000, 0x51360000)
    concurrent mark-sweep generation total 1507328K, used 974545K [0x51360000, 0xad360000, 0xad360000)
    concurrent-mark-sweep perm gen total 40152K, used 24021K [0xad360000, 0xafa96000, 0xb1360000)
    h6. VM Arguments:
    jvm_args: -Dfile.encoding=utf-8 -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCApplicationConcurrentTime
    -XX:+PrintGCApplicationStoppedTime -Xloggc:/home/sepcs/sep/oper/gc.log -Xms1600m -Xmx1600m -Xmn128m -XX:SurvivorRatio=2 -XX:+
    UseFastAccessorMethods -XX:-UseFastEmptyMethods -XX:+UseFastJNIAccessors -XX:ParallelGCThreads=2 -XX:+UseConcMarkSweepGC -XX:
    UseParNewGC -XX:CMSFullGCsBeforeCompaction=1 -XX:GCTimeRatio=19 -Xnoclassgc -XX:DisableExplicitGC -XX:CMSInitiatingOccupanc
    yFraction=70 -XX:+UseCMSCompactAtFullCollection -XX:+CMSParallelRemarkEnabled -Dsep.home.dir=/home/sepcs/sep
    java_command: com.telware.sep.system.SysAdmin -r -gc
    Launcher Type: SUN_STANDARD
    h6. Environment Variables:
    JAVA_HOME=/usr/jdk/jdk1.5.0_19
    PATH=/home/sepcs/sep/bin::/usr/jdk/jdk1.5.0_19/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin
    LD_LIBRARY_PATH=/usr/jdk/jdk1.5.0_19/jre/lib/i386/server:/usr/jdk/jdk1.5.0_19/jre/lib/i386:/usr/jdk/jdk1.5.0_19/jre/../lib/i3
    86
    SHELL=/bin/csh
    DISPLAY=localhost:10.0
    HOSTTYPE=i386-linux
    OSTYPE=linux
    MACHTYPE=i386
    --------------- S Y S T E M ---------------
    OS:Red Hat Enterprise Linux Server release 5.1 (Tikanga)
    uname:Linux 2.6.18-53.el5 #1 SMP Wed Oct 10 16:34:02 EDT 2007 i686
    libc:glibc 2.5 NPTL 2.5
    rlimit: STACK 10240k, CORE infinity, NPROC 31726, NOFILE 1024, AS infinity
    load average:2.05 2.35 2.23
    CPU:total 2 (cores per cpu 2, threads per core 1) family 15 model 6 stepping 5, cmov, cx8, fxsr, mmx, sse, sse2, sse3
    Memory: 4k page, physical 2009524k(54132k free), swap 1049k(1048k free)
    vm_info: Java HotSpot(TM) Server VM (1.5.0_19-b02) for linux-x86, built on May 4 2009 01:43:34 by java_re with gcc 3.2.1-7a
    (J2SE release)
    time: Sat Nov 7 02:44:28 2009

    Thank you very much first.
    I have noted that the link [t-739313] but I can not found any valuable info for my exception :(
    Yesterday night this crash has been rised again after my server running 1hours, I have analysis the core file, it's stack like this:
    {color:#008080}(gdb) bt
    #0 0xb7f4e402 in __kernel_vsyscall ()
    #1 0x00488c10 in raise () from /lib/libc.so.6
    #2 0x0048a521 in abort () from /lib/libc.so.6
    #3 0xb7990f75 in os::abort () from /usr/jdk/jdk1.5.0_19/jre/lib/i386/server/libjvm.so
    #4 0xb7a6f914 in VMError::report_and_die () from /usr/jdk/jdk1.5.0_19/jre/lib/i386/server/libjvm.so
    #5 0xb77236cc in report_fatal () from /usr/jdk/jdk1.5.0_19/jre/lib/i386/server/libjvm.so
    #6 0xb79fcc5f in SharedRuntime::continuation_for_implicit_exception ()
    from /usr/jdk/jdk1.5.0_19/jre/lib/i386/server/libjvm.so
    #7 0xb7995eb6 in JVM_handle_linux_signal () from /usr/jdk/jdk1.5.0_19/jre/lib/i386/server/libjvm.so
    #8 0xb79930c4 in signalHandler () from /usr/jdk/jdk1.5.0_19/jre/lib/i386/server/libjvm.so
    #9 <signal handler called>
    #10 0x0960527c in ?? ()
    #11 0x429f2160 in ?? ()
    #12 0x429f2158 in ?? ()
    #13 0x4cb72e48 in ?? ()
    #14 0x4cb72f28 in ?? ()
    #15 0x4cb72fe8 in ?? ()
    #16 0x00000000 in ?? (){color}
    I have print the stack from the core file, I found the crashed thread's state which indicted by hs_err_xxx.log is IN_JAVA and no stack information.
    {color:#008080}Thread 12536: (state = IN_JAVA){color}
    (no stack info.)
    {color:#008080}{color:#000000}And from the gc.log, I found that the crash occured in the CMS phase, the last gc log is :
    {color}5814.574: [GC [1 {color:#0000ff}CMS-initial-mark{color}: 829142K(1507328K)] 839697K(1622016K), 0.0281480 secs]
    Total time for which application threads were stopped: 0.0284280 seconds
    5814.602: [{color:#0000ff}CMS-concurrent-mark-start{color}]
    Application time: 1.7093670 seconds
    5816.312: [GC 5816.312: [ParNew: 108858K->8866K(114688K), 0.1133760 secs] 938001K->842222K(1622016K), 0.1135920 secs]
    Total time for which application threads were stopped: 0.1141250 seconds
    Application time: 1.4597160 seconds
    5817.886: [GC 5817.886: [ParNew: 107170K->8372K(114688K), 0.0900130 secs] 940526K->844407K(1622016K), 0.0902690 secs]
    Total time for which application threads were stopped: 0.0907340 seconds
    Application time: 1.4513060 seconds
    5819.428: [GC 5819.428: [ParNew: 106676K->8189K(114688K), 0.0871610 secs] 942711K->846695K(1622016K), 0.0873750 secs]
    Total time for which application threads were stopped: 0.0878680 seconds
    {color:#000000}All above is my found, but I am a newbie in JVM crash, so anybody can help me ?
    and I am very interesting in the Internal Error ID ({color}{color}{color:#ff0000}*53484152454432554E54494D450E43505001A8*{color}{color:#008080}{color:#000000}), I think this ID hide a lot of valuable information for SUN JDK developer, who can interpret it? Thanks very much!
    {color}{color}

  • Who can give me some information on a number of learning Indesign Server Data?

    Who can give me some information on a number of learning Indesign Server Data?
    Indesign Server I am a developer, so far, only the hands of Indesin Server SDK, the main techniques I use are JAVA, Who can give me some useful information on the development of learning Indesign Server development through the JAVA technology. I will be very grateful .
    Contact:
    EMail: [email protected]
    MSN: [email protected]

    Who can give me some information on a number of learning Indesign Server Data?
    Indesign Server I am a developer, so far, only the hands of Indesin Server SDK, the main techniques I use are JAVA, Who can give me some useful information on the development of learning Indesign Server development through the JAVA technology. I will be very grateful .
    Contact:
    EMail: [email protected]
    MSN: [email protected]

  • Ok. can any one tell me: will Final Cut Pro 6 fcs2 bundle) install on my GeForce 6600 LE Video Card on my G5 powerpc dual core 2.0? Thanks Much to anyone who can give me a definitive answer. also if not any fix aka .plist?

    ok. can any one tell me: will Final Cut Pro 6 (fcs2 bundle) install on my GeForce 6600 LE Video Card on my G5 powerpc dual core 2.0? Thanks Much to anyone who can give me a definitive answer. also if not any fix aka .plist?

    Look at this technical specs document, your system should be fine with the possible exception of Color.
    As for managing your preference files, use Digital Rebellion's tool.
    Good luck.
    Russ

  • Who can give me a overview of all of component???

    Hi all,
          I am studying the portal by myself. Who can give me a overview of all of iview component about function and so on??
          Thanks in advance.

    Hi,
    The best link that I found to start EP from basics in
    http://help.sap.com/erp2005_ehp_03/helpdata/EN/34/76bd3b6e74d708e10000000a11402f/frameset.htm
    After opening this link follow the below path
    Portal->PortalAdministrationGuide->ContentAdministration->iview
    In this path you will get all the information regarding types of iviews.
    Regards
    Shanmukha Rao Banisetti

  • Who can give me all the name of system table or organization table in sap?

    Who can give me all the name of system table or organization table in sap? such as the table stores the client,company code ,plant,transaction code ,sap menu,purchase organization along with the relation between organizations such as
    the relation between company code and plant, the relation between company and purchase organization and so on.Pls supply the list of table name or the url where I can see these information.
    Thank you in advance.

    Hi YuLin
    refer this link you will get all tables in SAP with description and relation.
    http://www.erpgenie.com/abap/tables.htm
    regards
    Yogesh

  • Who can give me an advice: iPhoto or Photoshop for iPad?

    Who can give me an advice: iPhoto or Photoshop for iPad?

    Not that I do a ton of photo editing, but there's a free app that works well, better than one I paid for
    http://itunes.apple.com/us/app/photopad-by-zagg/id364758617?mt=8
    photopad.
    color correction, cropping, rotation etc.
    I've used adobe for years and contemplated their app, but held off after reading some reviews that suggested that you have to buy filters etc for it. As much as I am familiar with Adobe products and have no real issue with them I don't do enough editing to get into something like that so I gave it a pass for the time being.

  • Who can give a whole example on toplink developed in JDeveloper?

    I am interested in web development by toplink.
    I downloaded those flash demo in this web site.
    But they are not complete about toplink.
    Who can give a complete example about toplink developed in JDeveloper?

    Hi
    I dont know if you are still looking but here are some of the toplink tutorials i used.
    http://www.oracle.com/technology/obe/obe9051jdev/advancedtoplink/toplinkadvanced.htm
    http://download-west.oracle.com/otn_hosted_doc/toplink/1013/b13593/preface003.htm
    This one is very good:
    http://www.oracle.com/technology/obe/obe9051jdev/ide1012/adfworkshop/buildingadfapplicationsworkshop.htm

  • Who can give the two impl files about EJBHome and EJBObject ??

    who can give the two impl files about EJBHome and EJBObject ??
    thanks!

    You can a lot in the internet. Try it in weblogic website for EJB samples. YOu will get the impl files .
    site is www.bea.com

  • Who can give me an oracle to oracle demo

    who can give me an oracle to oracle demo?
    I am just a beginnner.Who can pls give me an demo of extract data from oracle then load data to another oracle database?

    Which KM are you using, I think that you are using LKM Oracle to Oracle (DBLINK)
    There is some requirement for using this KM :
    Restrictions:
    - The 'tnsnames.ora' configuration file of the target server should be configured to recognize the source database
    - The database link is created with the name of the data server defined in the Topology
    - The default work schema of the source instance must have 'select any table' privilege set.
    You can also try to use the LKM SQL to Oracle...
    Bouch

  • Who can give me a solution about the following requirment?

    Dear All,
    The requirment is very hard for me, Perhaps you can give me a detail solution about it. I will list my confusion....thank you very much.
    (1)
    On the SRM puchase order the payment terms (BBP_PDHGP-PMNTTRMS) shall be defaulted to the supplier’s payment term.
    Where I can find BBP_PDHGP-PMNTTRMS?
    (2)
    Create an implementation of the BADI definition BBP_DOC_CHANGE_BADI and name it ZQF_PO_FLDS_DEFAULT.  This implementation will have a filter type BUS2201 for purchase order processing.
    done
    (3)
    The vendor (business partner) for a purchase order can be found in importing table parameter it_partner.  Read the table where the field  partner_fct = 00000019  (i.e. vendor).  The field PARTNER_NO contains the data for the next step.
    the table? which table? I don't know. I can't find this table.
    I check BBP_PO_CHANGE, It_partner is a Parameter only, How to find the table on requirment mentioned?
    (4)
    Use standard SAP function module BBP_PARTNER_GET_PURCH_DATA_NEW to return the purchasing information for the vendor.  Pass in the following parameter to this function:
         PARTNER_GUID = IT_PARTNER-PARTNER_NO (from previous step)
    The terms for this vendor can be found in field PAYMENT_TERMS of return parameter ET_PURCH_ORG_SET.
    Change field PMNTTRMS in exporting stucture ES_HEADER to the value returned from previous step (ET_PURCH_ORG_SET- PAYMENT_TERMS)
    (5)If no payment terms can be round for a vendor, issue an error message as detailed in the component requirement section above. (see existing shopping cart code for technical details on issuing error messages)

    Hi
    Here are the suggestions.
    <b>Every information is available in BBP_DOC_CHANGE_BADI in SE18. Create an implementation of the same in SE19 transaction.</b>
    Move the changed data in the Shopping cart, back to your internal tables, like et_item, et_partner , et_orgdata... etc.. inside the BADI Implemenataion.
      et_item[]     = it_item[].
      et_partner[] = it_partner[].
      et_orgdata[] = it_orgdata[].
    <b>1) Inside BBP_DOC_CHANGE_BADI, the payment terms will also be present in et_item [] table. Populate the required payment terms from reading the same based on the vendor number into every line item.</b>
    <b>3) et_partner [ ] table in BBP_DOC_CHANGE_BADI holds the partner details, like paetner number, partner function, partner type, once the Shopping cart is filled with atleast one line item in the et_item[] table.</b>
    4) et_orgdata[] can be changed accordingly.
    <b>5) for issuing Error message, create an implementation of BBP_DOC_CHECK_BADI and use the message as per your requirements.</b>
    Hope this will help.
    Please reward suitable points.
    Regards
    - Atul

  • Who can give me some numbers to contact apple support

    nesecito a number to contact Apple technical support to reset my password who can help me

    Choose your country
    http://www.apple.com/support/country/
    E.g. Spain
    http://www.apple.com/es/support/appleid/

  • Can anyone give me a clear picture regarding standard document types?

    Hi DMS Experts,
    What are the main use of the std doc types - EBR,D01,Q01 and Q02 . I know that EBR is for batch input , D01 for print list , Q01 for Quality Agreement and Q02 for Technical Delivery Team . They are non editable and can be created after deleting only . For D01, I have found that Alternative screen is 902 and Alt screen exit is 'OADVS902'.
    and for EBR , it is '903' and 'PPPIF903' respectively.
    Are these values mandatory for the doc types EBR and D01. Also I have seen that for the above doc types,Kpro content server is not checked.
    Can we store them in Kpro content server also..?
    Thanks and Regards
    Aravind

    Hi,
    I think, you can't change the standard settings. You should create your own custom doc type.
    Read the below thread also:
    http://scn.sap.com/thread/1244212
    Regards
    Shishir

  • How do I get in touch with someone who can give me...

    I have been waiting for a landline for a number of months.  Every time an engineer visit is arranged, the engineer cannot do anything and on the last visit it was finally explained to me that there is no line capacity available and a new line will have to be carried from the exchange a mile away, and possibly a new pole installed so that the reach is less than 68 metres to the house. I have received yet another message that an engineer's appointment is to be scheduled, but it is obvious to me that this will be in vain as no new pole has appeared.
    Every time I call, I am told that the engineer needs access to the premises and yes, my line will be put in on the installation date and I know that this is not true.  The engineers apologise and are very pleasant, but can do nothing until there is a line to work with.
    I am frustrated that I cannot get anyone to give me clear information on the work that needs to be done and the timelines involved.  I don't see the point in waiting in, and indeed taking time off work, unless the line is available for the engineer to connect.
    It seems that the right hand doesn't know what the left hand is doing - does anyone know who I can contact that will be able to give me reliable information?

    Thanks for this, I did not receive a reference number, or notice it on the screen when I submitted my form.  I do have an existing complaint reference number from earlier in this frustrating process and I have tried to contact BT using this again.  
    They have insisted on booking an engineer for tomorrow when I can see that no new telephone pole has appeared near the house and it is unlikely that a new line has been installed from the exchange.  I moved into this house last December and the struggle to get a landline and broadband is horrendous.
    I understand that work needs to be done, however I don't understand why:
    A) a survey was not done at the outset and a report made of the requirements for a line
    B) Openreach and BT appear not to communicate at all
    C) I am repeatedly told I will get a line and given installation dates and engineer visits when it will be impossible for the engineer to complete the installation
    D) Whenever I call BT the conversation goes around in circles with the operator insisting that my line is due to be installed and me insisting that there is work to be completed according to the engineer.  I can't seem to get this fact through to them and when I try to get information such as an expected date of completion I am on a hiding to nothing
    In the meantime I am spending a fortune on mobile 3g, with a patchy signal, and in cafes with internet facilities.  I need to work from home and after so many months, my employer is becoming impatient.
    Has anyone tried broadband satellite?  It looks as though this will be my only option.

  • Who can give the right information to receive my email via iCloud on a iMac with Snow Leopard? It can't be upgraded to Lion.

    I still have problems since migrating to iCloud with receiving email through my Mail app on my iMac running Snow Leopard 10.6.8 (and it can't be upgraded to Lion). Like I found on different places on internet, in Mail Preferences I made a new account, once with imap.mail.me.com and once with p02-imap.mail.me.com, like differently advised. Sometimes it works, sometimes not, untill I fill in again and again the advised changes in the Preferences.
    Is there a good advise arround to have my settings once and for all running well, as I expect from Apple stuff? Is Apple listening to the many complaints on this iCloud matter, or is my Apple Micro becoming too Soft to be heard?
    Thank you beforehand for helping me (and many others). Best regards,
    Jerome from Belgium

    Dear Roger and all interested,
    Right you are with stating you can't have MobileMe and iCloud at the same time. To explain the history of my problem:
    I have a small network of 3 computers: 1) MacBook Air 1.6 GHz Intel Core 2 Duo - 2) iMac 2.66 GHz Intel Core i5 - 3) iMac 2 GHz Intel Core Duo
    For the first time hesitating to upgrade as soon as a new system is available, a friend nevertheless could convince me of the usefullness of Lion and iCloud. During upgrading process I found out that my - 3) iMac just was narrowly to "old" for Lion.
    And indeed the migration from MobileMe to iCloud went almost automatically. But quite soon I established that my "old" iMac was no more receiving @mac.com mail. Having a look to the preferences of Mail, I couldn't change anything as I had no more MobileMe access, being migrated to iCloud. Apple information told me to select "Mail, Contacts & Calendars" in the System Preferences, but Snow Leopard has no such thing.
    Search on internet told me more or less how to set up an IMAP account in Snow Leopard in Mail preferences with as server address "imap.mail.me.com" with SSL on and use of port 993. This shortly worked. After restart no more. Setting up the account again and again, sometimes working, sometimes not. This is not exactly an almost automatically migration. Some other information told me to use "p02-imap.mail.me.com".
    Current situation: after start up, a window from Mail asks me to give my password for the account on the MobileMe IMAP-server "mail.me.com" (which I expected to be "p02-imap.mail.me.com"). Password not accepted, retry and retry, then just click on Cancel. Result: iCloud account has a kind of lightning symbol next to it (= not working). I click on the symbol, one time it disappears and the account works, one time it asks for the password again, and again not accepted. Repeating this procedure untill it works. So for 3 days I realized to make it finally working up to now, but all this does not look to be the right way and doesn't sound a too reassuring situation to me.
    When I look at Mail preferences in Snow Leopard now:
    Account Type: MobileMe IMAP
    Incoming Mail Server: mail.me.com (expected here p02-imap.mail.me.com)
    Outgoing Mail Server (SMTP): p02-imap.mail.me.com
    (Advanced) Authentication: Apple Token
    What I find in preferences (automatically established) on my Lion computers:
    Account Type: iCloud IMAP
    Incoming Mail Server: p99-imap.mail.me.com (shows grey)
    Outgoing Mail Server (SMTP): smtp.me.com
    (Advanced) Authentication: Password (no Apple Token option)
    So I tried to make Snow Leopard Mail similar based on the Lion preferences:
    Account Type: MobileMe IMAP (found no way to change to iCloud IMAP)
    Incoming Mail Server: mail.me.com (shows grey, found no way to change to "p99-imap.mail.me.com")
    Outgoing Mail Server (SMTP): smtp.me.com
    (Advanced) Authentication: Password (no Apple Token option)
    Same result as before: asks for password, which I have to cancel, then click away the lightning symbol, after which it works (but perhaps not tomorrow).
    Best regards,
    Jerome from Belgium

Maybe you are looking for