Friday, June 25, 2010

Configuring Two way SSL in Weblogic 10.3.3

This involves the following steps -
  • Creation of Identity for Weblogic Server
  • Creation of Personal Identity for the user
  • Creating trust for the Personal Identity for the user in WebLogic Server
  • Configuring SSL
Creation of Identity for Weblogic Server

This involves the following steps
  • Creation of Identity Keystore, Key and Certificate
  • Configuration of Keystore in WebLogic Server
Creation of Identity Keystore, Key and Certificate

D:\Oracle\Middleware\user_projects\domains\sandesh_domain\servers\AdminServer\security\identity>keytool -genkey -alias server.identity -dname "CN=,OU=ORG,O=Company" -keypass server.identity.password -keystore identity.jks -storepass identity.password

Configuration of Keystore in WebLogic Server

Go to Weblogic Admin Console
Click Environments
Click Servers
Click the Server (for example AdminServer)
Click KeyStores tab
Click Change button for Keystores and select Custom Identity and Java Standard Trust
Click Save
Enter the location for identity.jks in Custom Identity Keystore
Enter JKS for Custom Identity Keystore Type
Enter identity.password for Custom Identity Keystore Passphrase and its confirmation

Creation of Personal Identity for the user

This involves the following steps
  • Creation of Client Personal Identity Key pair
  • Getting the Key pair signed by a CA
  • Generate a PKCS12 Keystore to import into Internet Explorer
  • Installing the Key in a browser for 2-way SSL
Creation of Client Personal Identity Key pair

Goto WebLogic domain config directory and run setDomainEnv.cmd in the bin directory

D:\Oracle\Middleware\user_projects\domains\sandesh_domain\servers\AdminServer\security\trust>java utils.CertGen -certfile robert.brown.identity.cert -keyfile robert.brown.identity.key -keyfilepass robert.brown.identity.key.password -cn robert.brown

Generating a certificate with common name robert.brown and key strength 1024 issued by CA with certificate from D:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\CertGenCA.der file and key from D:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\CertGenCAKey.der file

The following files are created -

robert.brown.identity.cert.der
robert.brown.identity.cert.pem
robert.brown.identity.key.der
robert.brown.identity.key.pem

Please note that this step signs the certificates with a WebLogic test CA

Generate a PKCS12 Keystore to import into Internet Explorer

D:\Oracle\Middleware\user_projects\domains\sandesh_domain\servers\AdminServer\security\trust>java utils.ImportPrivateKey -keystore robert.brown.identity.p12 -storepass robert.brown.identity.password -storetype pkcs12 -keypass robert.brown.identity.password -alias robert.brown.identity -certfile robert.brown.identity.cert.pem -keyfile robert.brown.identity.key.pem -keyfilepass robert.brown.identity.key.password

Imported private key robert.brown.identity.key.pem and certificate robert.brown.identity.cert.pem into a new keystore robert.brown.identity.p12 of type pkcs12 under alias robert.brown.identity

The following file is created

robert.brown.identity.p12

Installing the Key in a browser for 2-way SSL

Open Internet Explorer
Open Tools
Click Content Tab
Click Certificates button in Certificates section
Click Trusted Root Certification Authorities tab
Click Import and in the Certificate Import Wizard import D:\Oracle\Middleware\wlserver_10.3\server\lib\CertGenCA.der
You should be able to see a self-signed certificate installed in the Trusted Root Certification Authorities issued to CertGenCab
Click Personal tab
Click Import and in the Certificate Import Wizard import robert.brown.identity.p12 and enter password robert.brown.identity.password
You should be able to see an entry in the Personal tab Issued to robert.brown Issued by CertGenCab

Creating trust for the Personal Identity for the user in WebLogic Server

This involves the following steps
  • Installing the WebLogic test CA in the truststore
  • Installing the Client certificate in the truststore
  • Configuration of Truststore in WebLogic Server
Installing the WebLogic test CA in the truststore

D:\Oracle\Middleware\user_projects\domains\sandesh_domain\servers\AdminServer\security\trust>keytool -importcert -trustcacerts -alias ca -file D:\Oracle\Middleware\wlserver_10.3\server\lib\CertGenCA.der -keystore trust.jks -storepass trust.password

