Issue Details (XML | Word | Printable)

Key: JDBC-248
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Blocker Blocker
Assignee: Mark Rotteveel
Reporter: Mark Rotteveel
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.
Jaybird JDBC Driver

Authentication protocol in Jaybird java wire-protocol does not work with the 'LegacyAuth' option of Firebird 3

Created: 18/Apr/12 06:54 PM   Updated: 28/Apr/12 08:51 AM
Component/s: Wire protocol
Affects Version/s: Jaybird 2.1.6, Jaybird 2.2
Fix Version/s: None

 Description  « Hide
The pure-java implementation cannot connect to Firebird with LegacyAuth option enabled, the native protocol is able to connect.

It looks like Jaybird uses an authentication protocol that is too outdated for LegacyAuth (it sends the password in the clear, while the native library sends a hashed password). If possible we should fix this for Jaybird 2.2, so people can start trying out FB 3 from Java without resorting to the native implementation.

Exception thrown when connection:
Exception in thread "main" org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544472. Your user name and password are not defined. Ask your database administrator to set up a Firebird login.
at org.firebirdsql.jdbc.FBDataSource.getConnection(
at org.firebirdsql.jdbc.AbstractDriver.connect(
at java.sql.DriverManager.getConnection(
at java.sql.DriverManager.getConnection(
at jdbc94.TestJDBC94.main(
Caused by: org.firebirdsql.gds.GDSException: Your user name and password are not defined. Ask your database administrator to set up a Firebird login.
at org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl.readStatusVector(
at org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl.receiveResponse(
at org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl.internalAttachDatabase(
at org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl.iscAttachDatabase(
at org.firebirdsql.jca.FBManagedConnection.<init>(
at org.firebirdsql.jca.FBManagedConnectionFactory.createManagedConnection(
at org.firebirdsql.jca.FBStandAloneConnectionManager.allocateConnection(
at org.firebirdsql.jdbc.FBDataSource.getConnection(

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Mark Rotteveel added a comment - 21/Apr/12 12:39 PM
Alex will fix this in Firebird 3 so the unencrypted password is allowed again for LegacyAuth. I looked at the algorithm used for the legacy encrypted password, but that is very hard to translate to a working Java version (which is probably why it wasn't done before).

As there is a workaround: use native this will not be fixed. I will keep this ticket open for the time being to check it at a later time.

Mark Rotteveel added a comment - 28/Apr/12 08:51 AM
Problem has been fixed in more recent snapshots