Discussions
Categories
- 385.5K All Categories
- 4.9K Data
- 2.5K Big Data Appliance
- 2.4K Data Science
- 453.4K Databases
- 223.2K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 47 Multilingual Engine
- 606 MySQL Community Space
- 486 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3.2K ORDS, SODA & JSON in the Database
- 585 SQLcl
- 4K SQL Developer Data Modeler
- 188K SQL & PL/SQL
- 21.5K SQL Developer
- 46 Data Integration
- 46 GoldenGate
- 298.4K Development
- 4 Application Development
- 20 Developer Projects
- 166 Programming Languages
- 295K Development Tools
- 150 DevOps
- 3.1K QA/Testing
- 646.7K Java
- 37 Java Learning Subscription
- 37.1K Database Connectivity
- 201 Java Community Process
- 108 Java 25
- 22.2K Java APIs
- 138.3K Java Development Tools
- 165.4K Java EE (Java Enterprise Edition)
- 22 Java Essentials
- 176 Java 8 Questions
- 86K Java Programming
- 82 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.3K Java SE
- 13.8K Java Security
- 208 Java User Groups
- 25 JavaScript - Nashorn
- Programs
- 667 LiveLabs
- 41 Workshops
- 10.3K Software
- 6.7K Berkeley DB Family
- 3.6K JHeadstart
- 6K Other Languages
- 2.3K Chinese
- 207 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 474 Portuguese
Question regarding the sending of passwords via JDBC . . .

843854
Member Posts: 49,633
Hey All,
I'd like to know if the username and password is sent in clear text during the getConnection() JDBC call to connect a client to a database?
I'm using a type 4 driver. Does this mean that the connection protocol is database-dependent and that some databases may allow the sending of passwords to be encrypted?
Thanks for any help.
Peter
I'd like to know if the username and password is sent in clear text during the getConnection() JDBC call to connect a client to a database?
I'm using a type 4 driver. Does this mean that the connection protocol is database-dependent and that some databases may allow the sending of passwords to be encrypted?
Thanks for any help.
Peter
Comments
-
Typically yes, clear text, the JDBC spec does not make assumptions as to what the driver does with the password. The encryption needs to be negociated by the server and the jdbc driver. Check if your back-end supports password encryption, then check if the jdbc driver supports that feature. Type 4 means that the driver implements the network protocol to "speak" to the dbms in java. So the whole thing (Driver plus network library) is in written in java.
hth. -
I'm a bit new to Java but it seems there's a security issue here ... I'm using a Mysql web server and would like to write a client front-end in Java for misc. users.
I'm not worried about the passwords being sent because these are encrypted but I'm worried about the fact that passwords in Java pseudocode (compiled classes) are plain text. Well with most development languages this is true, strings are stored in plain text. But Java is very unlike the other languages: Java pseudocode can easily be decompiled.
From what I've read, obfuscators only make decompiled pseudocode harder to read but they do not protect strings.
My question is: is there a way to protect the connection strings ? or at least the passwords ? Something can certainly be done but what ? -
I reallty need an answer here please !
Thanks ! -
I reallty need an answer here please !And what would the question be?
If you distribute a java application that can connect to your database regardless of how you encrypt it I can hack it and get to your database.
So your choices are:
-Don't worry about it. Trust your users. Maybe back up a lot.
-Don't distribute the piece that talks to the database. Use a front end that talks to a server. That server actually talks to the database. This is one of the points of a web server.
-
Hey ,
I am also trying same thing... I am using JDBC type 4 driver to connect to SYBASE/Oracle/MS SQL Server 2000. Password is just a plain text while transmitting.How can I encrypt this.
Thanks for any help.
Sreenivas -
hello,
Just read the usermanual of the JDBC Driver you are using. There should be some options that can be set via the jdbc url or jdbc properties. If you are sure that the DB supports password encryption.. i guess MSSQL does.. , and you cannot find out the options in the JDBC driver, make a call to their tech support and ask if they supports it.
-Jer -
Thanks Jer...
Yes... MS SQL supporting password encryption but not Oracle & Sybase... Is there any way to handle this encryption issue for these two DB's also.
Thanks in advance
Sreenivas -
Yes... MS SQL supporting password encryptionThe password is always encrypted when using Oracle thin or oci driver. Oracle also has the ability to encrypt the text using oci.
cryption but not Oracle & Sybase... Is there any way
to handle this encryption issue for these two DB's
also.
-
Here is an additional link on how to encrypt DATA using the Oracle thin driver.
-
Thanks a lot...... where is the link?
This discussion has been closed.