LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  Secure JDBC Connectivity

    Employee
    Posted 11-26-2012 08:02

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: xathras

    Hi,

    Firstly sorry if I posted this to the wrong section, wasn't too sure where to put it.

    We're trying to achieve change our JDBC connectivity from unsecure to secure, this involves us changing the port and attributes on the JDBC Url, e.g.: jdbc:as400://1.1.1.1:9471;naming=sql;errors=full;secure=true

    When I run I get :

    unable to connect: The application requester cannot establish the connection. (sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderE xception: unable to find valid certification path to requested target)

    I assume I need to add a key to a key store, but is this the servers, the application or lavastorm's own key store. Has anyone done this? If so how and do they have any instructions.

    Regards
    Wayne


  • 2.  RE: Secure JDBC Connectivity

    Employee
    Posted 11-29-2012 12:39

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: rboccuzzi

    Wayne, I am not sure if anyone else is doing this, but I will say this, it won't be Lavastorm's key store. We don't do much with the JDBC drivers, just provide an interface; the functionality you are using is all within the JDBC driver, so you should be looking for any documentation related specifically to that driver and any setup that is relevant to it. Sorry I don't have more information; please share once you get it working so others can benefit.

    It looks like this might be something that could be helpful: http://archive.midrange.com/java400-.../msg00048.html

    Good Luck!
    Rich


  • 3.  RE: Secure JDBC Connectivity

    Employee
    Posted 11-30-2012 09:43

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: xathras

    Hi Rich,

    Managed to fix the issue.

    The issue was that we have a SUN JRE and SUN JDK installed. When I used the keytools command it was adding the keys into the Sun JRE CACERTS Key Store. When I specially overridden the command with the JDK it added the key correctly.

    For those whom need to achieve this. Here is the steps I followed (thanks to a combination of some outside help and myself):

    1. Use a tool like Portecle application from the internet. Its free
    2. Open the tool and click on the Examine Menu, followed by Examine SSL/TLS Connection
    3. Fill in the hostname and port number to get the certificates in question
    4. For each Cert that comes back, if you click the "PEM Encoding" button, and click Save, you can save the Public Cert to your local disk
    5. Add the key into your cacerts key store with the command: /usr/java/jdk1.7.0_07/bin/keytool -importcert -file /tmp/cert2.pem -keystore cacerts -alias acdb2t01

    + Note your JDK Path may differ