Wednesday, 26 February 2014

Encryption / Decryption without sharing public key

In this Example we will see how to communicate between two parties with encrypted messages without sharing the public key.

The first party party1 will encrypt the message with its public key and send the message to party2. Party2 will again encrypt the message with its public key and send the message back to party1. Then party1 will decrypt the message with its private key and send the message back again to party2. Party2 will then decrypt the message with its private key and retrieve the original decrypted message.

JBOSS 7 Proxy settings

To apply proxy settings do the below steps

Go to JBOSS_HOME/standalone/configuration/standalone.xml
After tag </extensions>
Add the following

<system-properties>
<property name="http.proxyHost" value="yourProxyIpAddress"/>
<property name="http.proxyPort" value="yourProxyPort"/>
</system-properties>

Thursday, 20 February 2014

JBOSS 7 with JConsole

JConsole gives basic information about activities happening on server. Below are the steps to start and point jconsole to a remote machine.

To remotely connect to a JBoss machine you will need a local copy of JBoss too. In the bin folder of local JBoss look for jconsole.bat. Open this file a GUI will appear asking to connect to a local JVM or a remote one.

JBOSS 7 HTTPS/SSL configuration

JBOSS by default is not configured to run on HTTPS. For configuring JBOSS to run on https follow below steps:

1. Create Self-Signed Certificate


Do this step only if a valid certificate is not present and a self-signed certificate needs to be used.

Create self-signed certificate from a machine where java is installed. Fire the below command from command prompt:
keytool -genkeypair -alias client -keyalg RSA -keysize 1024 -storetype jks -validity 365 -keypass password -keystore jboss.jck -storepass password -dname "cn=localhost, ou=Verisign, o=MyComp Inc, l=Foster City, st=California, c=US"

This will create jboss.jck keystore file.  Place the file at location /usr/local/cert.



keytool -export -alias client -storetype jks -keystore jboss.jck -storepass password -file jboss.crt



Share the post