Sunday, July 13, 2014

Configure Generic Error codes for Verbose error message

Some Apache Tomcat instances were configured to display verbose error messages. The error messages contains technical details such as stack traces. As error messages tend to be unpredictable, other sensitive details may end up being disclosed.

As impact on system, Attackers may fingerprint the server based on the information disclosed in error messages. Alternatively, attackers may attempt to trigger specific error messages to obtain technical information about the server.

To avoid above situation, it is possible to configure the server to display generic, non-detailed error messages in the Apache Tomcat.


Declare proper in web.xml wherein it is possible to specify the page which should be displayed on a certain Throwable/Expection/Error or a HTTP status code.

Examples

<error-page>
    <exception-type>java.lang.Exception</exception-type>
    <location>/errorPages/errorPageForException.jsp</location>
</error-page>


which will display the error page on any subclass of the java.lang.Exception.


<error-page>
    <error-code>404</error-code>
    <location>/errorPages/errorPageFor404.jsp</location>
</error-page>


which will display the error page on a HTTP 404 error and it is possible to specify the error codes.

<error-page>

  <exception-type>java.lang.Throwable</exception-type>
  <location>/errorpages/errorPageForThrowable.jsp</location>
</error-page>


which will display the error page on any subclass of the java.lang.Throwable.

Friday, June 27, 2014

Compare the values of property in WSO2 ESB

Most of the time i use to get question on "How to compare the values of the property in WSO2 EBS" from most of the wso2 ESB users. WSO2 ESB give a adequate support for value comparison for properties.

I have created simple configuration to demonstrate that functionality.
 

Tuesday, June 3, 2014

Enable Unlimited Scrolling in the Terminal - Ubuntu


Usually while i am testing my server logs the output from a command can be so so lengthy and hard to able scroll back to the beginning. Therefore, I always set the terminal of the each machine that i work to display as many lines as unlimited scrolling.

In the terminal, go to Edit > Profile Preferences, and in the Scrolling tab you will see there is a default amount of lines to be displayed (probably something like 512). Under that, you will see “Unlimited“, so check that, and from the next command on-wards you won’t have that limitation any more.

Monday, April 28, 2014

Change the delimiter in mysql


To deploy the procedure via terminal in mysql you need to change the delimiter! So this is a sample step that you could follow to do it!

DELIMITER //

CREATE PROCEDURE ChangeInventory(in InventoryID INT, in Quantity INT) 
BEGIN 
UPDATE INVENTORY SET IN_QTY = Quantity WHERE IN_P_ID = InventoryID; 
END // 

DELIMITER ;

Wednesday, April 16, 2014

How to list the admin Service in WSO2 carbon Products

If you want to find out the admins service that available in wso2 carbon product. with two steps you can find it out with out any problem.

Step 1
Start the wos2 server with OSGI console


Step 2
Once the server is started type the "listAdminServices" command in the osgi  console to list out the admin service.


Monday, April 7, 2014

Quick Note on How to install java in Ubuntu/Mint

Good old days we had the simple way to install the sun java in our Ubuntu machines! Since the oracle has taken the proprietorship of Oracle java(aka sun java) and due to Oracle's software redistribution policy it it not simple as it is to do the "apt-get install"

Nevertheless there are some good documents that showcase the way to install the java with out any struggle :).

First terminal will install the oracle java for you and second terminal command will set the install java as defualt java version.

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
sudo apt-get install oracle-java6-set-default



[1] http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html
[2] https://help.ubuntu.com/community/Java

Sunday, March 2, 2014

Internet of Thing(IoT) in my thinking!

When i heard "Internet of Thing", I wondered what the hell was that! Soon as i realize the in-depth mean of the term IoT I amazed the possiblity of this world!

IPv6 addressing system has shift the dimension of addresses of the "things"! here Things can be all the artificial creation that created by human! Example Car, Bus, Computer, Mobile Phone, Inplant Heart, Microchip for track a bird and sooooooo on.....

If you want me to tell in a simple picture! Check out below! ;)




So How IoT Dream come to live ?

IPv6’s huge increase in address space is an important factor in the development of the Internet of Things. According to Steve Leibson, who identifies himself as “occasional docent at the Computer History Museum,” the address space expansion means that we could “assign an IPV6 address to every atom on the surface of the earth, and still have enough addresses left to do another 100+ earths.” In other words, humans could easily assign an IP address to every "thing" on the planet. An increase in the number of smart nodes, as well as the amount of upstream data the nodes generate, is expected to raise new concerns about data privacy, data sovereignty and security.



So what is the vision of IoT ?
IoT has the potential to change the current life style of the human when it is possible integrate anything with everything! and a make a smart planet!