Has anyone used JAAS with WebLogic?

Has anyone used JAAS with Weblogic? I was looking at their example, and I have a bunch of questions about it. Here goes:
Basically the problem is this: the plug-in LoginModule model of JAAS used in WebLogic (with EJB Servers) seems to allow clients to falsely authenticate.
Let me give you a little background on what brought me to this. You can find the WebLogic JAAS example (to which I refer below) in the pdf: http://e-docs.bea.com/wls/docs61/pdf/security.pdf . (I believe you want pages 64-74) WebLogic, I believe goes about this all wrong. They allow the client to use their own LoginModules, as well as CallBackHandlers. This is dangerous, as it allows them to get a reference (in the module) to the LoginContext's Subject and authenticate themselves (i.e. associate a Principal with the subject). As we know from JAAS, the way AccessController checks permissions is by looking at the Principal in the Subject and seeing if that Principal is granted the permission in the "policy" file (or by checking with the Policy class). What it does NOT do, is see if that Subject
has the right to hold that Principal. Rather, it assumes the Subject is authenticated.
So a user who is allowed to use their own Module (as WebLogic's example shows) could do something like:
//THEIR LOGIN MODULE (SOME CODE CUT-OUT FOR BREVITY)
public class BasicModule implements LoginModule
private NameCallback strName;
private PasswordCallback strPass;
private CallbackHandler myCB;
private Subject subj;
         //INITIALIZE THIS MODULE
           public void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options)
                  try
                       //SET SUBJECT
                         subj = subject;  //NOTE: THIS GIVES YOU REFERENCE
TO LOGIN CONTEXT'S SUBJECT
                                                 // AND ALLOWS YOU TO PASS
IT BACK TO THE LOGIN CONTEXT
                       //SET CALLBACKHANDLERS
                         strName = new NameCallback("Your Name: ");
                         strPass = new PasswordCallback("Password:", false);
                         Callback[] cb = { strName, strPass };
                       //HANDLE THE CALLBACKS
                         callbackHandler.handle(cb);
                  } catch (Exception e) { System.out.println(e); }
     //LOG THE USER IN
       public boolean login() throws LoginException
          //TEST TO SEE IF SUBJECT HOLDS ANYTHING YET
          System.out.println( "PRIOR TO AUTHENTICATION, SUBJECT HOLDS: " +
subj.getPrincipals().size() + " Principals");
          //SUBJECT AUTHENTICATED - BECAUSE SUBJECT NOW HOLDS THE PRINCIPAL
           MyPrincipal m = new MyPrincipal("Admin");
           subj.getPrincipals().add(m);
           return true;
         public boolean commit() throws LoginException
               return true;
    }(Sorry for all that code)
I tested the above code, and it fully associates the Subject (and its principal) with the LoginContext. So my question is, where in the process (and code) can we put the LoginContext and Modules so that a client cannot
do this? With the above example, there is no Security. (a call to: myLoginContext.getSubject().doAs(...) will work)
I think the key here is to understand JAAS's plug-in security model to mean:
(Below are my words)
The point of JAAS is to allow an application to use different ways of authenticating without changing the application's code, but NOT to allow the user to authenticate however they want.
In WebLogic's example, they unfortunately seem to have used the latter understanding, i.e. "allow the user to authenticate however they want."
That, as I think I've shown, is not security. So how do we solve this? We need to put JAAS on the server side (with no direct JAAS client-side), and that includes the LoginModules as well as LoginContext. So for an EJB Server this means that the same internal permission
checking code can be used regardless of whether a client connects through
RMI/RMI-IIOP/JEREMIE (etc). It does NOT mean that the client gets to choose
how they authenticate (except by choosing YOUR set ways).
Before we even deal with a serialized subject, we need to see how JAAS can
even be used on the back-end of an RMI (RMI-IIOP/JEREMIE) application.
I think what needs to be done, is the client needs to have the stubs for our
LoginModule, LoginContext, CallBackHandler, CallBacks. Then they can put
their info into those, and everything is handled server-side. So they may
not even need to send a Subject across anyways (but they may want to as
well).
Please let me know if anyone sees this problem too, or if I am just completely
off track with this one. I think figuring out how to do JAAS as though
everything were local, and then putting RMI (or whatever) on top is the
first thing to tackle.

Send this to:
newsgroups.bea.com / security-group.

