Closed luronumen closed 2 years ago
Hi @cincuranet
I debugged this issue better and I believe I have identified the issue:
CREATE OR ALTER USER "CINMOTO\WLM070" SET PASSWORD '123456' USING PLUGIN SRP
CONCLUSION The System.Security.Principal.WindowsIdentity.GetCurrent().Name C# .net method always return the current user as CINMOTO\wlm070 and until the Firebird SQL Server 3.0.9 the CINMOTO\wlm070 and CINMOTO\WLM070 are the same user. I believe that the issue Wrong detection of must-be-delimited user names #7106 fixed on Firebird SQL Server 3.0.10 has changed this behavior. I reading the firebird documentation 13.2.1. CREATE USER saw that: The username argument must follow the rules for Firebird regular identifiers: Delimited identifiers are case-sensitive in all contexts In other works, There was a bug in firebird until the Firebird SQL Server 3.0.9 that allowed me to log into the system using the CINMOTO\wlm070 user even though I registered the "CINMOTO\WLM070" user in the database. When I replaced System.Security.Principal.WindowsIdentity.GetCurrent().Name by System.Security.Principal.WindowsIdentity.GetCurrent().Name.ToUpper() in my source code I got to login without any issue. So, In my option this is not a Firebird ADO.NET provide issue. Does it make sense for you too?
Thanks in advance, Luciano
Makes sense. And great job finding the issue (and I'm also happy it's not issue in the provider :)).
ACTUAL RESULT
EXPECTED RESULT
IMPORTANT NOTES
STEPS TO REPRODUCE THIS ISSUE
ENVIRONMENT SETUP
ConnectionString var fbConnectionStringBuilder = new FbConnectionStringBuilder { Pooling = true, ServerType = FbServerType.Default, DataSource = "CINMOTO.MOT.COM", Database = "MOTOROBOT_CIN", UserID = "My UserID", Password = "My Password", Charset = "WIN1252", Role = "RDB$ADMIN" };
firebird.conf
SETUP
UserManager = Srp, Legacy_UserManager WireCrypt = Enabled
PERFORMANCE
DefaultDbCachePages = 50K FileSystemCacheThreshold = 999M LockHashSlots = 49999 LockMemSize = 30M TempBlockSize = 2M TempCacheLimit = 1024M
SECURITY
DatabaseAccess = None
databases.conf MOTOROBOT_CIN = D:\APPLICATIONS\LURONUMEN\DB\MOTOROBOT_CIN.FDB { AuthServer = Srp256, Win_Sspi SecurityDatabase = MOTOROBOT_CIN UserManager = Srp }