Technical Note: Web Services for Remote Portlets for Sun Java System Portal Server 7.1

ProcedureTo Export Roles as User Categories in Producer

  1. In the Access Manager administrator console, create a role and add a user.

  2. While deploying the portlet in webxml of the portlet application, add the following code:


    <security-role>
    <role-name>PS_TEST_DEVELOPER_ROLE<role-name>
    </security-role>
  3. Add the following lines in the portlet.xml file of the portal.


    <security-role-ref>
    <role-name>PS_TEST_DEVELOPER_ROLE<role-name>
    <role-link>PS_TEST_DEVELOPER_ROLE<role-link>
    </security-role-ref>
  4. Create the portlet application war file.

  5. Create a roles file with the following entry.

    cn\=AM_TEST_DEVELOPER_ROLE,o\=PortalSample,dc\=domain, dc\=domain,dc\=com=PS_TEST_DEVELOPER_ROLE

  6. Deploy the portlet using the following command.

    /opt/SUNWportal/bin/psadmin deploy-portlet -u amadmin -f ps-password -d "o=PortalSample,dc=domain,dc=domain,dc=com"-p portal1 -i portlet-name --rolesfile roles-file test-portlet-war-file

    This task deploys a portlet. All roles associated with the portlet are automatically exported as user categories in the producer.