Building portlets with personalization adapters  Using the user name/password adapter

Chapter 7: Personalizing Portlet Content

Using the security proxy adapter

This section illustrates how to use the security proxy personalization adapter by creating single-sign-on access to a back-end accounting system.

Create an asset in Enterprise Security that logically represents the back-end application to which you want to construct single sign-on access, then create a personalization key for the security proxy adapter.

StepsCreating a new security asset

  1. Log in to Web Studio as a user with LIST, READ, and UPDATE permissions on the AssetCtrlAsset; for example, log in as the PSO with the “pso” user name and the “123qwe” password.

  2. When the Web Studio main window displays, select Administer | Organizations.

  3. Select Assets in the Organization Manager menu, then click New.

  4. When the Create New Asset window displays, enter or select:

  5. Click OK.

StepsGranting permissions on the new asset

Before anybody can associate their own personal ProxyAuthenticationInfo objects with an asset, they must have LIST, READ, and UPDATE permission on that asset.

  1. In Web Studio, select Administer | Organizations if it is not already selected.

    Select Assets from the Organization Manager menu, then right-click the newly created asset and select Manage Access Permission.

  2. When the Manage Access Permission on Asset window displays, grant:

    NoteYou can grant the READ permission through one or more roles. Before any user can create their own ProxyAuthenticationInfo for this asset in Portal Interface (using MyInfo | Personalize), they must have a role with READ permission.

  3. Click OK.

StepsCopying the asset’s distinguished name

Copy the asset’s distinguished name (DN) so you can paste it into a dialog box when you create the autofill keys.

  1. Click the new asset in the Organization Manager right pane and click Edit. The full Asset DN is shown in the New Asset dialog box.

  2. Highlight the Asset DN and press Ctrl+C on your keyboard or right-click and select Copy. You must know the full DN when you create autofill keys for this asset—the key names include the full DN.

  3. You can change the Asset DN to anything you want as long as it is a unique asset name across all assets in the Enterprise Security Access Control Database (ACDB). For example, the original DN might have been:

    a1=Accounting,dc=sybase,dc=com
    

    which you can change to a simpler:

    Accounting
    

    NoteSybase recommends that you shorten the DN so administrators and portal users can more easily understand the key’s purpose.

StepsCreating the personalization key

The security proxy adapter administrative implementation is based on asset-level ProxyAuthenticationInfo definitions. This insures that any Web Studio user can view ProxyAuthenticationInfo personalization keys as they configure portlet parameters; that is, anyone with READ permission on an asset can access the asset-level ProxyAuthenticationInfo.

  1. In Web Studio, select Manage | Personalize from the left pane.

  2. Select Security Proxy from the Personalize Manager Adapters menu, then click New.

  3. When the Create New Key window displays, enter or select:

  4. Click OK. The personalization adapter creates an asset-level ProxyAuthenticationInfo key on the asset.

  5. When the message displays that the personalization key was saved successfully, click OK.

    When you create a ProxyAuthenticationInfo key, the portal generates three personalization keys—user name, password, and URL.

In the Key Name column you see three new keys created for this adapter; for example:

password/a1=Accounting,dc=sybase,dc=com
URL/a1=Accounting,dc=sybase,dc=com
userid/a1=Accounting,dc=sybase,dc=com

There are three keys generated from the one asset name you entered in the Create New Key window. These keys correspond to the three attributes of the PAI. These keys are marked READ ONLY because you cannot modify the key name—the name is tightly associated with the asset to which the ProxyAuthenticationInfo key is attached.

WARNING! If you have UPDATE permission, do not select one of these keys, and select Delete. This action will destroy the ProxyAuthenticationInfo key along with the three associated keys.

NoteYou cannot use Manage | Personalize to edit key values. However, you can use SMAPI ProxyAuthenticationInfoManagement beans to modify the values.

StepsUsing the ProxyAuthenticationInfo personalization keys

  1. In Web Studio, select Build | Portlets.

  2. Right-click anywhere in the Portlet Manager detail view and select New Aggregated Portlet.

  3. When the Portlet Builder displays, click the down arrow to the right of the Add button and select JSP Element.

    NoteThis example uses the JSP element, but any element type that uses CGI parameters (Web, database, Web service) can be used with the personalization autofill keys.

  4. The JSP Element Definition window displays. For example, select Use Web Application and fill in the name of your WAR file. Add a Web App Display Name and the Initial Resource (the JSP page that initially displays).

  5. Enter input parameters using this format:

    parametername=X&parametername=Y&parametername=Z
    

    where parametername is the actual name to display for each parameter. For example:

    URL=X&USERNAME=Y&PASSWORD=Z
    

    The X, Y, and Z are default input values and can be anything. The “&” separate each parameter definition.

  6. Click Next when you are satisfied with your entries.

  7. On the Finish window, enter the Element name, then click Finish.

  8. Select the Configure option for each parameter that you want to configure.

  9. Click Next. You see the Setup Configuration window.

    You can reorder parameters, enter defaults, and perform other functions.

  10. Click Next. You see the Setup Preview window with a preview of the portlet and parameters.

  11. Click Save. You return to the Portlet Builder.

  12. Click Save to save the portlet.

  13. When the Finish window displays, complete the options, then click Finish.

  14. Click Close to exit the Portlet Builder.

  15. When you return to the Portlet Manager, select New from the Status menu, right-click the new portlet, and select Approval Status | Approved.

    Now you can add the portlet to a page and page group and update Portal Interface.





Copyright © 2004. Sybase Inc. All rights reserved. Using the user name/password adapter

View this book as PDF