Owner: CN=CertGenCAB, OU=FOR TESTING ONLY, O=MyOrganization, L=MyTown, ST=MyState, C=USIssuer: CN=CertGenCAB, OU=FOR TESTING ONLY, O=MyOrganization, L=MyTown, ST=MySta
te, C=US
Serial number: 234b5559d1fa0f3ff5c82bdfed032a87
Valid from: Thu Oct 24 23:54:45 CST 2002 until: Tue Oct 25 23:54:45 CST 2022
Certificate fingerprints:
MD5: A2:18:4C:E0:1C:AB:82:A7:65:86:86:03:D0:B3:D8:FE
SHA1: F8:5D:49:A4:12:54:78:C7:BA:42:A7:14:3E:06:F5:1E:A0:D4:C6:59
Signature algorithm name: MD5withRSA
Version: 3

Extensions:

#1: ObjectId: 2.5.29.15 Criticality=true
KeyUsage [
Key_CertSign
]

#2: ObjectId: 2.5.29.19 Criticality=true
BasicConstraints:[
CA:true
PathLen:1
]

Trust this certificate? [no]: yes
Certificate was added to keystore

Installing the Client certificate in the truststore

D:\Oracle\Middleware\user_projects\domains\sandesh_domain\servers\AdminServer\security\trust>keytool -importcert -trustcacerts -alias robert.brown -file robert.brown.identity.cert.der -keystore trust.jks -storepass trust.password

Certificate was added to keystore

Configuration of Truststore in WebLogic Server

Go to Weblogic Admin Console
Click Environments
Click Servers
Click the Server (for example AdminServer)
Click KeyStores tab
Click Change button for Keystores and select Custom Identity and Custom Trust
Click Save
Enter the location for trust.jks in Custom Trust Keystore
Enter JKS for Custom Trust Keystore Type
Enter trust.password in Custom Trust Keystore Passphrase and its confirmation
Click Save

Configuring 2-way SSL

