Showing posts with label Config. Show all posts
Showing posts with label Config. Show all posts

Wednesday, July 8, 2015

Translate portal to myportal when user is logged in

The Problem

Suppose you have a public-facing site for anonymous portal users. But suppose also that the same site also has some private resources requiring users to authenticate for access.
  • In this scenario, an authenticated user will be logged out if they try to access a public resource that has the anonymous context in the URL (i.e. /wps/portal/... instead of /wps/myportal/...).
  • BUT, we cannot just make all of our links contain /wps/myportal to get around the issue because then anonymous users will be prompted to login even if the resource is public.
  • What we need is a way to let links to public resources contain the anonymous context (/wps/portal/...), but we need to automatically transform that into (/wps/myportal) if the user happens to be logged in.

The Solution

There is a configuration option that does exactly this! Here's how you enable it on WPS 7 or greater.
  • In the Deployment Manager or WAS console, navigate to Resource environment providers > WP ConfigService > Custom properties</li>
  • Look for the property 'uri.home.substitution'. If it's not already in the list, add the property (as type java.lang.String) and set the value to 'true'. If it's already in the list, just set the value to true.</li>
  • Apply and save your changes to the master configuration. In a stand-alone environment, you then need to restart your server. In a clustered environment, you need to synchronize the nodes and then restart the cluster.</li>

Summary

The uri.home.substitution option determines whether a public URL should be translated to a protected URL if a user session exists. It is false by default and can be set to <em>true</em>.


Reference Link: https://wiki.base22.com/display/btg/Translate+portal+to+myportal+when+user+is+logged+in

Friday, January 30, 2015

Disable managed-pages feature to share wcm library with virtual portal

Portal v8 and above maintains their own wcm library and wcm library can't be shared between base portal and virtual portals until manages-page feature is disabled.

Run the disable-managed-pages task from the WebSphere/ConfigEngine directory.

ConfigEngine.bat disable-managed-pages -DPortalAdminPwd=wpsadmin -DWasPassword=wpsadmin


More Info: http://infolib.lotus.com/resources/portal/8.0.0/doc/nl_NL/PT800ACD002/wcm/wcm_config_mngpages_disable.html

Thursday, January 29, 2015

WebSphere 8 Auto Deploy

You need setup monitor directory to automatically deploy application.
 Log in to the Admin console and click "Global deployment Settings" from the Applications section of the Left-Hand-Side navigation menu.
 
Refer these link :
http://www-01.ibm.com/support/knowledgecenter/SSEQTP_8.5.5/com.ibm.websphere.base.doc/ae/urun_app_global_deployment.html
http://www.webspheretools.com/sites/webspheretools.nsf/docs/WebSphere%208%20Auto%20Deploy

Wednesday, January 28, 2015

Enable session on anonymous pages



Enable public sessions for portal. The reason is that the theme/portlet needs a valid session for its run time, and by default, sessions are not enabled on anonymous pages in the portal. By default, sessions are only created when a user authenticates and logs in to the portal.
Enable public sessions by setting the parameter public.session to true (String type) in the portal "WP NavigatorService > Custom properties > New" in the WebSphere Integrated Solutions Console.

Monday, June 30, 2014

Resize virtual machine disk : VMware Image

  1. Shut down the primary vm
  2. Create/find a helper VM which has similar configuration as primary vm
  3. Edit vm setting for helper vm and browse for the VMDK file that you want to expand (select primary’s vm vmdk file)
  4. Once added, click on Utilities > Expand button
  5. It will take some time to expand depending upon how much additional gb added
  6. Detach the disk from helper vm.
  7. Power on the primary vm with your extended disk and goto Disk Management
  8. You will see unallocated disk space
  9. Right Click on primary disk which you wanted to expand and click on Extend Volume option
  10. Goto my computer and you will immediately see the additional space added to drive.

Wednesday, December 26, 2012

Securing Web services at the message level



We are going to configure Web service message-level security of Java API for XML Web Services 2.1 (JAX-WS) running on WebSphere Application Server 7 using the Rational Application Developer 7.5/8.0 integrated development environment (IDE). To achieve that objective, we will perform the following tasks:
  • How to create a JAX-WS service provider
  • How to create a standalone JAX-WS client.
  • How to monitor the SOAP messages using the TCP/IP Monitor.
  • How to customize a WS-Security policy set in the WebSphere Application Server Administration Console.
  • How to customize a policy set binding in the Administration Console.
  • How to export policy sets and bindings from the Administration Console.
  • How to generate X509 asymmetric keys and use them with your customized policy set bindings.
  • How to import policy sets and bindings into the Rational Application Developer IDE.
  • How to attach policy sets to Web service provider and servers using the Rational Application Developer IDE.
  • How to create TestClient code using Web Services Security APIs
  • How to use the UsernameToken (UNT) profile to add credentials to the SOAP header.
  • How to use the UNT to authenticate against the WebSphere Application Server user repository.
 

