Batakj
Batakj

Reputation: 12743

How to establish secure connection between java application and database?

In an interview, Interview asked me an question :

How could you do it? I didn't find any clue for this question in google also.

How to establish secure connection between java application and database? Please help me.

Upvotes: 0

Views: 3073

Answers (3)

duffymo
duffymo

Reputation: 308733

Hopefully the person who asked the question wasn't seriously thinking about exposing a database to the wider Internet. If they were, better not to accept that position.

Upvotes: 0

Alex K.
Alex K.

Reputation: 175748

HTTPS? If your client is using something proprietary with a web server acting as an intermediary to talk to the db server it would (one would hope) be transparent between your application the & web server; simply change from HTTP to HTTPS, ditto if you’re using SQL Server web service end-points (which you can make use HTTPS).

If perhaps you mean SSL then SQL server supports encrypted connections between client and server, see this question.

Upvotes: 3

kgiannakakis
kgiannakakis

Reputation: 104168

Google for JDBC connection over SSL. See here for an example.

Upvotes: 0

Related Questions