| Last Update: | October 20, 2003 |
| Status: | Production |
| Version: | PDK Release 2, (9.0.4.0.2 and later) |
Oracle Application Server Portal (Portal) uses OracleAS Single Sign-On (SSO) to authenticate users. SSO in turn uses the OracleAS 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.
Also for the portlets you want to protect you must enable "callIsRunnable" and "callGetPortlet". Setting these parameters forces a authorisation checks to be made when this provider is registered. If the user doing the registration is not a member of the group then the portlet will not be registered.
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 this provider definition file and within the <securityManager> tag, add one or more <group> tags containing the distinguished name (dn) of one or more Portal user groups whose members you would like to allow access to the "protected" portlet. For example:
<portlet class="oracle.portal.provider.v2.DefaultPortletDefinition">
<id>2</id>
<name>Protected</name>
...
<callIsRunnable>true</callIsRunnable>
<callGetPortlet>true</callGetPortlet>
<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=portal.xxxxxx.yyyy,cn=groups,dc=uk,dc=oracle,dc=com</group>
<group>cn=group2,cn=portal.xxxxxx.yyyy,cn=groups,dc=uk,dc=oracle,dc=com</group>
</securityManager>
</portlet>
Note: You can easily determine the dn of a Portal User Group by doing the following:
So for example, if the Group Creation Base DN on the global settings page is cn=portal.xxxxxx.yyyy,cn=groups,dc=uk,dc=oracle,dc=com the dn for the AUTHENTICATED_USERS group would be cn=authenticated_users,cn=portal.xxxxxx.yyyy,cn=groups,dc=uk,dc=oracle,dc=com.
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 OracleAS 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 |