How to implement JAAS authorization with the weblogic 8.1 server

i wrote a code for both the authentication as well as authorization using jaas using the config file and the policy file.
This code works fine stand alone for the authentication as well as authorization.
But when i runs this code inside the server (Weblogic 8.1), authorization deos not works according to my policy file. i have given the policy file path in the startWeblogicServer.cmd script. even i have tried to work with my policies in the java.policy file by giving its path in the java.security file. but this is also useless.
Now, i have doubt that either <b>jaas authorization doesn't work with the weblogic</b>(i am using 8.1) or there is some configuration setting is missing from my side.
Is there anybody who can help me to come out of this problem. Or tell me authorization alternative in the weblogic. I will really appreciate if anyone can help with the some example code.

read this
http://www.onjava.com/pub/a/onjava/excerpt/weblogic_chap17/index.html
http://www.onjava.com/pub/a/onjava/excerpt/weblogic_chap17/index1.html

Similar Messages

  • Webservice disappear when I restart the weblogic 8.1 server

    Hi,
    All
    Tools I have Used:
    web-logic Application Server 8.1 ,
    Eclipse 3.2 with the WTP2.0 plug-in ,
    Axis-1.4
    I have developed one web service for soap with attachments as well as client to retrieve these attachment and it is working fine, but the problem is that when I deploy the web service on the weblogic8.1 with sp6 and when I restart the weblogic8.1 Application Server the service is disappeared and I have to again Deploy the service in order to consume it.
    Please Help me out to come out of this problem.
    Regards,
    Rahul.

    Actually I have used Eclipse WTP 2.0 and its wizard for deploying the service to weblogic8.1 server and it is working like moving the ear to the weblogic server after deployment and It also displays the webservice on the weblogic console after I restart server, But when I use client to access service it will display error like Target Service not found.
    Once again I deploy service then It will not give error like that when I consume the service.
    Everything above is working fine with the Tomcat Apache 5.5 server.
    I have try out that, but creates problem with the weblogic 8.1 server.

  • ClassCircularityError in JAAS Authorization with Weblogic Server 10.3

    We are implementing JAAS authorization in which roles and policies are stored in a custom JAAS policy file and users are stored in the embedded LDAP server provided by Weblogic. We are facing problem is authorizing users using the custom policy created.
    We have implemented the JAAS authentication service with weblogic server 10g R3 and user's information stored in embedded LDAP server provided WLS. Given below are the details of implementation for JAAS Authorization:
    Following are the custom classes created:
    1. Custom Principal Class
    public class Principal implements java.security.Principal, java.io.Serializable {
    private String name;
    public Principal() {
    name = "";
    public Principal(String newName) {
    name = newName;
    public boolean equals(Object o) {
    if (o == null)
    return false;
    if (this == o)
    return true;
    if (o instanceof Principal) {
    if (((Principal) o).getName().equals(name))
    return true;
    else
    return false;
    else
    return false;
    public int hashCode() {
    return name.hashCode();
    public String toString() {
    return name;
    public String getName() {
    return name;
    2. Custom Permission Class
    public class ActionPermission extends Permission {
         public ActionPermission(String name) {
              super(name);
         @Override
         public boolean equals(Object obj) {
              if ((obj instanceof ActionPermission)
                        && ((ActionPermission) obj).getName().equals(this.getName())) {
                   return true;
              } else {
                   return false;
         @Override
         public String getActions() {
              return "";
         @Override
         public int hashCode() {
              return this.getName().hashCode();
         @Override
         public boolean implies(Permission permission) {
              if (!(permission instanceof ActionPermission)) {
                   return false;
              String thisName = this.getName();
              String permName = permission.getName();
              if (this.getName().equals("*")) {
                   return true;
              if (thisName.endsWith("*")
                        && permName.startsWith(thisName.substring(0, thisName
                                  .lastIndexOf("*")))) {
                   return true;
              if (thisName.equals(permName)) {
                   return true;
              return false;
    Following are the configuration changes:
    1. Added custom policy to weblogic.policy.
    grant Principal com.scotia.security.authorization.Principal "test" <User defined in the embedded LDAP server of WLS>{
    permission com.scotia.security.authorization.permission.ActionPermission "viewScreen";
    2. Set the java security manager in startWeblogic.cmd file.
    %JAVA_HOME%\bin\java %JAVA_VM% %MEM_ARGS% %JAVA_OPTIONS% -Dweblogic.Name=%SERVER_NAME% -Djava.security.manager -Djava.security.policy=%WL_HOME%\server\lib\weblogic.policy %PROXY_SETTINGS% %SERVER_CLASS%
    3. Set Realm "Security Model" to "Custom Roles and Policies".
    Right now we are facing the given below exception:
    java.lang.ClassCircularityError: com/scotia/security/authorization/THORPrincipal
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:247)
         at sun.security.provider.PolicyFile.addPermissions(PolicyFile.java:1381)
         at sun.security.provider.PolicyFile.getPermissions(PolicyFile.java:1268)
         at sun.security.provider.PolicyFile.getPermissions(PolicyFile.java:1231)
         at sun.security.provider.PolicyFile.getPermissions(PolicyFile.java:1167)
         at sun.security.provider.PolicyFile.implies(PolicyFile.java:1122)
         at weblogic.security.service.WLSPolicy.implies(Unknown Source)
         at java.security.ProtectionDomain.implies(ProtectionDomain.java:213)
         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:301)
         at java.security.AccessController.checkPermission(AccessController.java:546)
         at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
         at java.lang.SecurityManager.checkRead(SecurityManager.java:871)
         at java.io.File.exists(File.java:731)
         at weblogic.utils.classloaders.DirectoryClassFinder.getSource(DirectoryClassFinder.java:36)
    Please help if anyone has some clue regarding this exception. We tried checking the jdk version used by eclipse and weblogic and found it to be same.

    1. Custom Principal Class
    public class Principal implements java.security.Principal, java.io.Serializable {Rename it. You are asking for trouble naming a class after an interface it implements.
    java.lang.ClassCircularityError: com/scotia/security/authorization/THORPrincipalWhat's that class? You haven't shown us.

  • I can no longer log in with the Weblogic (administrator) user to OBIEE...

    Hi all, first post.
    We are having a rather difficult time with Oracle Support around here, and we have finally decided to support our installation by ourselves.
    Last week he had an issue where our Web catalog was corrupt (BI Presentation didn't start, showing us an HTTP 500 error). We stopped the platform, moved the catalog directory and re-started the platform, so that it could automatically be recreated. We then copied the users and catalog directory back to their original position, and everything seemed to be fine.
    Unfortunately, this was not to be. For some reason, our Weblogic (administrator) password cannot log in to the OBIEE front end anymore. We can still manage the platform via EM using this user, though.
    The main issue here is that some users created dashboards and reports with the Weblogic user, so they can't modify them now. Also, they are having several issues displaying the results, specifically with the styles. Apparently, styles were lost when we copied the directory, and have no clue as to how to get them back.
    So, my question would be - how can we fix this issue?
    Thanks for any help!
    Edited by: user1118975 on Apr 3, 2012 5:28 PM

    Hi,
    I assume you are talking about OBIEE dashboard screen , when you mentioned about the OBIEE front end screen.
    So, I would like to ask you what error does not throw when you say the weblogic user cannot login to OBIEE? Does it say Invalid Username/password or An error occurred during authenticatio system?
    If its the latter, try restarting the services through OPMN and see if you can log back in.
    I do not think this might be valid, but you may want to refresh the user GUID's once more. Change the <upgradeandexit> tag in instanceconfig.xml to true and REFRESH_GUID to YES in NQSConfig.ini and restart the BI Services. Once again, revert the parameters and start once more and check.
    Hope this helps.
    Thank you,
    Dhar

  • Webinar: How to implement secure scenarios with SAP NW PI 7.1

    SAP Intelligence Platform & NetWeaver RIG APJ Expert Call
    Dear valued SAP Experts,
    Next SAP Intelligence Platform & NetWeaver RIG Expert Call Session will take place on Tuesday, August 18.
    The SAP Intelligence Platform & NetWeaver RIG Expert Call Sessions are designed to support consultants, partners and customers  during their implementation projects. The sessions cover all different aspects of SAP NetWeaver and are aimed at
    thus provide knowledge which is not available via standard training courses. The session duration is typically 60min and includes questions and answers.
    Tuesday, August 18, 2009:
    How to implement secure scenarios with SAP NetWeaver Process Integration 7.1
    Time: 2.00 - 3.00 p.m. Singapore Time (UTC +8)
    This event will feature Makoto Sugishita with the SAP Intelligence Platform & NetWeaver Regional Implementation Group.
    Makoto provides the following abstract:
    In this session you will learn more about the core security concepts that are provided with the service-oriented architecture (SOA)
    management capabilities in SAP NetWeaver Process Integration (SAP NetWeaver PI). This session will cover main use cases and
    supported scenarios of secure SAP NetWeaver PI deployments. 
    SAP Connect Link: https://sap.emea.pgiconnect.com/I016095
    (no passcode needed)
    Dial in:
    For dial in details please register here http://www.surveymonkey.com/s.aspx?sm=EFeuZl9PxrwKOW5i5W556g_3d_3d
    Kind regards,
    Sarma Sishta
    SAP Intelligence Platform & NetWeaver RIG APJ

    hi,
    I'm making this a sticky thread till August 18 so it will have better visibility
    Regards,
    Michal Krawczyk

  • How to change a connection with the database in Runtime?

    How to change a connection with the database in Runtime?
    My connection was made using ADF Business component (ApplicationModule).
    ADF Swing.
    JDeveloper Studio 11.1.1.4.0.

    When deploying ADF applications with database connection, you should be using JDBC data sources configured in the weblogic server.
    You could change the JDBC data sources to a different DB instance or location - by changing the JDBC data source and restarting the weblogic server.
    For more details, check
    http://techiecook.wordpress.com/2010/12/02/oracle-weblogic-adf-datasources/
    Thanks,
    Navaneeth

  • How to implement Shopping cart functionality in weblogic portal 10.3

    Hi,
    Can someone help me out on how to implement Shopping cart functionality in weblogic portal 10.3?
    Thanks,
    Uttam

    One piece of advise I can give is to NOT* use the Shopping Cart fuctnionality inherent in WLP (com.beasys.commerce.ebusiness.shoppingcart. The Online Commerce functionality in WebLogic Portal has been deprecated.
    Brad

  • How to register RMI object with runnign Weblogic Server instance?

    I need to write some RMI objects(non EJB) and register it with the already running weblogic server so that I can access them from a RMI client.
    Can some help me with this?

    So more precisely the way I am doing it is
    I have a remote interface
    package com.myserv.rmi;
    public interface NSPQueryExecutionService extends java.rmi.Remote
    public void getQueryExecutionDelegate();
    I have the Implementation as
    package com.myserv.rmi;
    import java.util.Properties;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    public class NSPQueryExecutionServiceImpl
    implements NSPQueryExecutionService
    public static final void main (String[] arg) {
    try {
    Properties properties = null;
    properties = new Properties();
    properties.put (Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    Context context = new InitialContext(properties);
    context.bind("QueryExecutionService", new NSPQueryExecutionServiceImpl());
    System.out.println("================================> QueryExecutionService Bound");
    } catch (Exception ex){
    ex.printStackTrace();
    System.out.println("Unable to start QueryExecutionService");
    public NSPQueryExecutionServiceImpl()
    public void getQueryExecutionDelegate()
    System.out.println("inside remote");
    I compile these classes and I do a weblogic.rmic as
    java weblogic.rmic com.myserv.rmi.NSPQueryExecutionServiceImpl
    I run the NSPQueryExecutionServiceImpl class to bind the RMIObject with the weblogic server.
    Finally when I try to access this from my client it is able to access the object but when I invoke an operation on it gives the exception that RJVM is already shutdown.
    Edited by kuldeep.sharma at 02/15/2007 9:37 AM

  • How can I merge folder with the same name so that the content does not replace the other

    How can I merge folder with the same name so that the content does not replace the other?

    >
    That's only a good idea if the semantics of sayHello
    as defined in MyInterface suggest that a
    RemoteException could occur. If not, then you're
    designing the interface to suit the way the
    implementing classes will be written, which smells.
    :-)But in practice you can't make a call which can be handled either remotely or locally without, at some point, dealing with the RemoteException.
    Therefore either RemoteException must be part of the interface or (an this is probably more satisfactory) you don't use the remote interface directly, but MyInterface is implemented by a wrapper class which deals with the exception.

  • How to integrate Note Service with the webservice space?

    Hi
    Can anyone please guide me how to integrate *"Note Service"* with the webcenter spaces. I need to implement "Personal Note" in my webcenter space application. Please can anyone give me article showing step by step procedure to implemennt note service with webcenter spaces or some sample examples.
    Regards
    Raj

    Hi
    Already i have seen this document, here they did not mention how to get the "Note TaskFlow" in resource catalog. In Resource catalog I didn't find any component named "Note TaskFlow".
    To make it visible in resource catalog. What should I do?
    To integrate Webcenter Services(link, mail, notes, etc..) with webcenter spaces, what do i need to do? Itseems all services are in the form of taskflows. How can i make it enable and to bring it in resource catelog?
    Regards
    Raj

  • How to put a check with the date

    Hi,
    I have created a ztable with 3 fields .
    clientcode(3),
    date,--date geneated
    version--- fileversion
    i need to update this table everytime i execute the data. Every time version shd get incremented when i execute the program.  When i excute the program next day version shd be updated by '1'.
    i wrote the code for version updated i'm not getting the logic how to put a check with the date.
      SELECT *
       FROM zfi_enetflver
       INTO TABLE gt_flver.
      SORT gt_flver DESCENDING.
      CLEAR: gv_dt, v_file.
      CONCATENATE sy-datum6(2) sy-datum4(2) INTO gv_dt.
      READ TABLE gt_flver WITH KEY client_code = gv_clcd.
      IF sy-subrc = 0.
        idx = sy-tabix.
        IF gt_flver-zdate = ' '.
          gt_flver-zdate = sy-datum.
        ENDIF.
        IF gt_flver-version = ' '.
          gt_flver-version = '001'.
          gv_filever = gt_flver-version.
          MODIFY gt_flver INDEX idx TRANSPORTING zdate version.
          MODIFY zfi_enetflver FROM TABLE gt_flver. "TRANSPORTING version.
          CONCATENATE 'E:\' 'ENET\' gv_clcd gv_dt '.' gt_flver-version INTO v_file.
        ELSE.
          gt_flver-version = gt_flver-version + 1.
          gv_filever = gt_flver-version.
          MODIFY gt_flver INDEX idx TRANSPORTING version.
          MODIFY zfi_enetflver FROM TABLE gt_flver .
          CONCATENATE 'E:\' 'ENET\' gv_clcd gv_dt '.' gt_flver-version INTO v_file.
        ENDIF.
      ENDIF.
    clientcode is the key field in ztable do i need to make date field key ??
    please help me with the logic

    You need to implement below logic:
    1. check if field_date = sy-datum. in this case do nothing.
    2. else . move sy-datum to field_date .
    3. modify your internal table with field_date .
    4. populate final table to database table .
    hope you get it.

  • HT1695 How to connect my iPhone with the printers at school? Many thanks

    How to connect my iPhone with the printers at school? Many thanks

    They must be Airprint capable printers... if they are not, then there is no supported way of connecting to them.
    Airprint 101

  • HT201269 I had an old PowerMac and now i have the MacBook Pro.  I am not use to the new iTunes.  I use to be able to drag music that I had added onto my computer from a CD to my iPhone or iTouch.  How do I do that with the new iTunes?

    I have CDs that I want to import onto my new MacBook Pro to my iPhone.  I am not use to the new iTunes with the Mountain Lion software.  I had an old PowerMac that had the Leopard software and I was able to drag those songs to my iPhone.  I can't find that option.  When I find the song I want to add to my iPhone, I tried dragging it to the top when it shows that my iPhone is connected with iTunes.  Or how do i do this with the Cloud?  I am new to that as well.  Seems like it just held my purchased songs from iTunes.

    iCloud only has content purchased (or free) from iTunes. Ripped music or music from other sources is only on your computer. As the iPhone can only sync with one computer at a time you should copy the iTunes folder from the old computer to the new one. It's in the Music folder on the old one, just copy the entire folder to the Music on the new computer. When you first sync your iPhone content will be replaced by the content of the new computer.
    You can optionally enable iTunes Match. This searches the non-iTunes content in iTunes or on your iPhone and finds the original digital version on the Internet if it exists. This then becomes your backup. If you have music that it cannot find it will upload it to your cloud storage, but you may have to pay for the storage if it is over 5 GB total (along with your backup). iTunes content and Match content are not included in the 5 GB free limit.
    Usually to fix mail issues just delete the account, reset (reboot) the phone by holding HOME and SLEEP until an Apple logo appears, and adding the email account(s) back.

  • I updated my ipod and it deleted my entire library how do I restore it with the backup I have saved?

    I updated my ipod and it deleted my entire library.  How do I restore it with the backup I have so all songs will be available in the cloud; which I paid extra Money to increase memory for?

    The backup that iTunes makes does not include apps, music, synced videos and photos. Se:
    iTunes: About iOS backups
    You will have to sync the items back form yur computer/iTunes library to the iPod via iTunes. If they are not on the computer you can redownloa d some iTunes purchases by:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • In Pages 09 we can do Mail Merge and Import Styles from a document. Can someone please explain how we can do this with the new version of Pages 5.1. Even Apple solutions are only valid for Pages Version 09. What a DOWN GRADE!

    In Pages 09 we can do Mail Merge and Import Styles from a document. Can someone please explain how we can do this with the new version of Pages 5.1. Even Apple solutions are only valid for Pages Version 09. What a DOWN GRADE! Thank god Pages 09 is still there.

    …and the other 98 missing features.
    Just use Pages '09, which should be in your Applications/iWork folder.
    Rate/review Pages 5 in the App Store.
    Peter

Maybe you are looking for

  • I have a Panasonic with out HDMI . I need to conect apple TV

    My panasonic tv I do not have HDMI . I need to conect apple tv. I need the specific adapter from HDMI into composite out. need help. please Thank you

  • Security for Dunces

    I'm working on a pdf for limited distribution.  It appear that my options for securing a pdf is limited to this (using only Acrobat software): 1) password protecting it (1 or 2 levels depending on whether or not I want people to be able to fill out f

  • Second Level Approval

    Hi,    <b>i am facing new problem.    say for example,   My SC has two line items. first item should go to APPROVAL1 and second item should go to APPROVAL2. till here every thing is fine,   when if one more approval need for both items , say for exam

  • Upgraded to LR 5.6 now can't see any of my photos

    I upgraded to LR 5.6 but none of my photos are visible.  All I get is a grey box.  If I go into develop mode the histogram is displayed but again no photo.

  • AMFPHP  Help on Error

    I dowloaded the PHP_RIA SDK from adobe, but after install PHP, MYSQL, when run the application showme this error. Somebody know why...? Thanks. Error #2044: Unhandled NetStatusEvent:. level=error, code=NetConnection.Call.BadVersion at amfphp/onInit()