Layer7 API Management

 View Only
  • 1.  JDBC Connection to SQL Server 2016 over SSL failing

    Posted Jun 04, 2020 10:30 PM
    Edited by IT-CD Jun 04, 2020 10:59 PM
    I am using API Gateway 9.3 software appliance form factor. Our database server recently got upgraded to SQL Server 2016 and now they are asking to use SSL to connect. Previously it was working fine without SLL with JDBC URL like jdbc:l7tech:sqlserver://10.0.0.1:1433;DatabaseName=test . I tried adding encrypt=true;trustServerCertificate=true in URL but it is not working.

    Both API Gateway and DB server are in same subnet.



  • 2.  RE: JDBC Connection to SQL Server 2016 over SSL failing

    Posted Jun 05, 2020 06:36 AM
    What a coincidence. I'm fiddling with this this week to. I was able to set up a secure session (I think?) without the need to specify anything. I know we have our intern certificate authority which the gateway trusts as a trust anchor. Do you guys use a certificate authority and does de Gateway trust de root authority? It is possible that L7 drops de connection because it doesn't trust the server where database runs on hence the connection issue. 

    What is message you get? Just a general connection failed?

    Cheers


  • 3.  RE: JDBC Connection to SQL Server 2016 over SSL failing

    Posted Jun 05, 2020 07:13 AM
    Thank you Adriaan for you pointer, so do I need to add certificate in trusted certificates ? or it should be with private key?
    I am getting error: SQL Server login requires SSL connection


  • 4.  RE: JDBC Connection to SQL Server 2016 over SSL failing

    Posted Jun 05, 2020 10:06 AM
    Hey you can try to add the certificate of de SQL database server to the trusted certificates. That should be enough for one way SSL. 

    Good luck


  • 5.  RE: JDBC Connection to SQL Server 2016 over SSL failing

    Posted Jun 05, 2020 11:01 AM
    Edited by IT-CD Jun 05, 2020 12:40 PM
    Pheww, not working. May be I am asking a stupid question, please let me know truststore is the Manage certificates menu in policy manager ?

    Original Message:
    Sent: 06-05-2020 10:05 AM
    From: Adriaan van Loon
    Subject: JDBC Connection to SQL Server 2016 over SSL failing

    Hey you can try to add the certificate of de SQL database server to the trusted certificates. That should be enough for one way SSL.

    Good luck
    Original Message:
    Sent: 06-05-2020 07:13 AM
    From: Vivek Awasthi
    Subject: JDBC Connection to SQL Server 2016 over SSL failing

    Thank you Adriaan for you pointer, so do I need to add certificate in trusted certificates ? or it should be with private key?
    I am getting error: SQL Server login requires SSL connection
    Original Message:
    Sent: 06-05-2020 06:35 AM
    From: Adriaan van Loon
    Subject: JDBC Connection to SQL Server 2016 over SSL failing

    What a coincidence. I'm fiddling with this this week to. I was able to set up a secure session (I think?) without the need to specify anything. I know we have our intern certificate authority which the gateway trusts as a trust anchor. Do you guys use a certificate authority and does de Gateway trust de root authority? It is possible that L7 drops de connection because it doesn't trust the server where database runs on hence the connection issue.

    What is message you get? Just a general connection failed?

    Cheers
    Original Message:
    Sent: 06-04-2020 10:30 PM
    From: Vivek Awasthi
    Subject: JDBC Connection to SQL Server 2016 over SSL failing

    I am using API Gateway 9.3 software appliance form factor. Our database server recently got upgraded to SQL Server 2016 and now they are asking to use SSL to connect. Previously it was working fine without SLL with JDBC URL like jdbc:l7tech:sqlserver://10.0.0.1:1433;DatabaseName=test . I tried adding encrypt=true;trustServerCertificate=true in URL but it is not working.

    Both API Gateway and DB server are in same subnet.



  • 6.  RE: JDBC Connection to SQL Server 2016 over SSL failing

    Broadcom Employee
    Posted Jun 05, 2020 03:48 PM
    Hello

    You can try adding EncryptionMethod=SSL 

     jdbc:l7tech:sqlserver://10.0.0.1:1433;DatabaseName=test;EncryptionMethod=SSL

    For testing purposes if set ValidateServerCertificate=false  or you will need to make sure the gateway trusts the certificate the server is presenting.




  • 7.  RE: JDBC Connection to SQL Server 2016 over SSL failing

    Posted Jun 06, 2020 12:01 PM
    Thank you for the information, but still got error:
    Unsupported curveId29

    error during connection

    please let me know if you have any information, Thank you.


  • 8.  RE: JDBC Connection to SQL Server 2016 over SSL failing
    Best Answer

    Broadcom Employee
    Posted Jun 08, 2020 05:41 PM
    This error seems to indicated its a SSL handshake issue.You may wnat to inquire with the DBA  what Protocols are enabled on the database.

    You can try testing by adding the protocol you want to the JDBC connection. 

    CryptoProtocolVersion=TLSv1.2