Tuesday, December 18, 2012

Portal v8 Modular Theme : Changing the Theme profile for a page

The default profile for the Portal8 theme is profiles/profile_deferred.json but you can override it at page level by setting the value of resourceaggregation.profile to different profile for example i can set it to profiles/profile_lightweight.json like this

Once you set that and access the page you will see that it does not have page action button any more.


Actually I was looking for this kind of user interface for selecting Theme Profile but with my Portalv8.0 installation without any fixpack this option is not coming for selection in Edit Page properties option



Sunday, December 2, 2012

How to Install WebSphere Portal v8 ?



Portal v8 installation some general information:
General Information on IIM (IBM Installation Manager) :
  • IBM Installation Manager replaces the ISMP installer and Portal Update Installer (PUI) and manages life cycle for WAS 8 and WP 8. IIM can install and uninstall core products, update or rollback fixpacks and fixes, modify and remove features
  • IIM version 1.5.2 or higher required
General Information on WebSphere Portal 8 Installation:
  • Portal 8 packaging comes from 3 sources: Live repository via Passport Advantage, physical DVD's, and electronic images.
  • Can install WAS 32-bit on a 64-bit platform
  • Windows XP and Windows 2003 are NOT supported with Portal 8
WebSphere Portal 8 installation steps
1.       Install using Live repository  or offline repository
In this scenario I used the offline mode and downloaded the sources from PA.
IBM_WS_P_AND_WCM_INSV8.0_1OF_7_MPML.zip
IBM_WS_P_AND_WCM_INSV8.0_2OF_7_MPML.zip
IBM_WS_P_AND_WCM_INSV8.0_3OF7_MPML.zip
IBM_WS_P_AND_WCM_INSV8.0_4OF7_MPML.zip
IBM_WS_P_AND_WCM_INSV8.0_5OF7_MPML.zip
IBM_WSA_SV_NW_DEP_V8.0.0.3_1OF3MPML.zip
IBM_WSA_SV_NW_DEP_V8.0.0.3_2OF3MPML.zip
IBM_WSA_SV_NW_DEP_V8.0.0.3_3OF3MPML.zip

2.       Install the IBM Installation Manager
Using IBM Installation Manager
I really like this idea and am hopeful that the implementation will live up to the promise it represents. You can point to a local downloaded repository, as is the case in this guide. Or, you could point to a live repository hosted by IBM. In addition to the simplified install process you gain better control over the WAS and Portal update procedures.
If you have an existing installation of the manager you should confirm that it is version 1.5.2 by launching the manager and selecting 'Help -> About' IBM Installation Manager.
If the version is not correct you may upgrade or uninstall and install from the source binaries.
Install the IIM(IBM Installation Manager) From <Root>\portal8\ IBM_WS_P_AND_WCM_INSV8.0_1OF_7_MPML\Setup\IIM\win32\Install.exe


3.       Configure the IBM Installation Manager
Once the installation manager has restarted you must configure it to reference the source repositories for the portal and the application server.

Locate the interface to add repositories by selecting File -> Preferences

In the preferences window you will see an Add Repository button. Click this. You will perform this operation for both the portal and the application server repository.

4.       Install IBM WebSphere Portal V 8.0
On the launch page of the installer click Install. Select the packages to install. Package selection is determined by the repositories configured for the installation manager.

Accept the license.


You will need to set an install path for the AppServer and PortalServer directory structures at this time.

Select features for installation. In this example we have maintained the default features


Select the profiles to install. In this scenario I selected Full profile , After profile selection you would see standard or advanced installation option . In advanced there is options to configure the hostname , nodename and cellname . you also have the option to change the portal context path from /wps to /prefered context path .


On the summary page confirm your choices and choose Install.


5.       Optional : After installation I wanted to update the Lates Java Fix for WAS ND . Start the IIM and select update , choose WAS ND 8.0.3 , Based on the live repository URL it shows all the available fixes , select the required Fixes and click Next and Install .

Saturday, December 1, 2012

Federated repositories configuration



Step1 :
                Start Portal Server
                Login into Application Server - Integrated Solutions Console
                Go to - Security>Global Security
                Click on configure Note : Make Sure Federated Repository is selected

Step 2:
               
On Federated repositories screen click "Add base entry to realm"
               
On Repository reference screen click on "Add repository"
               
Provide
                               
Repository identifier : mytechuserbase
                               