Similar Messages

  • Has anyone used tp4 with weblogic 10 ?

    We have not be able to get an appserver connection to work. Have you?

    We included weblogic.jar in
    c:\jdevHome\jdev\lib
    the message log shows the following:
    Aug 18, 2008 9:34:50 PM oracle.adf.rc.adapter.RCAdapterManager getInitialContext()
    WARNING: InitialContextFactory [adfrc.rr:AppServerConnection1:] returned null for RepositoryReference [class oracle.jdeveloper.rcasadapter.AppServerInitialContextFactory]
    Aug 18, 2008 9:34:50 PM oracle.adf.rc.adapter.RCAdapterManager getInitialContext()
    WARNING: InitialContextFactory [adfrc.rr:AppServerConnection1:] returned null for RepositoryReference [class oracle.jdeveloper.rcasadapter.AppServerInitialContextFactory]

  • Has anyone used FCE with a Sony hd-fx7 camcorder

    As above, has anyone used FCE with a Sony hd-fx7 camcorder. I have recently got one of these at work and am currently using imovie for basic edits, but would like to step up to FCE, has anyone any experience using the two.
    THanks

    Hi, have MacBookPro 2,16 GHz and Sony HDR-FX7 and FCE 3.5 (German PAL)
    - works good and fast
    - But better don't try to use an external monitor on DVI connection
    my system slows down if srubbing time line
    - couldn't find out yet why

  • Has anyone used CORBA with LabVIEW?

    Has anyone used CORBA with LabVIEW?

    Did you have any success with this?  I'm about to attempt the same thing and would rather not write intermediate functions in other other languages to do so...

  • Has anyone used Aperture with Bitcasa?

    I've got a rather large libary in iPhoto, on an external disk. I'd like to move it somewhere offsite.. like Bitcasa or something equivalent, and move to Aperture to manage it. 
    Has anyone done this?  Results?
    Thanks.

    I know this is a couple of months old, however I figured that I'd throw my 2 cents in here.
    I don't store my Aperture library on Bitcasa for the very reasons stated here, however, I do manage it a bit by using externally referenced files.
    My primary back up is Time Machine, and my secondary backup is Bitcasa, where I sync/back up Documents, Music, Photos, etc.
    To keep the Aperture library to a manageable size, I use reference files.  When I import Raw image files, they're stored in the Aperture Library.  That gets backed up to Time Machine and Bitcasa during regular backups.  Each Quarter, I move the photo files to an external hard drive.  The metadata is still in the library, and I'm able to do searches, etc.  Once that's done, I burn the referenced images to DVD.  If the external drive goes bad, I've got the DVDs to at least do restores.
    My hope is to experiment with Bitcasa to see if I can migrate that external drive, then have Aperture look there for the referenced files.

  • Has anyone used GitHub with RH projects?

    Does anyone have any experience using GitHub with RoboHelp? I don't plan on setting it up to use the RoboHelp UI to check individual topics in and out. I just want to check out the entire project. If anyone has any experience with this, any tips would be greatly appreciated.
    Also, can anyone please tell me which files to exclude when checking in the project? I know you're supposed to exclude the .cpd file, but I think I read that there are others. Unfortunately, I can't find the thread where this was discussed.
    Thanks.

    As long as you check out/check in the entire project folder, you should
    be fine. For RoboHelp, it's then as if there was no source control.
    Exclude the CPD. Just include all the other files. (Don't forget to add
    new files to the source control when you create them.)
    Kind regards,
    Willam

  • Has anyone integrated Netegrity with WebLogic ?

    Hello:
    Has anyone integrated Netegrity's SiteMinder with WebLogic ? I am curious to
    see how well it integrates and if there are any 'real world' experiences.
    Thanks.
    -Sunil .K

    Send this to:
    newsgroups.bea.com / security-group.

  • Has anyone used gcc47 with Xcode?

    So I am installing gcc47 with MacPorts on my Powermac G5 running Leopard. I was wondering if anyone here has had any experience using an updated version of gcc with Xcode? I haven't used Xcode before, I have mainly been using emacs from the terminal in one tab, with another tab for compiling and testing. I want to try out Xcode, but I have run into problems using the version of gcc it comes with (4.0.1) for compiling the GMP library. I have Xcode 3.1 installed. I was wondering if anyone knows if I can set up Xcode to build using the newer version of gcc i'm installing via macports?

    In theory, you can change the handler for specific file extensions to use your own compiler. In practice, it is much easier to just use makefile-based projects.

  • Does anyone use Python with WebLogic

    We have a large group of Python developers. Currently they are using Apache for PSP. I can't find any good papers/documentation on PSP support in WebLogic. Can anyone suggest some ... or maybe we should stick with Apache.
    Thanks for your help,
    Bob Larsen

    not many here
    try there
    http://www.nforcershq.com/forum/viewforum.php?f=29

  • Has anyone used servicelab with Labview?

    I see many questions on how to communicate with Seimens S7 PLC's and to me (an extreme beginner) it looks pretty complicated. We run a package called Servicelab from Servicelab ltd. which makes it very easy to pick out tags and display and graph them. Does anyone have any experience with  using Labview to pull this data and drive Crio modules?

    Hi Offshore,
    It sounds as though you do in fact need LVFPGA considering you are using cRIO units. The link that I sent you primarily discusses fieldpoint units compared to the Siemens product. From what you have mentioned in your post, it appears that you do not have any fieldpoint modules or controllers. I guess I am not quite sure what is meant by "that is what I need to do". I am assuming that it is referring to automation and monitoring systems for a factory monitored in a control room with touch screen monitors.
    Please note that I am not familiar with all of your needs for your project and the cRIO PAC may very well be a better fit for your particular application. Please note that the cRIO platform is extremely flexible and has a great deal of advantages in terms of performance over Fieldpoint modules.
    In order to do a complete comparison of the differences, here is some information on each of the products for your convenience:
    FieldPoint -- Modular Distributed I/O
    http://sine.ni.com/nips/cds/view/p/lang/en/nid/1206
    Compact FieldPoint
    http://www.ni.com/compactfieldpoint/
    CompactRIO Reconfigurable Embedded System
    http://sine.ni.com/nips/cds/view/p/lang/en/nid/14145
    If you are working with your NI rep on this, I guess my advice would be to ask him or her why cRIO would be a better fit for your application based on your discussion with them. Please let me know if you have any questions on what I mentioned. Thanks Offshore and have a great day!
    Best regards,
    Steven

  • Has anyone used DASYLab with either the NI cDAQ-9138 or cDAQ-9139?

    I am thinking of purchasing either the cDAQ-9138 or cDAQ-9139.  We have had good success with DASYLab on prior systems and would like to continue to use DASYLab but would like to use it in conjunction with NI C-Series modules on a Standalone cDAQ platform.  I would like to hear if anyone else has any experience with DASYLab on the cDAQ 9138 or 9139 and are there any issues with interfacing with the C-Series Plug-in Modules?

    Sorry for the delay... we might have taken some time off for the holidays.
    Happy New Year!
    Looking at the spec for the cDAQ-9138 and cDAQ-9139 - DASYLab will require the Windows Embedded system. I do not have any personal experience with either unit.
    We have not specifically tested DASYLab with Windows 7 Embedded, but have had good success with Windows XP embedded. DASYLab will not run in the RT system - you need to stick to LabVIEW for that. 
    You might feel a bit tight with just 2GB of RAM - but Windows Embedded may not need as much memory as standard Windows. Simply disable unneeded services and applications - run with the bare minimum needed to run the DAQ services and DASYLab application.
    DASYLab does support NI-DAQmx devices.
    It's possible that my colleagues in Germany will have some comments... we just have to wait for them to get back from the holiday.

  • Using JAAS with Weblogic 10.3

    Hi all,
    we're porting our application from oc4j r2 to weblogic 10.3 and the last piece of the puzzle seems to be jaas. There's a small problem in that we use our own security model, so we need jaas only to be able to use getCallerPrincipal() from an EJB. So we don't really want to perform authentication, only to save the principal.
    We tried adding our own login module and callback handler and called weblogic.security.services.Authentication.login to get a subject and then weblogic.servlet.security.ServletAuthentication.runAs to save the user. From what I saw the server tries to use the embedded LDAP, so I started looking into security realms. It seems I need to create a dummy authentication provider? Is there an easier way for the dummy login?
    Thanks

    I'm not sure about Authentication Provider. I'll look into it. On the other hand I wrote 3 simple classes, one simple principal, one login module and one simple callback handler.
    Even though I get no exception and finally I call loginContext.login(). But still getCallerPrincipal() from the ejb context returns weblogic's admin.
    In my LoginModule's commit method, I have this:
        public boolean commit() throws LoginException {
            if (succeeded == false) {
                return false;
            } else {
                // add a Principal (authenticated identity)
                // to the Subject
                // assume the user we authenticated is the SamplePrincipal
                userPrincipal = new DummyPrincipal(username);
                if (!subject.getPrincipals().contains(userPrincipal)) {
                    subject.getPrincipals().add(userPrincipal);
                log.debug("Added principal " + username + " to the subject");
                if (debug) {
                    log.debug("Login Module Principals:");
                    for (Iterator i = subject.getPrincipals().iterator(); i.hasNext();) {
                        log.debug("Principal: " + ((Principal)i.next()).getName());
                // in any case, clean out state
                username = null;
                password = "";
                password = null;
                commitSucceeded = true;
                return true;
        }which is essentially taken from Sun's tutorial. It just seems that weblogic does not take into consideration the login I perform through jaas. Do I need to call runAs, doPrivilegedAction, each time an http request is made?

  • Has anyone used appletv with a scaler and/or a HD projector (1080p)

    any experiences?
    There are reports that apple tv can output 720p but also 1080i.
    Confirmations?
    thanks
    Loris

    I use an Anthem Statement D2 with a Gennum VXP video processor.
    The Apple TV native output resolution is 720P. It will also scale to 480P and 1080i internally.
    The output is much better if you leave it at 720P and let an outboard video processor do any additional conversions.
    Hi-def trailers downloaded at 720P/24 are excellent when the Apple TV outputs 720P and the Gennum converts to 1080i to a 55" Fujitsu plasma or to 1080P to a Sony VPL-VW100 projector with a 92" screen. Pretty much the same quality as regular hi-def TV.
    Photos are outstanding.
    Home videos from a Sony hi-def camcorder (1080i/30) also look fine, although iMovie outputs them at 960 x 540.
    Standard-def pictures are OK, but not great.
    I've really enjoyed it so far--looking forward to more 720P content...
    C.

  • Has anyone used this with Mavericks?

    I have a Late 2013 iMac and was interested in this but not sure about other peoples use of it,
    Mediasonic HF2-SU3S2 ProBox 4 Bay Hard Drive Enclosure with USB 3.0 & eSATA 
    Any input would be welcome. Thanks.

    I posted on their forum also and see what members their say. I also asked the question on Amazon from previous buyers. There unit is a very reasonable price and does what I need, But I am not willing to take a chance with the disconnect problems some people are having. I had loads of problems with my four SATA 3 drives in external cases and hubs that were 3.0 USB. So far two hubs were on the shelf and a third plugable 7 port works fine.

  • Has anyone used ReelDirector with their iPhone 4 yet?

    I'm trying to decide between iMovie or ReelDirector, and there's a piece of info on ReelDirector's page that's running contradictory to the reviews.
    Specifically, they say that they're fully compatible with the iPhone 4 and its HD video, yet a bunch of the reviewers say that it's not, and one even specifically says that ReelDirector can only output at 480p. Is it that ReelDirector can read & edit the HD video, making it "fully compatible" as they say, but then downgrades for export?

    Have you tried a hard reset? Or reboot? Hold the top power button and the home button at the same time until the Apple logo appears. Then release. Also, when you hear yourself, is it when you're taking to a particular person? I sometimes hear myself when talking to my wife. We discovered it was how she holds her phone too high up on her ear. When she lowers the phone, I no longer hear myself.

Maybe you are looking for

  • Safari is frequently crashing

    As of today I am using Safari 6.2.2. Not sure what previous version was, maybe 6.1. I am using it on iMac desktop with Mtn Lion 10.8.5. For the last 2 or 3 weeks, Safari was crashing almost on a daily basis. I don't know what the update to 6.2.2 is i

  • Report LOG File Analysis

    Hi I am running a report wich calls couple of other reports. I have given a trace option in the command prompt like this TRACEOPTS=(TRACE_PRF,TRACE_SQL,TRACE_TMS) . My report took 1 hour 45 minuites to run and it created a log file as below. Can any

  • JMS - MQ Series

    Hello, we try to set up a receiving JMS adapter to connect to MQ series, but so far we are unsuccessful. In the dapter framework monitor we get a "MQJMS2008: failed to open MQ queue" error message. In the RWB not much useful information exists. Our C

  • A program designed for windows will not install

    I have been trying install the latest version of the Roche Accu-Chek Compass software on my new MacBook with Leopard, Bootcamp and the latest updated version of Windows XP all installed. The installation disk is OK (It installs on another PC OK. Accu

  • Cannot set 24FPS in Compressor

    Hi I want to burn a 24F DVD and I been following the instructions from here http://www.kenstone.net/fcphomepage/24p_in_FCPnattress.html It says that Compressor will not alter the video file frame rate but i does on mine, my video is shot in 7D, 24fps