How to obtain a user's roles

We are migrating a OC4J app to weblogic 10.3. I won't go into all the gory details, but there was a security component that would read the jazn-data.xml file and return a list of all the roles a username was mapped to. Once I define the users and roles in the WL realm, is there any programmatic API that given a principal, can return all the roles that the principal is assigned to?
Thanks,
Leor

Hi Leor,
You can use a WLST script. I don't have a finished script for what you want, but here is an interactive example which should show how you navigate the WLST structure, down to the security information:
[bea@myserver esbDomain]$ . bin/setDomainEnv.sh
[bea@myserver esbDomain]$ java weblogic.WLST
Initializing WebLogic Scripting Tool (WLST) ...
Welcome to WebLogic Server Administration Scripting Shell
Type help() for help on available commands
wls:/offline>
wls:/offline> connect('weblogic','weblogic','t3://myserver:7011')
Connecting to t3://myserver:7011 with userid adadm ...
Successfully connected to Admin Server 'esbAdminServer' that belongs to domain 'esbDomain'.
Warning: An insecure protocol was used to connect to the
server. To ensure on-the-wire security, the SSL port or
Admin port should be used instead.
wls:/esbDomain/serverConfig> cd ('SecurityConfiguration')
wls:/esbDomain/serverConfig/SecurityConfiguration> ls()
dr--   esbDomain
wls:/esbDomain/serverConfig/SecurityConfiguration> cd ('esbDomain')
wls:/esbDomain/serverConfig/SecurityConfiguration/esbDomain> ls()
dr--   DefaultRealm
dr--   Realms
-r--   AnonymousAdminLookupEnabled                  false
-r--   CompatibilityConnectionFiltersEnabled        false
-r--   ConnectionFilter                             null
-r--   ConnectionFilterRules                        null
-r--   ConnectionLoggerEnabled                      false
-r--   ConsoleFullDelegationEnabled                 false
-r--   Credential                                   ******
-r--   CredentialEncrypted                          ******
-r--   DowngradeUntrustedPrincipals                 false
-r--   EnforceStrictURLPattern                      true
-r--   EnforceValidBasicAuthCredentials             true
-r--   Name                                         esbDomain
-r--   NodeManagerPassword                          ******
-r--   NodeManagerPasswordEncrypted                 ******
-r--   NodeManagerUsername                          nodemgr
-r--   Notes                                        null
-r--   Type                                         SecurityConfiguration
-r--   WebAppFilesCaseInsensitive                   false
-r-x   findDefaultRealm                             WebLogicMBean :
-r-x   findRealm                                    WebLogicMBean : String(realmDisplayName)
-r-x   findRealms                                   WebLogicMBean[] :
-r-x   freezeCurrentValue                           Void : String(attributeName)
-r-x   generateCredential                           [B :
-r-x   isSet                                        Boolean : String(propertyName)
-r-x   unSet                                        Void : String(propertyName)Regards Peter

Similar Messages

  • How to use the user and role API's and where to use it

    Hi All,
    I have configured SSO for my UCM11g. Now my application authenticates through the Oracle SSO login page. Currently it is working with SQL authenticator.
    Now, i have to use LDAP authenticator. when i will configure the LDAP authenticator, i have to use the user and role API's to fetch the user profile information from LDAP. i have got the API's which will be used to fetch the respected information, but i am not getting as where i will write those java programs and how this API will be used in my application. what settings i need to do on it so that application uses the API's. ?
    Please can anyone help me on this.
    thanks,
    Saurabh

    Hi, Mithu,
    Thanks a lot for your help in advance.
    I have carefully read the document: https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6b66d7ea-0c01-0010-14af-b3ee523210b5.
    Now, I think I have to set the processor of every actions in every process if I use the GP for processing the workflow.
    I am better to hope that I can set the processor to the role for every actions in every process in the runtime through get the organizational structure in the WDA(webdynpro for java or webdynpro for java). Thus, the customer don't set the processor to the role for every action in every process when runing in the GP.   I don't know how to do this. 
    Whether the function is not supported in the GP? If so, I have to config two organizational structure: in the R/3 and in the Portal. I don't think our customer don't receipt this solution.
    Do you give me some hints? Thanks a lot.  My email: [email protected]
    Thanks again.
    Thanks & Regards,
    Tao

  • How to config the user and role in the runtime for executing in the GP?....

    Hi Experts,
    I am learning GP(Guided processor)according the document
    http://help.sap.com/saphelp_nw70/helpdata/en/44/0d5b8f250d5cfae10000000a155369/frameset.htmneed.
    I meet two question when I learn the GP.
    The first:
    This document don't tell me how to config the member framework of the company.  After I design the GP, I have to config the user and role in the runtime for executing. I hope I can use the WDA(webdynpro for java or webdynpro for java) to implement to config the user for executing in the runtime. Thus, the customer don't config the user when runing the GP. But I don't know how to do this.
    I need a document guide step by step to tell me how to do this.
    The second:
    If I use the workflow in the GP, I have to install and config the NWDI(Netweaver Development Infrastructure). Now I have installed the NWDI, but I don't know config it so that I can download it to my machine for develop the workfolw in the GP.
    Do you give me some hints? Thanks a lot.
    Thank a lot.
    Best regards,
    tao

    Hi, Mithu,
    Thanks a lot for your help in advance.
    I have carefully read the document: https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6b66d7ea-0c01-0010-14af-b3ee523210b5.
    Now, I think I have to set the processor of every actions in every process if I use the GP for processing the workflow.
    I am better to hope that I can set the processor to the role for every actions in every process in the runtime through get the organizational structure in the WDA(webdynpro for java or webdynpro for java). Thus, the customer don't set the processor to the role for every action in every process when runing in the GP.   I don't know how to do this. 
    Whether the function is not supported in the GP? If so, I have to config two organizational structure: in the R/3 and in the Portal. I don't think our customer don't receipt this solution.
    Do you give me some hints? Thanks a lot.  My email: [email protected]
    Thanks again.
    Thanks & Regards,
    Tao

  • How to obtain all users have logged BIEE

    How to obtain BIEE all users have logged, now I want to prevent users from repeated login,  who knows

    Moderator Action:
    This is a duplicate of:
    https://forums.oracle.com/thread/2564878
    and you already have constructive responses in that original thread.
    This new post serves no purpose.
    It is locked.

  • How to implement Oracle user/role security with Access front end?

    Hi,
    We have successfully migrated our Access database tables to Oracle 10g using SQL developer. We've recreated all the users and roles(i.e., access groups) in Oracle and granted rights to tables.
    In the Access front end database, in the Database window we have saved linked Oracle tables which replaced the Access tables. The forms, reports, queries run fine with the linked Oracle tables. All the linked table use one ODBC DSN to the Oracle database with the same Oracle user id.
    We need to be able to authenticate users into the Oracle database and RE-link the tables based on their own unique user id. By during so we can allow users to use the Oracle standard user id/role and system privileges to control select, update, ect. rights to the database.
    I've been able to use the VB code within Access to logon into the database with a unique id, but I have not been able to find out how to RE-link the tables to the unique user id using VB. There should be some way to relink tables dynamically, based on users login into the Access front end.
    I don't know a great deal about Access projects, but I do know with SQL server allows login into your Access project and link tables dynamically.
    Can someone give me some assistance or point me in the right direction?
    Thanks in advance,
    Larry

    We had one of our programmers here come up with a VB code solution for re-linking table within Access. However the relinking takes 3-4 minutes for 100+ tables.
    In an effort to help you understand the situation better, I will attempt to elaborate on the problem:
    We have an Access 2003 application which currently has a front end using Access(forms, reports, queries, & VB code) and a MS Access 2003 backend.
    We have migrated the backend tables to Oracle. However, we still have a need to maintain the front end in Access, since we have over 60 forms, 40 reports, 200+ queries in Access. Its easy to understand, we have a significant investment in the front end(Obviously, the plan is to migrate the front end also at some future date).
    In order to utilized the existing front end, we have to validate and modify the current front end connections to the new Oracle backend. One of the features of Access is that you can "link" tables and save the link for runtime. Each Access table can have its own link which is a separate ODBC/JET connection. As such, each separate link has its own userid/database information.
    The other issue with using the Access front-end is that Access utilizes a workgroup file to implement user and group security. The workgroup file contains all the users and which groups the users belong to in Access. Then within Access, you allow users access to object(tables, queries, ect) by their userid and or group. When users open an Access database with Access security enabled, they are required to log into Access. The login is authenticated by the workgroup file. Once, logged into Access, users have rights to Access objects based on their rights granted to their userid and groups they belong. The problem here is that when you remove the linked Access tables and replace them with linked Oracle tables, Access has knowledge about Oracle table rights granted to users; nor would you expect it to.
    The dilema is the disconnect between Access and the fact Oracle utilizes a similar but much more sophisticated security model. It creates users and roles(which are similar to Access groups), and again this is independent of Access security.
    Our solution was to still use the Access workgroup file security along with the Oracle security model. By using the Access userid and then creating a similar Oracle userid with similar table rights granted in Access, you could apply security within Access and also with the Oracle database.
    For example, a user BOB logs into Access via the workgroup file, using VB code, Access then establishes a Oracle connection logining into Oracle using the same unique userid BOB into Oracle.
    After connecting and validating user BOB into Oracle, then the Access tables are relinked to Oracle using the user BOB userid and table rights.
    This Oracle userid has been granted table rights specific for this userid.This allows the user BOB to use the Access application and still be authenticated into the Oracle database.
    The problem with this solution is that the relinking of the saved Access tables takes 3-7 minutes for about 100+ tables. This is not acceptable for users each time they log into the application.
    Our current alternative is to use one Oracle userid to login each user, and use Access form restrictions/security to allow/prevent users from updating/viewing data. Obviously, this is not the optimal solution in respect to security, but it at least allows us to control access to the data(via the forms) by using one logon required for each user, and quick startup time for the application.
    I understand SQL server does a better job in integration, but we use Oracle which is what I am trying to work with.
    Larry

  • How can i obtain a user guide for the ipod nano 16GB 5th gen. with out printing it off the computor

    How can i obtain a user guide for the ipod nano 16GB 5th gen. without printing it off the computor.

    You can't, at least not the one provided by Apple.
    B-rock

  • How to add multiple users to a role in ECC 6.0

    How to add multiple users (say 1000) to a role in ECC 6.0?

    Hi
    You can actually add multiple users to a role using transaction SU01. From SU01, use the menu Environment->Mass Changes.
    Here you can manually add the users, select them by address or authorisation data. Once you have your user list, you can then add or remove roles and/or profiles.
    Secondly , You can use SU10 to do mass changes to multiple users including role assignments per logical systems
    Also check the following link:
    http://www.sap-img.com/bc021.htm
    I hope this should do it
    regards
    Chen

  • How to get the list of roles assigned to a user in all the child systems

    how to get the list of roles assigned to a user in all the child systems from CUA SYSTEM

    Try transaction SUIM in your CUA system. Go to user, cross-system information, users by roles. If you run it wide open, you'll get all users and all roles assigned for all systems managed in your CUA.
    Krysta

  • How can I know the security role of the logged in user

    When you design an enterprise bean or Web component, you should always think about the kinds of users who will access the component. For example, an Account enterprise bean might be accessed by customers, bank tellers, and branch managers. Each of these user categories is called a security role, an abstract logical grouping of users that is defined by the person who assembles the application. When an application is deployed, the deployer will map the roles to security identities in the operational environment.
    But wondering when I log into my application with some user name and password (specified in my Oracle database),wondering how this works with the security role I created .How does J2EE know the security role of the logged in user.
    Thanks
    Manohar

    shet wrote:
    role at run time.
    When I login say as "manju" and password as "money" then how does it know that this user belongs to this security role.Is that the j2ee administrator has to say that user manju has this this security role.Programmitically how does it really work.I am confusedThe j2ee implementation assigns the roles using the JAAS module you have configured for your application on your application server. different JAAS modules get roles in different ways. many allow a single static role to be assigned using a config file. if using a database, often there will be configuration to specify additional database fields which specify the role for a given username.
    At runtime, a developer can test roles using methods like EJBContext.isCallerInRole().

  • How to create new user and How can i assign end user roles

    Hi,
    I am new to SAP, please explain how to create end users and their roles
    Thanks
    ravi

    Hi,
    Roles are decided by IT managers. Suppose if Persons who are working in shopfloor or production side
    give authorization to Production order create , change and Confirm like that etc
    1. In role maintenance (transaction PFCG), choose the Authorizations tab page.
    2. To change the authorization data for the transactions assigned to the role, choose Change Authorization Data or Expert Mode for Profile Generation. Otherwise, a dialog box appears in expert mode (see Regenerating an Authorization Profile After Changes).
    Please take telp from Basis person also refer this link,
    http://help.sap.com/saphelp_46c/helpdata/EN/52/6714a9439b11d1896f0000e8322d00/frameset.htm
    Thanks

  • How to obtain license for 10 users of siebel software?

    Hi All,
    Can anybody please tell me:
    How to obtain license for 10 users of siebel software?
    how much does that cost (in US $)?
    and how to become partner with siebel for implemeting siebel applications
    Thanks,
    viswambhar sarma.

    Updated: March 2015
    National Instruments provides this forum as a courtesy to its customers. However, this is not the primary method for requesting support and assistance with the DASYLab product. NI does not actively sell the DASYLab software, nor does it actively support it.
    Where else can you obtain assitance?
    Your reseller - it's likely that they are familiar with your hardware and can provide help.
    The www.dasylab.com web page has updates, drivers, product information, an extensive list of technical notes.
    Measurement Computing Corporation has product information, product updates, and support information.
    In Europe, MeasX GmbH & Co Kg sells, supports and enhances the DASYLab software
    We recommend that you contact your reseller first. They know your hardware and software environment, and are most likely to be able to assist you quickly.
    You can request help directly from a support engineer by going to the Support section of the www.dasylab.com web page. This is automatically routed based on geography,  to the person best suited to assist you.
    If you post a question in this forum, we cannot guarantee a response time.
    When requesting support for DASYLab
    DO NOT post your full DASYLab serial number
    Please tell us
    the version of your DASYLab software, 
    the level of your software (Lite, Basic, Full, Pro)
    the exact DAQ device by manufacturer and model,
    your operating system and computer,
    and, if appropriate, a copy of your worksheet.
    - cj
    Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.

  • How to find the user - role assignments in the database for EP6 SP9?

    L.S.,
    We have a quite specific requirement: to see which users have access to our portal environment (EP6 SP9). It does not immediately matter (though would probably still be nice to know if possible) which roles users have exactly.
    I've been looking in the database to find user-to-role assignments there, but I'm unable to find any. The closest I got is the PID filed in the UME_STRINGS table, but users remain listed there even when all their portal roles are revoked afterwards. Any ideas?
    Kind Regards,
    Steven Dijkman

    hi Steven,
         Sorry but you will have to write some code. the following lines of code will work for you.
    IRoleSearchFilter rolefilter = UMFactory.getRoleFactory().getRoleSearchFilter();
              ISearchResult result = UMFactory.getRoleFactory().searchRoles(rolefilter);
              while (result.hasNext()) {
                   String rolestr = (String) result.next();
                   IRole r = UMFactory.getRoleFactory().getRole(rolestr);
                   response.write(r.getDisplayName());
                   response.write("<br>");
                   Iterator users = r.getMembers(true);
                   while (users.hasNext()){
                        String userstr = (String)users.next();
                        IUser user = UMFactory.getUserFactory().getUser(userstr);
                        response.write(user.getDisplayName());

  • How to revoked 'ANY' privileges being granted to user or role

    Hi all,
    I need to be revoked all 'ANY' privileges that have been granted to all non-DBA user or Role in the database.
    To achieve this what i assume is
    1> i need to find out Role as well all user who are non-DBA
    2> For all non-DBA user i need to find out and revoked 'ANY' privileges if they would have.
    Here i need some information about all tables related to privilieges and non-DBA users
    The below are some example as a reference.
    USER Privileges
    CTXADMIN SELECT ANY TABLE
    PUBLIC MERGE ANY VIEW
    LAXORA ANALYZE ANY
    EXECUTE ANY PROCEDURE
    GRANT ANY ROLE
    INSERT ANY TABLE
    SELECT ANY TABLE
    LAX_NEW ANALYZE ANY
    CREATE ANY TABLE
    DELETE ANY TABLE
    DROP ANY TABLE
    INSERT ANY TABLE
    SELECT ANY TABLE
    USER_NEW SELECT ANY TABLE
    Thank n reagrds
    Laxman

    Hi,
    LAX_ORA wrote:
    Hi all,
    I need to be revoked all 'ANY' privileges that have been granted to all non-DBA user or Role in the database.
    To achieve this what i assume is
    1> i need to find out Role as well all user who are non-DBA
    2> For all non-DBA user i need to find out and revoked 'ANY' privileges if they would have.
    Here i need some information about all tables related to privilieges and non-DBA users
    The below are some example as a reference.
    USER Privileges
    CTXADMIN SELECT ANY TABLE
    PUBLIC MERGE ANY VIEW
    LAXORA ANALYZE ANY
    EXECUTE ANY PROCEDURE
    GRANT ANY ROLE
    INSERT ANY TABLE
    SELECT ANY TABLE
    LAX_NEW ANALYZE ANY
    CREATE ANY TABLE
    DELETE ANY TABLE
    DROP ANY TABLE
    INSERT ANY TABLE
    SELECT ANY TABLE
    USER_NEW SELECT ANY TABLE
    Thank n reagrds
    LaxmanYou can fiind out all the users and roles who have been granted system privileges by querying dba_sys_privs.
    For example:
    SELECT     grantee
    ,     privilege
    FROM     dba_sys_privs
    WHERE     privilege     LIKE '% ANY %'
    ;The grantee column includes users and roles together.
    If you want to find which users have the dba role, then query dba_role_privs.

  • HI,how to find user gorps roles?

    hi,
    In my system i have many usergroups.
    each usergroup having one to many roles.
    how to find out and display roles
    for each usergroup?
    can any one help me,
    thanks,
    jpullareddy

    hi,
    i solve my self.
    i am getting values
    jpullareddy

  • How to create a user in UME Database using web dynpro java custom application

    Hi,
    Can you please suggest me how to create a user in UME Database using web dynpro java custom application.
    My Requirement is user can register his/her user id in SAP Portal 7.3 UME database.
    Please suggest me.
    Thanks and Regards,
    Amit

    Hi Amit,
    Generated Documentation (Untitled)
    This is what you're looking for, there's no real cook-book -- though Amey mentioned there might be some material on SDN, perhaps some tutorials.
    You should be looking into com.sap.security.api.IUserFactory, methods newUser(String) which gives you and IUserMaint and commitUser(IUserMaint, IUserAccount) -- IUserAccount can be obtained using com.sap.security.api.IUserAccountFactory, method newUserAccount(String)
    Hope it helps,
    D.

Maybe you are looking for