Directory type  : IBM Tivoli Directory Server
                                Primary host name  : localhost
                               
Port : 389
                               
Bind distinguished name : cn=root           Note : make sure this user exist in ldap and has rights to modify ldap entry
                               
Bind password : root
               
Clock on 'Ok' button

After that provide following info in current window
Distinguished name of a base entry that uniquely identifies this set of entries in the realm
dc=mytech,dc=com
Distinguished name of a base entry in this repository
dc=mytech,dc=com
Click on 'ok' button
Click on 'Save' link

Step3 :
Click on "Supported entity types" link and modify 'Group' and 'PersonAccount' values with
cn=groups,dc=mytech,dc=com and cn=users,dc=mytech,dc=com respectively








Step4 :
Restart the portal server to reflect the changes
Test the LDAP setup :
Login into Application Server - Integrated Solutions Console
Create the user/group and validate the same user/group details in LDAP server through ldap browser or IDSWebApp application.

Installation steps for Tivoli Directory Server Web Administration Tool -
1) Make sure Db2 and TDS instance is running
2) Start server1 profile
3) Deploy and start IDSWebApp.war
4) Open application IDSWebApp http://portal.mytech.com:10000/IDSWebApp/IDSjsp/Login.jsp. Default username and password superadmin/secret
5) Make cn=root as super user for domain (dc=mytech,dc=com)
6) Since we will be configuring Federated repository, we need to remove user's wpsadmin,wpsbind and group 'wpsadmins' from LDAP as these are already available in portal server.

Friday, August 10, 2012

Portal Version

To get the version of base installation :
1) Look inside WebSphere\PortalServer\wps.properties
2) or run WebSphere\PortalServer\bin\WPVersionInfo.sh

Check the fixes installed :
1) WPVersionInfo.sh -fixes
2) WPVersionInfo.sh -long

Thursday, July 12, 2012

Marking portal pages as hidden

In WebSphere Portal, when creating a new page under content root, it will be shown on the quick links navigation.
If you do not want a page that you create to appear in the main menu, you can hide the page. You can use own customize links or navigation to access the page via direct URL mapping.

To hide the page, it can be done through WebSphere Portal XML configuration interface. You do this by setting the hidden flag for the page parameter for the content-node tag in XML. You can use the following XML snippet:
<request xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="PortalConfig_1.4.xsd" type="update" create-oids="true">
<portal action="locate">
<content-node action="update" uniquename="com.mypage" active ="true">
<parameter name="com.ibm.portal.Hidden" type="string" update="set"><![CDATA[true]]></parameter>
</content-node>
</portal>
</request>

Friday, July 6, 2012

How to enable remote debugging for a WebSphere Web application using RAD

Step 1:

To be able to debug an Enterprise Application you must enable the Debugging service for WebSphere Application server.



Ensure you set up an appropriate port that the development client is able to access.
Things to remember here :
1)       You must start server is debug mode either by selecting ‘Enable service at server startup’ or by using RAD
2)       Take a note of JVM Debug port



Step 2:


Using RAD (IBM Rapid Application Developer)

Switch to Debug Perspective
Open Debug configurations and Set-up remote debug details using appropriate port as set in the Application server's Debugging service.



Note: If you get this dialog, it is because the server is not started or you have a firewall issue or incorrect connection details.




Finally Set a break point on deployed web project.


Monday, June 4, 2012

Configuring/Transferring WebSphere Portal to use DB2

I have been recently trying to migrate portal db from derby to db2 enterprise edition v9.0 came across these links were very helpful :

http://www-10.lotus.com/ldd/portalwiki.nsf/dx/Test#Creating+the+Databases
http://publib.boulder.ibm.com/infocenter/wpdoc/v6r1/index.jsp?topic=/com.ibm.wp.ent.doc_v6101/config/sol_db2_cfg.html
http://wpcertification.blogspot.in/2009/04/database-transfer-configuration-wizard.html

Wednesday, February 29, 2012

Adding Web Content Manager to a portal v7.0 base installation

If you install the product using the Base option, the Web Content Manager features, such as the authoring portlet, are not fully installed. However, you can still add these features manually after installation.

Important: These instructions only apply if you installed an offering that includes Web Content Manager. These steps will not work with an offering that does not include Web Content Manager.
  1. Install the latest cumulative fix for Web Content Manager. See Recommended Updates for WebSphere Portal and IBM Web Content Manager V7.0 for details.
  2. Open a command prompt in the wp_profile_root/ConfigEngine directory.
  3. Set up the authoring feature.
    • Run the following command:
      • UNIX™: ./ConfigEngine.sh configure-wcm-authoring -DPortalAdminPwd=password -DWasPassword=password
      • Windows™: ConfigEngine.bat configure-wcm-authoring -DPortalAdminPwd=password -DWasPassword=password
      • i: ConfigEngine.sh configure-wcm-authoring -DPortalAdminPwd=password -DWasPassword=password
