| Last Update: | March 19, 2003 |
| Status: | Production |
| Version: | PDK Release 2, (9.0.2.6 and later) |
Oracle9iAS Portal (Portal) uses Oracle9iAS Single Sign-On (SSO) to authenticate users. SSO in turn uses the Oracle Internet Directory (OID) as a repository of users, groups and permissions. The OID portlets use the OID server to get information about the user that is accessing the portlet.
The OID sample consists of two portlets: Contact portlet and Protected Portlet
This section describes the how to communicate the contact details of the OID server to your Web provider.
The Portal Developer Kit needs to open one or more connections to the OID server during its operation so that properties of a user can be queried. To open these connections the following information is required:-
For the purposes of this sample we provide an insecure extension of OidInfo called oracle.portal.sample.v2.devguide.oid.UnsafeOidInfo . As the name implies this is NOT a secure way of accessing the OID password and it should not be used in a production implementation. However, it enables you to quickly and easily provide your OID server contact details in the deployment properties file called oid.properties to render the samples.
When using portlet that access the OID server in production, you should create a java class that extends the abstract class oracle.portal.provider.v2.oid.OidInfo. This abstract class has public setters and package getters for the OID connection details. It also has a method public abstract void init(ProviderContext pc), which gets called immediately after your OidInfo extension is constructed. You can use this method to read deployment properties or other context information to locate and load the necessary information. When you create your own extension of OidInfo you need to ensure that the OID access information remains secure.
When you create your own extension of OidInfo you need to ensure that the OID access information remains secure.
To configure OidManager you need to modify the deployment properties file for the provider service. The OID sample provider service included with the PDK can be found in the following location:
[OC4J_INSTANCE}/applications/jpdk/jpdk/WEB-INF/deployment/oid.properties.
Open the deployment properties file and edit the following entries:
To configure UnsafeOidInfo for this sample (remember is not a secure implementation) modify the deployment properties file [OC4J_INSTANCE}/applications/jpdk/jpdk/WEB-INF/deployment/oid.properties.
oidManager=true
oidAdminClass=oracle.portal.sample.v2.devguide.oid.UnsafeOidInfo
oidHost=machine.domain.com
oidPort=389
oidUser=webprovider1
oidPasswd=welcome1
Your Provider must be configured to use the OidManager for this feature to work. Once you have configured your provider to use OidManager, you must modify your provider definition file for each portlet you want to protect with the GroupSecurityManager.
The OID sample provider definition file included with the PDK can be found in the following location:
[OC4J_INSTANCE}/applications/jpdk/jpdk/WEB-INF/providers/oid/provider.xml
Open the provider definition file and edit the <securityManager> tags :
<portlet class="oracle.portal.provider.v2.DefaultPortletDefinition">
<id>2</id>
<name>Protected</name>
...
<renderer class="oracle.portal.provider.v2.render.RenderManager">
<renderContainer>true</renderContainer>
<contentType>text/html</contentType>
<showPage>/htdocs/oid/protected.jsp</showPage>
</renderer>
<securityManager class="oracle.portal.provider.v2.security.GroupSecurityManager">
<group>cn=group1,cn=groups,dc=us,dc=company,dc=com</group>
<group>cn=group2,cn=groups,dc=us,dc=company,dc=com</group>
</securityManager>
</portlet>
Since the group information is being queried directly from OID, the value you specify for each <group> tag must be the distinguished name (dn) of the OID group, not the name as it is displayed in Oracle Portal - which is usually just the common name (cn).
If you define multiple groups for a single GroupSecurityManager the portlet will be accessible to users who are members of at least one of the specified groups. Users who are not members of any of the groups will be denied access to the portlet.
To view the sample portlets you must do the following:
Once you have created your portal page, you should be able to view the portlets. Try logging in as different users or not logging in at all and view the page. The "Contact" portlet will display different information depending on the user that is logged on. The "Protected" portlet will only be shown when you log into Oracle Portal as a user who is of a group you specified when configuring the GroupSecurityManager.
| Revision History: |
|
| Oracle Corporation World Headquarters 500 Oracle Parkway Redwood Shores, CA 94065, USA http://www.oracle.com/ |
Worldwide Inquiries: 1-800-ORACLE1 Fax 650.506.7200 |
Copyright and Corporate Info |