Closed rKuettel closed 2 years ago
But since Authentication is not set up in embedded mode you get the following error:
That's not correct. Auth still applies in Embedded, i.e. you can connect as user Foo
and that user does not have permissions for table T
, and that works/must work.
That's not correct. Auth still applies in Embedded
To clarify: in Firebird 2.5 and earlier on Linux, authentication against the security database is applied even in Embedded mode. In Firebird 3.0 and higher, authentication against the security database is no longer used for Embedded mode (just like for Windows in earlier Firebird versions)
It's just that with Embedded any combination with username/password works (even SYSDBA).
But when I use any combination of username/password I get the Error described in the Issue and therefore can't connect to the Database.
As Mark pointed out on with 2.5 and Linux (I missed you're running on Linux) the security DB is still used.
This means, the connection should work when I set up a User and Password with gsec, right? Because I tried that but still got the same error.
The only way I managed to establish connection was without using a username/password which required the suggested change.
This means, the connection should work when I set up a User and Password with gsec, right?
Yes. Or SYSDBA
/masterkey
(which in FB2.5 was available by default).
Using SYSDBA
/masterkey
or any other user I set up caused the same error.
It's better if you take this into firebird-support list.
I just found another solution for my Problem. Setting the environment variables ISC_USER and ISC_PASSWORD and using those credentials solved my problem.
But I'm still a bit confused why it also worked when passing no User/Pass (using my changes)
But anyway thanks for your time and help :)
I encountered a Problem while trying to connect to embedded Firebird 2.5.9 on Linux. You need to specify a UserId and Password in the connectionstring, else TrustedAuth is used, which is not supported by embedded. But when you pass a UserId or Password to the embedded Server, it tries to check those in the security2.fdb. But since Authentication is not set up in embedded mode you get the following error:
In order to fix this problem, I suggest to add an additional check if it is embedded ServerType in the Connect and ConnectAsync Methods:
Like this you don't need to specify a UserId and Password in the connection string when connecting to Firebird embedded.