Closed gabrielruschel closed 1 year ago
I think there is an error in authentication. I think you are giving the wrong user or password.
The error message is confusing and should be fixed if it is handled well.
I tested a connection with an user and password that didn't exist and the error was indeed the same, Error op_response:92
.
However, I tested againt with different valid credentials and still had the same error. I could assure that these were valid credentials because I could authenticate with them in the database using different clients, without using this lib or any golang code. I think there is a problem with authentication but I think that a wrong user/password is not the problem here, could it be something else?
Thanks for your report. I just remembered. A user to login must be in uppercase. Does your Firebird user name contain lowercase letters?
For example, it should be SYSDBA, not sysdba. The connection process is converting the user name to uppercase in an internal process.
I could stop the process of ToUppser(), but that would stop the existing program from working, so I have not changed it.
In the different Firebird databases that I connected I had both cases where the user was in lowercase and also in uppercase, and both cases were working. This issue only appeared when I tried to connect to a Firebird 3.0 database. In this case where I had this error, I tried to pass the user name with uppercase and still had the same error, so I believe this is not the problem. Maybe something specific to Firebird 3.0?
Just to be sure, the credentials that were given to me the user was lowercase and before opening the connection on the go code I converted to uppercase. I believe is not required that the original database user name to be uppercase, right?
sorry, I did not communicate well due to my poor language.
No problem, later I understood what you meant, but unfortunately I believe this is not the reason.
I checked again the credentials I was testing before the user was already uppercase in the database. To doublecheck, a new user "TEST" was created and using this new credentials still returned the same error, so I think the problem is something else.
Can you tell me what the value of AuthServer in firebird.conf ? It may be commented out and not specified.
For example, a line that looks like this
AuthServer = Srp256,Srp,Legacy_Auth
In one of the databases with this issue the AuthServer is like this:
AuthServer = Legacy_Auth, Srp, Win_Sspi
I use Ubuntu for both server and client as my testing environment.
Perhaps your environments are both windows?
I haven't heard any issue, but Windows client may not handle Legacy_Auth
well.
You may need to change your server's firebird.conf to
AuthServer = Srp, Legacy_Auth, Win_Sspi
or
AuthServer = Srp, Win_Sspi
in the server's firebird.conf.
Yeah, in my case both the application and database are running on a Windows environment. Unfortunately, probably I won't be allowed to change the database configs
Is there a possibility where changing this AuthServer value could break another application that connects to this database? Also, if I can't change this config, is there anything else I could do to try to solve this issue?
I see, so you are saying that it is difficult to change the server settings?
If the following changes are made
AuthServer = Srp, Legacy_Auth, Win_Sspi
I think it will work with the existing client without any change, since the order of the plugins to try will only change.
Sorry, it doesn't seem possible to connect with this driver without changing the server configuration.
You may want to specify Srp in auth_plugin_name as follows.
db, err = sqlx.Open("firebirdsql", "user:password@localhost:3050/C:\\path\\to\\database?auth_plugin_name=Srp"
You may want to specify Srp in auth_plugin_name as follows.
db, err = sqlx.Open("firebirdsql", "user:password@localhost:3050/C:\\path\\to\\database?auth_plugin_name=Srp"
I tested this before changing the
firebird.conf
configs and it worked on both cases where I had this issue!
What's exactly the difference on using this Srp auth plugin? I'm gonna set this as default for now, but I also wanted to know which options on this argument are available that I may use in the future
SRP is a highly secure challenge-response type authentication method https://en.wikipedia.org/wiki/Secure_Remote_Password_protocol
Legacy_Auth, on the other hand, is a much older DES-based password hashing scheme
Ok then, I think we can close this issue now, thank you very much for your help!
Hello, I've been using this library to connect to a few different FirebirdSQL databases and came across this error. I'm using
go1.19
andsqlx
to connect to the databases.Basically, I'm just creating the
sqlx.DB
connections, and if no error occurred, calldb.Ping()
to check if it can connect to the database.The first FirebirdSQL databases that I tested were running with firebird version 2.5 and had no issues with the
Ping()
and further operations, however, testing with two different databases running with firebird 3.0 returned the errorError op_response:92
afterdb.Ping()
I'm using the connection string as instructed in the README with no params. In the cases that the error occurred with firebird 3.0, both the application and database were running on Windows 10
I need some help understanding what is causing this error and how to resolve it, I couldn't find anything related in the issues, is there any configs or params that I'm missing? Please let me know if you need more info.