Click SSL tab
Enter server.identity in Private Key Alias
Enter server.identity.password in Private Key Passphrase and its confirmation
Click Save
Click Advanced
Select Client Certs Requested and Enforced in Two Way Client Cert Behavior
[Note : Ensure that Listen Port Enabled (clear port is enabled, just in case you need to login using clear if SSL configuration does not work)

To test, open Internet Explorer and open the URL https://localhost:7002/console. If you have multiple client certificates on the browser, browser will prompt which certificate to use. Also, since, the server certificate is not in the trusted list, there will be a warning.

35 comments:

  1. Anonymous2:35 PM

    Hi Sandesh,

    I am stuck with one thing..During creation of identity keystore,I am not able to find Identity folder in my weblogic 10.3.3..(as mentioned location of Identity folder is "D:\Oracle\Middleware\user_projects\domains\sandesh_domain\servers\AdminServer\security\identity")

    Could you please help for the same..
    Thanks
    Shweta

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. Anonymous7:13 PM

    Hi Sandesh,

    Its working fine for me.
    thanks alot.

    shweta

    ReplyDelete
  4. Excellent steps to set up 2 way SSL! Thanks a lot.

    ReplyDelete
  5. Anonymous11:29 PM

    In dividing line, in some Parkinson's patients toughened with high doses of dopamine idiopathic Parkinson's disease having
    no specific known crusade.

    Review my web page :: Parkinson's disease specialists Cliffside Park
    My webpage: Parkinson'S Disease Specialists Cliffside Park

    ReplyDelete
  6. Anonymous2:45 PM

    Customers can cull which of the subprogram are simply two of the many different
    things that you can do to maintain both your HDL to LDL ratio and your sum cholesterol ratio mastered.
    This can hateful walking, this pocket-size
    tidbit of worthful info.

    Also visit my homepage ... cholesterolverse.com

    ReplyDelete
  7. Anonymous8:11 PM

    The surmise is not speechmaking with nature, correct?
    The installment commences as Garth Robin hospital ward will growth
    your potency at Blogging and grounds your Web log to go very popular and successful.
    Earning money from blogging is one of the best
    ways peed in the woods?no14. Our findings on monetisation and tax income propagation are in Day to vote down the Excusitis and go second to blogging over again!


    My website :: click here

    ReplyDelete
  8. Hi Sandesh,
    When i tried to run the below command in the terminal :
    java utils.CertGen -certfile robert.brown.identity.cert -keyfile robert.brown.identity.key -keyfilepass robert.brown.identity.key.password -cn robert.brown
    getting below error:
    Exception in thread "main" java.lang.NoClassDefFoundError: utils/CertGen
    Caused by: java.lang.ClassNotFoundException: utils.CertGen
    at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
    Could not find the main class: utils.CertGen. Program will exit.

    how to solve the above problem..what i need to have ..
    Thanks in advance

    Regards,
    Ramesh

    ReplyDelete
  9. Anonymous8:15 PM

    Excellent article ..if it contains screenshots it will help a lot

    ReplyDelete
  10. Anonymous9:18 PM

    I have been exploring ffor a little bit for any high-quality articles or weblog
    posts in this sort of space . Exploring in Yahoo I ultimately stumbled
    upon this web site. Reading this information So i'm glad to
    express thatt I've an incrediibly just right uncanny feeling
    I discovered exactly what I needed. I such a lott surely will make sure to don?t put out of your mind thius site and give it a looik regularly.


    Take a look at my web site paint sprayer reviews

    ReplyDelete
  11. Anonymous9:21 PM

    magnificeոt submit, very informative. I ρonder wɦy the other experts ߋf this sector don't undеrstand this.
    You must proceed your writіng. I'm confіdent, you've a great readers' base already!


    mʏ site garcinia cambogia extract pure

    ReplyDelete
  12. Anonymous9:37 PM

    Hey I know this is off topic but I was wondering if you knew of any widgets I could add to my blog that automatically tweet my newest twitter
    updates. I've been looking for a plug-in like this for quite some time and was hoping maybe you would have some experience with something like this.

    Please let me know if you run into anything. I truly enjoy reading your blog
    and I look forward to your new updates.

    - cliquez ici
    - cliquez ici
    - cliquez ici
    - cliquez ici
    - cliquez ici
    - cliquez ici

    Here is my page - cliquez ici

    ReplyDelete
  13. Anonymous3:14 AM

    Hello i am kavin, its my first time to commenting anyplace, when i read this article i thought i could also make comment due to this good
    paragraph.

    Also visit my blog :: disabled veterans tuition waiver

    ReplyDelete
  14. Anonymous3:14 AM

    This piece of writing provides clear idea for the new
    viewers of blogging, that actually how to do blogging and site-building.


    My homepage :: replica watches

    ReplyDelete
  15. Anonymous2:19 AM

    No matter if some one searches for his essential thing, therefore
    he/she wishes to be available that in detail, therefore that thing is
    maintained over here.

    Check out my website: plumbing companies Gilbert

    ReplyDelete
  16. Anonymous4:45 AM

    Facebook apps are the hottest things of these days.
    We've all seen it, people who have set up a Facebook personal profile for their business
    - usually through ignorance of how Facebook works.
    In my opinion, making a web-based dating profile could be the #1 concern given that you are exposed to similar feelings you get
    from presenting and public speaking.

    Feel free to visit my homepage; how to hack a facebook account without downloading

    ReplyDelete
  17. Anonymous12:59 PM

    First off I want to say fantastic blog! I had a quick question in which
    I'd like to ask if you do not mind. I was interested to know how you
    center yourself and clear your thoughts prior to writing.
    I have had a hard time clearing my mind in getting my ideas out.
    I truly do enjoy writing however it just seems like the first 10 to 15
    minutes tend to be wasted simply just trying
    to figure out how to begin. Any ideas or tips? Cheers!

    my homepage :: save My marriage today by amy waterman pdf

    ReplyDelete
  18. Anonymous1:07 PM

    Simply take a better commercial than candy crush
    saga cheat the previous integrating the later stage.

    So, for example: waiting for patrolling cats to disappear before
    you played it. Unbelievable as it seems the
    Spanish candy crush saga cheat much prefer free-play games.



    my weblog ... Candy crush saga hacks that work

    ReplyDelete
  19. Anonymous4:22 PM

    Hi there, yup this post is truly pleasant and I have learned
    lot of things from it concerning blogging. thanks.


    Also visit my web blog - free music downloads

    ReplyDelete
  20. Anonymous3:21 AM

    Hello, Neat post. There is a problem along with your site in web explorer, may check this?

    IE nonetheless is the marketplace leader
    and a huge component to other folks will miss your wonderful writing because of
    this problem.

    Here is my blog post ... source

    ReplyDelete
  21. Anonymous5:21 AM

    Prom dresses have a lot of style that you can choose.
    Cocktail dresses is a great form of sass clothing and due to their rebirth, designers now headed back
    to bring the wide range of different cocktail dress styles.
    Dress up for the
    win as if you have already become the victor, showing up every day as the victor.
    Many professionals I coach want to tell me all the reasons why they shouldn't have a top-notch image.

    ReplyDelete
  22. The pain center, possibly will deal with heaps of personal injury attorneys and be able to grant a list for you along with setting up interviews.Car Accident Lawyer

    ReplyDelete