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
Operations

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 3.0.0.29934 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(FBDataSource.java:123)
at org.firebirdsql.jdbc.AbstractDriver.connect(AbstractDriver.java:130)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at jdbc94.TestJDBC94.main(TestJDBC94.java:13)
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(AbstractJavaGDSImpl.java:2215)
at org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl.receiveResponse(AbstractJavaGDSImpl.java:2165)
at org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl.internalAttachDatabase(AbstractJavaGDSImpl.java:453)
at org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl.iscAttachDatabase(AbstractJavaGDSImpl.java:406)
at org.firebirdsql.jca.FBManagedConnection.<init>(FBManagedConnection.java:91)
at org.firebirdsql.jca.FBManagedConnectionFactory.createManagedConnection(FBManagedConnectionFactory.java:482)
at org.firebirdsql.jca.FBStandAloneConnectionManager.allocateConnection(FBStandAloneConnectionManager.java:69)
at org.firebirdsql.jdbc.FBDataSource.getConnection(FBDataSource.java:120)

 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