Note -  For authentication issues, updated wp_profile/ConfigEngine/properties/wkplc.properties
For adding other features to a portal v7.0 base installation follow : http://www-10.lotus.com/ldd/portalwiki.nsf/dx/Adding_features_to_a_base_installation_wp7

Thursday, September 15, 2011

AJAX proxy

AJAX proxy is required to connect several different target hosts and make cross domain calls. As browsers don't allow to send ajax request to different host other than origin server so, there is a need of intermediate server side handler to serve request.
In websphere either you can add Ajax proxy capability in your own project or you can use websphere default Global Ajax proxy.

The global proxy configuration of the portal is located in a separate enterprise application that is deployed during the portal installation. The corresponding enterprise application archive is named AJAX Proxy Configuration.ear. The file proxy-config.xml that represents the global configuration is located in the WAR file wp.config.proxy.war.
To update the global proxy configuration, redeploy the enterprise application archive that contains the modified proxy-config.xml file and restart it. You do not need to restart the entire portal server.
For security reasons the global proxy configuration does not define any specific access policies. In other words, by default, the proxy blocks each request unless you add access policies to "unlock" your trusted sites.

AJAX proxy configurations file (proxy-config.xml) allows you to create specific access policy to restrict the set of allowed HTTP operations
You can also configure AJAX proxy to support single sign-on, the configuration makes the proxy forward the respective LTPA and JSessionID cookies.

URL format to use proxy is
<protocol>://<portal-domain>/<proxyurl>/<protocol>/<host>%3a<port>/<url>?<query>
Examples
Refer to the following sample proxy URLs. They show how you can load a URL via the proxy depending on the context path mapping in the proxy configuration.
URL: http://www.ibm.com/developerworks/news/dw_dwtp.rss
Context path mapping (from proxy-config.xml): <mapping contextpath="/proxy" url="*"/>
Proxy URL: http://myportal.com:10040/wps/proxy/http/www.ibm.com/developerworks/news/dw_dwtp.rss

You can also specify timeout in proxy-config.xml, this will be applicable to each proxy:policy urls
i.e.
<proxy:meta-data>
<proxy:name>connection-timeout</proxy:name>
<proxy:value>600000</proxy:value>
</proxy:meta-data>

Proxy also support http basic authentication and you can also automate passing user/password using jquery
To support http basic authentication modify proxy-config.xml
<proxy:policy acf="none" url="http://<url>/*" basic-auth-support="true">
To pass user/password using jquery use this :
<script language="JavaScript">
$.ajax({
type: "GET",
cache: false,
dataType: "xml",
url: "http://localhost:10039/.MEMCREST/proxy/http/some.com/getresult",
username: 'username',
password: 'password',
success: function(data) {
var $xml = $(data);
//iterate $xml and generate html markup
},
error : function(jqXHR, textStatus, errorThrown) {
alert("error: "+textStatus);
}
});
</script>

Lets say you want to access youtube channel content inside your webpage, do the following :
1) Edit proxy-config.xml file add followling lines so that only url which start from http://www.youtube.com/user/* will be served from this proxy
<?xml version="1.0" encoding="UTF-8"?><proxy:proxy-rules xmlns:proxy="http://www.ibm.com/xmlns/prod/sw/ajax/proxy-config/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <proxy:mapping contextpath="/proxy" url="*"/>
    <proxy:policy acf="none" url="http://www.youtube.com/user/*">
        <proxy:actions>
            <proxy:method>GET</proxy:method>
            <proxy:method>POST</proxy:method>
        </proxy:actions>
    </proxy:policy>
</proxy:proxy-rules>
2) Call youtube url using proxy, I have used here Jquery ajax
<script src="http://code.jquery.com/jquery-latest.js"></script>
<div id="results"></div>
<script language="JavaScript">
    $.ajax({
         type: "GET",
         cache: false,
         url: "http://localhost:10039/.YouTubeChannel/proxy/http/www.youtube.com/user/BoxOffice", //Requesting to proxy to get response from youtube
         success: function(html) {
             $("#results").append(html);
        },
        error : function(jqXHR, textStatus, errorThrown) {
            alert("error: "+textStatus);
        }
   });
</script>

For More Info Visit IBM Infocenter link : http://publib.boulder.ibm.com/infocenter/wpdoc/v6r1/topic/com.ibm.wp.ent.doc_v6101/dev/ajax_proxy.html