Creator 2 Portlet project and accessing portal authenticated user

Hello friends,
I have started a portlet JSR-128 project with Creator 2.
The question is how can I access the user that is authenticated thru portal single-signon feature?
Thank you so much

There is a standard way to access users. It requires adding the user attributes you would like to access to the portlet.xml file and then accessing them with the following code:
Map userInfo = (Map) request.getAttribute(PortletRequest.USER_INFO);To learn more, go to http://www.manning.com/hepper/. Read the download instructions and download your free version of the book "Portlets and Apache Portals". There is a section of the book called "Accessing User Attributes" which has the info you need.
Let me know if you get it to work!!!
It is easier to access user info with the specific portal APIs, but it makes your code less portable.
Thanks,
Dean

Similar Messages

  • Example JSF Portlet Project for WebLogic Portal 10.3.2

    Hi,
    does anyone have an example JSF Portlet Project for WebLogic 10.3.2 using the default JSF implementation 1.2.
    I tried to implement the example of the document "Developing JSF Portlets with WebLogic" but I always get a ClassCastException.
    java.lang.ClassCastException: com.bea.portlet.container.RenderRequestImpl
    Thx in advance
    Edmund

    My approach was to programmatically redirect to the page again with _nfpb=false. I do this in the handlePostbackData() method in the portlet's backing file.
    redirectUrl = redirectUrl.replaceAll("_nfpb=true", "_nfpb=false");          
    PortletBackingContext.getPortletBackingContext(request).sendRedirect(redirectUrl);
    Matthias Rohe
    [email protected]
    Edited by: user7964913 on 29.09.2010 04:06

  • Help needed with Sun Java Studio Creator and EJB in a Portlet Project

    Hi
    I have created an web-application with JSF in Sun Java Studio Creator 2. The web application uses a lot of EJB's which acts as the dataProviders. In a typical jsp page i have more that one data providers(the EJB's) getting used. When i run the project everything opens up properly in the browser and the application seems to be fine.
    But when i create a JSP 168 Portlet project and do exactly the same thing for some reason the Apache Pluto(comes as the default Portlet Container with Studio Creator) conks off.
    Then i started going ahead step by step:
    1. First i created a portletpage and added only one dataProvider(EJB) and ran the project...It gets deployed properly in Pluto and the browser comes up and everything shows up fine.
    2. Just to re-confirm i did the same thing with another dataProvider(EJB). So still we have just 1 EJB in the portlet page. As expected it also worked fiine.
    3. Then when I added more that one dataProviders(EJBs) in the porlet page the Apache Pluto conks off(saying that Pluto is not available)
    I tried doing a lot of things but nothing works...Surprisingly the same thing works when u create a JSF web Application project but the same thing does not work when u create a JSR 168 JSF Portlet Project...
    Did anybody face the same problem..Is it a bug in the Studio Creator...Any help would be highly appreciated.

    Hi,
    There are a few discussion threads in the feedbackprograms portal for Creator 2 EA 2. The URL is:
    https://feedbackprograms.sun.com/login.html
    In the EA discussion forum you will find threads which discuss the concerned topic. In specific look for threads titled:
    # Deploying Portlets
    # Taking a JSC Portlet to Tomcat creates a Faces Mapping Error
    # Problem with Pluto when trying to deploy a portlet
    # Request: JSR-168 Portlet Project without JSF
    We kindly request you to post your further queries related to EA in the above mentioned forum.
    Cheers
    Giri

  • Username not showing up in access log for authenticated users

    I'm using form-based authentication in a Java web application on Sun One Web Server v6.1 to restrict access to authenticated users. However, even after the users authenticate and access the application, the username field in the access log is showing them as anonymous.
    request.getRemoteUser() is reporting the correct username, so it just seems to be the access log that is in error. Right now it is set to the default but changing formats to custom doesn't seem to help in displaying the username.
    Here's an excerpt from the access log:
    // anonymous access attempt, redirects to login page...
    10.100.168.110 - - [01/May/2006:14:34:42 -0400] "GET /profile/index.jsp HTTP/1.1" 302 0
    10.100.168.110 - - [01/May/2006:14:34:42 -0400] "GET /profile/login.jsp HTTP/1.1" 200 3355
    10.100.168.110 - - [01/May/2006:14:34:47 -0400] "POST /profile/j_security_check HTTP/1.1" 302 0
    // at this point they are logged in and their username should be reflected in the access log, but is not:
    10.100.168.110 - - [01/May/2006:14:34:47 -0400] "GET /profile/index.jsp HTTP/1.1" 200 3532 And the relevant code from the web application's web.xml:
    <security-constraint>
        <web-resource-collection>
          <web-resource-name>AllFiles</web-resource-name>
          <description>
                     Restricts anonymous access.
                  </description>
          <url-pattern>/*</url-pattern>
          <http-method>POST</http-method>
          <http-method>GET</http-method>
        </web-resource-collection>
        <auth-constraint>
          <description>
                   Authenticated Users
                  </description>
          <role-name>user</role-name>
        </auth-constraint>
      </security-constraint>I've searched the forums and the manuals but can't see anything showing that the access log's username field doesn't work with form-based authentication. Can anyone shed some light on this?

    Some background:
    The Java Servlet container has its own authentication infrastructure (which is what you configure in web.xml) which is separate from the non-Java authentication infrastructure (ACLs, etc.). If you set up authentication via ACLs the resulting user identity can (though you may configure it not to) propagate to the Java Servlet container such that request.getRemoteUser() will return it, even though no web.xml-driven authentication occurred. The coverse is not true, however: if you authenticate via a Java Realm, based on web.xml configuration, that user identity is not available to non-Java code.
    (Your web.xml snippet doesn't show you using FORM auth - but it doesn't matter, the explanation above applies in any case.)
    That is why the log file (generated from non-Java code) doesn't have access to that user. It probably should, but there's no config option today for you to make that happen.
    If you're using BASIC auth you may consider moving the authentication configuration from web.xml to ACLs as a possible workaround. It will then show up in the access logs.
    If you prefer web.xml-based authentication, consider the <SECURITY audit="true"> option in server.xml. It won't be in the access log but you'll have an audit trail of authentications, which may help.

  • Problem with Permissions while accessing Portal Content

    Dear All,
    Im facing some problems with the permission in accessing the portal content.
    When i right click on any of the folders in the catalog displayed under the System Administration - > System Configuration -> System Landscape -> Content directory provided by SAP . I get the following Menu options on right click -> NEW -- > Folder, Change ID, Copy, Delete.
    I dont get a option such as NEW --> System(from template) which is important to configure the ABAP ECC 6.0 System with the EP 7.0 to enable logon through  the Portal to access the ABAP  Database through Web browser.
    I have installed EP 7.0 JAVA stack alone separately and ECC 6.0 ABAP stack alone separately.
    I have tried assigning System Admin Role, Super User Role, Group as Administrators. But nothing seems to work.
    Im not sure of the roles to be assigned.
    thanks,
    Deepak
    Edited by: Deepak M on Jul 1, 2009 1:16 PM

    Deepak,
    Try giving the foll roles,
    pcd:portal_content/administrator/super_admin/super_admin_role
    and groups,
    SAP_J2EE_ADMIN
    Authenticated Users (GRUP.SUPER_GROUPS_DATASOURCE.AUTHENTICATED_USERS)
    Vikram

  • Project wise Access

    Hi All,
    Could some one explain the process of restricting project wise access to a user.
    Thanks and Regards,
    Naveen Dasari.

    Hi there,
    there are a few authorization objects you can use to restrict the access of users to a project.
    The most important are:
    S_PROJECT - defines the project on which a user is allowed to work on
    S_IWB - defines the (documentation) folder a user should have access to .. for every project one folder (with the project name) is created.
    The easiest way to limit access of users to only certain projects is to enter only the names of the relevant projects in those two authorization objects in the solution manager role the user is assigned to.
    hope this helps
    arthur

  • Cannot run using pam authenticated user?

    Using RHEL 4 on an institutional network in which users are centrally managed. Acroread 8.1.1 will not start with ordinary user as
    acroread
    (acroread:24638): GLib-WARNING **: getpwuid_r(): failed due to unknown user id (.....)
    Basically, this is not going to work.

    Hi, thanks for replies
    I am indeed able to launch 'firefox', both as local user and as remotely authenticated user. Likewise, 'gedit' is no problem
    The authentication method is called LDAP .
    Here's the nsswitch.conf ( it seems like the ldap is already included here )
    passwd: files ldap
    shadow: files ldap
    group: files ldap
    hosts: files dns
    bootparams: files
    ethers: files
    netmasks: files
    networks: files
    protocols: files ldap
    rpc: files
    services: files ldap
    netgroup: files ldap
    publickey: files
    automount: files ldap
    aliases: files
    The Red-Hat EL4 provided Acroread 7.0.8 5/22/2006 also only works as local user, otherwise it produces a not-terminating stream of syntax error messages. (Package confusingly numbered acroread-7.0.9-1.2.0.EL4)
    Using new AdobeReader_enu-8.1.1-1.i486.rpm, as local user, the program runs. but gives some message about missing library. I wish the program place the error message in the stderr or similar, or at very least allowed cut and paste from the error dialog box, as it would be so much easier to tell you exactly what the error message says. It's the 32-bit/64-bit thing.
    I have read the mailing list about this issue and see that it may be easily fixed, however unless the reomote authentication issue can be fixed, there is not much point.

  • Allowing Airwatch MDM access to the Captive-Portal guest users in pre-auth role for android and BB?

    Requirement:
    How to allow Airwatch MDM access to the Captive-Portal guest users in pre-authentication role for Android and Blackberry devices?
    What is Airwatch MDM?
    Airwatch MDM is Mobile Device Management. The Airwatch is an enterprise which helps to manage and secure data traveling through the mobile devices like Laptops, Tablets, Android, iPhones, iPads etc.
    Solution:
    Why we need to allow access to Airwatch MDM?
    The network administrator can force the guest users to register to Airwatch MDM before they get authenticated and access the internet. So that the network administrator could manage the guest devices through Airwatch Management tool. This can be achieved by CPPM server. To download the Airwatch MDM app and register with the Airwatch MDM server certain domains should be permitted in the captive portal pre-authentication role. This KB provides the configuration steps to allow the guest users to download the Airwatch MDM app and register with the Airwatch MDM server.
    Configuration:
    Below is the configuration
    Configuration steps:
    1. Create the following netdestinations
    netdestination Airwatch
      name *.awagent.com
      name *.awmdm.com
      name air-watch.com
    netdestination Google-Play
      name android.clients.google.com
      name .ggpht.com
      name gstatic.com
      name accounts.google.com
      name clients1.google.com
      name clients2.google.com
      name clients3.google.com
      name clients4.google.com
      name i.ytimg.com
      name google-analytics.com
      name .1e100.net
      name android.l.google.com
      name mtalk.google.com
      name clients.l.google.com
      name googleapis.com
      name gvt1.com
    netdestination BlackBerry
      name *.blackberry.com
    2. Now define the rules in the session acl and map it to the pre-authentication Role of the captive portal.
    ip access-list session Airwatch_Access
      any   alias Airwatch svc-http  permit
      any   alias Airwatch svc-https  permit
    ip access-list session Google-Play-Store
                   any   alias Google-Play any permit
    ip access-list session BlackBerry-Access
                   any   alias BlackBerry any permit
    3. Now map the session ACLs to captive-portal pre-authentication Role as follows
    user-role Guest-Pre-Auth-Role
     access-list session Airwatch_Access
     access-list session Google-Play-Store
     access-list session BlackBerry-Access
     access-list session logon-control
     access-list session captiveportal
    4. Now whitelist the list of domain names in the Captive Portal profle
    aaa authentication captive-portal Airwatch-Captive-Portal-Profile
    white-list Airwatch
    white-list Google-Play                                                                                ------------>Netdestinations where you defined the Domains.
    white-list BlackBerry
    Verification
    Now the user will be placed under the "Guest-Pre-Auth-Role" before the authentication. The user can now go the Google Play-Store or BlackBerry Appworld to download the Airwatch MDM and register to Airwatch Management Server.

    Thanks so much getting these names listed out. I have been working on this very issue for a few weeks and was basing my firewall rules on IP's. It was not going well. Now access is working and testing can commence!  Thanks,Chris

  • Can we use AD authentication for SPoint users to access Portal behind OID?

    Hi,
    We have Oracle Portal with OID-AD sychronization set up, and are currently implementing SharePoint in our organization.
    We would like to provide links to a few pages on our Portal to some of the SharePoint users.
    The SharePoint users are authenticated by the Active Directory SSO and the Portal users are authenticated by our OID SSO setup.
    What we want to do is to let some SharePoint users access our Portal using their AD login. The SharePoint users should not have to login again to get to our Portal pages.
    Is there a way to let the AD authentication to pass through the OID setup so that SharePoint users can directly access our Portal?
    We don't have any external authentication plug-ins set up for our Portal.
    Currently we are on Portal version 9.0.4.1 but may be upgrading to version 10.1.4.2 in the near future.
    Any help would be greatly appreciated.
    Thanks.
    CV

    Hi,
    Thanks for the quick reply.
    But I have a different scenario.
    I want to establish it in such a way that certain users are stored in the LDAP and certain users are stored in the Portal Database.

  • Can I import HTMLs from inside the project and use as portlet page ?

    As you know, I am using Java Studio Creator 2 Update 1 for my current portal project. I have created JSR-168 JSF Portlet Project for my portlet development.
    As I have some html pages ready for my development,
    Can I import HTMLs from inside the project and use as portlet page for my project?
    I did the followings steps:
    1: In side the project - File -> Add Existing Item -> Web Page ( imported test.html page from my local folder)
    2: Let it convert some of the tags for me ( so now it becomes - �test.jsp� )
    3: Set it to initial view.
    4. A default portlet page � newPortletPage.jsp is still there with no initial view.
    Now after doing this, No Visual Designer and Properties window available to for that �test.jsp� page. Though it allowed me to �build� the project successfully.
    When I build and run the portlet application, got the error message �Error occurred in portlet!� on Pluto Portal. Please advice.

    You do not open fcpproject files. You don't double click or anything else. The files have to be in the correct folder structure in the Final Cut Projects folder and the application opens them automatically. Can you post screen shots of the Final Cut Projects folder and its location.

  • How to access Portal Logged in user in Web Service application

    Hi Experts,
    I have created one Deployable Proxy and based on that i have created Web Based (WAR) project. to consume the proxy i have created Servlet based java file which invokes Web services. Based on this WAR project i created EAR application which deploys on J2EE server.
    I am facing issue while accessing Portal Logged in user in my Servlet Class in WAR project so can  you please provide inputs for how we can access Portal Logged in user in our Servlet class? also how we can access LDAP detailes of portal Logged inuser ?
    I tried to fetch the Logged in user from servlet request but i can't access it giving me null value. Following is the method details that i am using in my servlet.
    protected void doGet(HttpServletRequest request,HttpServletResponse response)throws ServletException, IOException                
    IUser user = UMFactory.getAuthenticator().getLoggedInUser();
    String strName = user.getFirstName();
             If I checked in LDAP values First name for logged in user is present but in my code its giving Null value.
    Can you please provide your inputs on above issue.
    Regards,
    Rahul

    have you found a solution this problem yet?

  • Portal groups/users and security

    Hi,
    I have created an application and that application has forms, reports, meunes, page with three tabs for Admin, Librarian and Reports. I put some portlets of Forms etc in different tabs. Now i want that the Admin can access and see all tabs, Librarian can access and see Librarian and Reports tab while Users just can see and run Reports. For that i created three groups
    Admin_group, Librarian_group and user_gropus. For each group i created test users and attach or add these users to the group. To each group i gave execute permission of the application. After that i went to the page and on the page i assign follwoing permission to the tab.
    Reports: all three groups(view only)
    Librarian: Librarian_group and admin_group view_only
    Admin: Admin_group view_only.
    Then i log on as a test user of the User_groups but i was just able to see the report tab but not the menue (which is portlet in this page). Same with other tabs and users. I want to know what i am missing.
    Your help will be highly appreciated.
    Thanks
    Muhammad Ejaz Azimi
    null

    All the groups has execute permissions of application. Can you please tell me for any documentation for Portal Security i.e group and user management or if possible you can little explain ?
    Your help will be highly appreciated.
    Thanks
    Muhammad

  • How to access Sap portal login user in ejb web service

    Hi,
    I wnt to access SAP Portal login user in my ejb application which resides on the same server.
    I am using following code
    try {
         IUser user =null;                         IWDClientUser wdUser = WDClientUser.getCurrentUser();
                                  user = wdUser.getSAPUser();
                             } catch (WDUMException e) {
                                  // TODO Auto-generated catch block
                                  e.printStackTrace();
    Some additional jar files are required for this?
    The same code works fine with webDynpro but not with ejb.
    Thanks in advance     
    Best regards,
    Nilesh

    Thanks for reply.
    I have already added com.sap.security.api in my EJB module project classpath. How to add the same in EJB application Project (application-j2ee-engine.xml)?
    Best regards,
    Nilesh

  • How to set up reverse proxy to allow user access portal site from internet

    Hi all,
    I have installed 10g(10.1.2.0.2) AS on same machine(single IP for both mid and infra with different users respectively). there is a DMZ on which windows IIS is working through which we need to redirect the request to application server such that users access portal page from internet (within intranet all URLs are working fine). I have went through technet documentation where i found 3 ways : through this link
    http://download.oracle.com/docs/cd/B14099_19/core.1012/b13998/variants.htm
    Section 9.2.1.1, "Configuring OracleAS Web Cache as a Reverse Proxy"
    Section 9.2.1.2, "Configuring the Oracle HTTP Server as a Reverse Proxy"
    Section 9.2.1.3, "Configuring Internet Information Services as a Reverse Proxy"
    I am confused to which option to use. Also i went through the metalink document 270160.1
    Please help me which option to choose to do this.
    Thanks.

    Hi Hozy,
    May be it's too late, I am thinking to go in the same route for our sap portal access to external customers. Please can you share your experience , like what are the challenges have you faced? what is the complexity? what are all the resources we need to configure this?
    I appreciate your feedback.
    Thanks
    Krish

  • Accessing portal dictionary tables from Web Dynpro project

    Hi
    Am a new to whole portal and webdynpro thing, and I hope that you can help here
    I created a new dictionary project through NWDS and created a table with columns and I successfully deployed it
    I also created a web dynpro project and I added a TABEL UI to the layout
    how can I connect or access the table I created in the dictionary project from the Web dynpro project so I can query all data to fill the TABEL UI  in the web dynpro ?
    is there a driver that I can use like JDBC where I can just write regular SQL queries ?
    regards

    Hi swathi
    See the persistence API--Adv and Disadvantages what ever you mentioned come under the persistence API
    Relational Persistence
    =================
    SQL-based coding: expressive!
    SQLJ: for static SQL, checked at design time,
    recommended
    JDBC: for dynamic SQL, can be combined with SQLJ
    =======================
    Object-relational Persistence
    ======================
    SQL-free! Portable!
    JDO: light-weight object persistence, Java-like dynamic
    query language
    EJB CMP: part of J2EE standard, relatively heavy-weight,SQL-like static query language
    Regards,
    Venkata Kalyan Karanam

Maybe you are looking for