C:\j2sdk1.4.2_04\bin; for java
C:\j2sdk1.4.2_04\jre\bin; for keytool
C:\Program Files\GnuWin32\bin for openssl
Weblogic server uses SSL on its defaulf port of 7002.
Using ssl is comprehensive overhead for the server, not feasible to use in dev envs.However always use in prod enviornments.
To Setup SSL:
1) For an ssl creation we need two things one is identity(private keys and Digital Certificates) other is trust(trusted root CA ceritificates). By default weblogic server kit ie certgen and java keytool will provide identity and trust stores, we can get those by thrid party vendors like verisign, thawte.
2) Store the private key and trusted CA certificates in to keystore.
3) Configure the identiry and trust in the admin console with the password of the keystore.
We can get privatekeys digitalcertificates and Trustedroot using:
To use SSL the server needs privatekey, digitalcertificate containing matching publickey and one trusted certificate. By default all these are avialble in /wl_home/server/lib.
We can create those by using javakeytool which is used to generate privatekey, self-signed digitalcertificate, CSR, if you need a third party certificate we can produce a CSR and sent to CA they will provide the certificate.
We can also get by using certgen which is used for demonstrative purpose. The demonstration digital certificate provided by the weblogic server uses the hostname as default machine hostname.
Using CertgenUtility:
The certgen utility which is used to generate privatekey and digital certificate which is used for demo purpose. CertGenCA.der and CertGenCAkey.der are the default key and certificate used by certgen.
In order to use certgen we need to set the classpath to \weblogic_homm\server\lib then execute the commands for different purpose
1) To generate the certificate we need to execute the following command.
$ java utils.CertGen
[-cacert <ca_cert_file-name
>] [-cakey <ca_key_filename
>]
[-cakeypass <ca_key_password
>] [-selfsigned]
[-certfile <certfile
>] [-keyfile <privatekeyfile
>]
[-keyfilepass <keyfilepassword
>] [-strength <keystrength
>]
[-cn <commonname
>] [-ou <orgunit
>] [-o <organization
>]
[-l <locality
>] [-s <state
>] [-c <countrycode
>]
[-subjectkeyid <subjectkeyidentifier
>]
[-subjectkeyidformat UTF-8|BASE64]
If you mention selfsigned no need to mention cacert cakey as those are used when you taken from CA.
2)Use ImportPrivateKey utility to load the digitalcertificate and privatekey into keystore.
We already discussed that the certgen default takes the hostname as common name it uses the jdk1.3
InetAddress.getLocalHost().getHostname() takes the hostname and placed in the place of commonname by default.
When we entered hostname in command prompt it takes tha FullyQualifiedDomainName from /etc/hosts, when you enter java.net.InetAddress.getHostname() it searches the hostname for /etc/nsswitch.conf
http://download.oracle.com/docs/cd/E13222_01/wls/docs81/secmanage/ssl.html
Install SSL Certificate BEA WebLogic Server 8 & 9Download and copy your certificate files to your serverDownload your SSL certificate and support files by clicking on the download link in your fulfillment email or from your GeoCerts SSL Manager account. Download the PKCS#7 formatted version of your certificate.
The SSL Certificate and intermeidate cert are now installed into your keystore. Configure the Identity and Trust keystores
|
No comments:
Post a Comment