database SSL connection in application

Prakash Bambhania 0 Reputation points
2023-05-03T13:56:58.4+00:00

Hello,

As I enabled SSL connection but I am not connect securely in my application without SSL files like "ssl_key, ssl_cert, ssl_ca". Please guide me for get this files or need to generate at my end. If need to do from my side then what steps need to follow.

Thanks

Azure SQL Database
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,521 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Sedat SALMAN 13,075 Reputation points
    2023-05-03T21:28:37.35+00:00

    I will assume you are using Azure SQL Database. Azure SQL Database already has SSL enabled by default, so you don't need to set up SSL certificates manually. However, you need to ensure that your application is configured to use SSL when connecting to the database.

    Modify the connection string to enforce SSL: a. In the connection string, append the following parameter: ;Encrypt=True. b. Optionally, you can also add ;TrustServerCertificate=False to require that the server has a valid SSL certificate.

    For further clarification please provide more details

    0 comments No comments

  2. Prakash Bambhania 0 Reputation points
    2023-05-04T05:05:09.55+00:00

    Hello,

    Thanks for your update on this.

    As we are running cakephp application with version 3. Can you update me proper syntax which I need to update in my code. when I enable SSL by passing connection string with CA file, I am not able to run any command from CLI and get the below error:

    Error:

    [InvalidArgumentException] There was a problem connecting to the database: SQLSTATE[HY000] [2002] in /var/www/html/ClassicSite/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php on line 82

    Thanks

    0 comments No comments

  3. Prakash Bambhania 0 Reputation points
    2023-05-04T05:40:59.3566667+00:00

    Hello,

    In addition to my previous reply, our client application doesn't support encrypted connections, we need to disable encrypted connections enforcement on our flexible server. To disable encrypted connections enforcement, we need to set require_secure_transport server parameter to OFF, It means SSL connection disabled or enabled with my application? please correct me for this confusion.

    Thanks.

    0 comments No comments