You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use CONNECT or CREATE DATABASE to specify a database
SQL> connect test user sysdba;
Database: test, User: SYSDBA
SQL> create user sysdba password 'masterkey';
Statement failed, SQLSTATE = 42S02
add record error
-table PLG$VIEW_USERS is not defined
SQL>
Use CONNECT or CREATE DATABASE to specify a database
SQL> connect test user sysdba;
Database: test, User: SYSDBA
SQL> create user sysdba password 'masterkey';
SQL> exit;
Trying to connect
Use CONNECT or CREATE DATABASE to specify a database
SQL> connect 'localhost:test' user sysdba password 'masterkey';
Database: 'localhost:test', User: SYSDBA
SQL> set list on;
SQL> select * from sec$users;
Statement failed, SQLSTATE = 42S02
find/display record error
-table PLG$VIEW_USERS is not defined
SQL>
Apparently table PLG$USERS and view PLG$VIEW_USERS are predefined in security3.fdb, but are not automatically created when initializing sysdba with Legacy_UserManager.
In addition, we have a side effect - the unavailability SEC$USERS.
The only bug here is mentioned in the end side effect - unavailability of SEC$USERS.
Legacy plugin is extremely unsecure and should not be uses with new security databases. The only reason why it was kept is to simplify migration from previous firebird versions (including use of old client) for people who do not care about security. Certainly, everyone is free to create appropriate table and view in new security database manually, and use legacy plugin, but that is not recommended and will not be automated.
summary: Table PLG$USERS and view PLG$VIEW_USERS are not created automatically when you create a SYSDBA with Legacy_UserManager => SEC$USERS table is unavailable in case of any error in any configured user manager plugin
Submitted by: @sim1984
Create database with standard Security Database. Then assign it as the Security Database itself.
test = d:\fb\fb30\data\test.fdb
{
DefaultDbCachePages = 8K
TempCacheLimit = 512M
SecurityDatabase = test
WireCrypt = Enabled
AuthServer = Legacy_Auth
UserManager = Legacy_UserManager
}
And we are trying to initialize the SYSDBA.
Use CONNECT or CREATE DATABASE to specify a database
SQL> connect test user sysdba;
Database: test, User: SYSDBA
SQL> create user sysdba password 'masterkey';
Statement failed, SQLSTATE = 42S02
add record error
-table PLG$VIEW_USERS is not defined
SQL>
OK. Change configuration
test = d:\fb\fb30\data\test.fdb
{
DefaultDbCachePages = 8K
TempCacheLimit = 512M
SecurityDatabase = test
WireCrypt = Enabled
AuthServer = Srp, Legacy_Auth
UserManager = Srp, Legacy_UserManager
}
Use CONNECT or CREATE DATABASE to specify a database
SQL> connect test user sysdba;
Database: test, User: SYSDBA
SQL> create user sysdba password 'masterkey';
SQL> exit;
Trying to connect
Use CONNECT or CREATE DATABASE to specify a database
SQL> connect 'localhost:test' user sysdba password 'masterkey';
Database: 'localhost:test', User: SYSDBA
SQL> set list on;
SQL> select * from sec$users;
Statement failed, SQLSTATE = 42S02
find/display record error
-table PLG$VIEW_USERS is not defined
SQL>
Apparently table PLG$USERS and view PLG$VIEW_USERS are predefined in security3.fdb, but are not automatically created when initializing sysdba with Legacy_UserManager.
In addition, we have a side effect - the unavailability SEC$USERS.
Commits: 3434d0a FirebirdSQL/fbt-repository@5f28330
The text was updated successfully, but these errors were encountered: