Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authentication protocol in Jaybird java wire-protocol does not work with the 'LegacyAuth' option of Firebird 3 [JDBC248] #297

Closed
firebird-automations opened this issue Apr 18, 2012 · 5 comments

Comments

@firebird-automations
Copy link

Submitted by: @mrotteveel

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)

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

assignee: Roman Rokytskyy [ rrokytskyy ] => Mark Rotteveel [ avalanche1979 ]

Fix Version: Jaybird 2.2 [ 10053 ]

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

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.

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

Fix Version: Jaybird 2.2 [ 10053 ] =>

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

Problem has been fixed in more recent snapshots

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants