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

Legacy_Auth to FB 3 server with ADO.Net Data Provider [DNET783] #722

Open
firebird-automations opened this issue Sep 13, 2017 · 8 comments

Comments

@firebird-automations
Copy link

Submitted by: Sergey (luzums)

Is duplicated by DNET872

I try to connect with FirebirdSql.Data.FirebirdClient 5.11.0 to the FB 3 server with configuration parameters:
AuthServer = Legacy_Auth
UserManager = Legacy_UserManager
and receive error:
System.UnauthorizedAccessException: Ваше имя пользователя и пароль не определены. Обратитесь к администратору базы данных, чтобы создать логин. ---> FirebirdSql.Data.FirebirdClient.FbException: Your user name and password are not defined. Ask your database administrator to set up a Firebird login. ---> FirebirdSql.Data.Common.IscException: Your user name and password are not defined. Ask your database administrator to set up a Firebird login.
в FirebirdSql.Data.Client.Managed.GdsConnection.Identify(String database) в C:\Users\Jiri\Documents\devel\NETProvider\working\Provider\src\FirebirdSql.Data.FirebirdClient\Client\Managed\GdsConnection.cs:строка 215
в FirebirdSql.Data.FirebirdClient.ClientFactory.CreateManagedDatabase(FbConnectionString options) в C:\Users\Jiri\Documents\devel\NETProvider\working\Provider\src\FirebirdSql.Data.FirebirdClient\FirebirdClient\ClientFactory.cs:строка 61
в FirebirdSql.Data.FirebirdClient.ClientFactory.CreateDatabase(FbConnectionString options) в C:\Users\Jiri\Documents\devel\NETProvider\working\Provider\src\FirebirdSql.Data.FirebirdClient\FirebirdClient\ClientFactory.cs:строка 33
в FirebirdSql.Data.FirebirdClient.FbConnectionInternal.Connect() в C:\Users\Jiri\Documents\devel\NETProvider\working\Provider\src\FirebirdSql.Data.FirebirdClient\FirebirdClient\FbConnectionInternal.cs:строка 157
--- Конец трассировки внутреннего стека исключений ---
в Psbst.SProcWrapper.Proxy.Executors.SingleRowSimpleTypeExecutor.ExecuteSProc(IDataContext ctx, String sql, DynamicParameters p, Type returnType, Boolean buffered, Nullable`1 commandTimeout) в C:\agent\_work\1\s\src\Psbst.SProcWrapper\Proxy\Executors\SingleScalarTypeExecutor.cs:строка 36
в Psbst.SProcWrapper.Proxy.StoredProcedure.Execute(IDataContext dataContext, Object[] argumentsParameters) в C:\agent\_work\1\s\src\Psbst.SProcWrapper\Proxy\StoredProcedure.cs:строка 64
в Psbst.SProcWrapper.Proxy.SProcProxy.Intercept(IInvocation invocation) в C:\agent\_work\1\s\src\Psbst.SProcWrapper\Proxy\SProcProxy.cs:строка 24
в Castle.DynamicProxy.AbstractInvocation.Proceed()
в Castle.Proxies.IAuthenticationSprocServiceProxy.Login(String baseName, String password, String computerName, String macAddress, String ipAddress, String logonName, String osVersion, Int32 programId, String programVersion, String basePath)
в Psbst.Bank.Infrastructure.SprocServices.AuthenticationSprocService.Login(User user) в C:\agent\_work\1\s\src\Psbst.Bank.Infrastructure\SprocServices\AuthenticationSprocService.cs:строка 77
--- Конец трассировки внутреннего стека исключений ---
в Psbst.Bank.Infrastructure.SprocServices.AuthenticationSprocService.Login(User user) в C:\agent\_work\1\s\src\Psbst.Bank.Infrastructure\SprocServices\AuthenticationSprocService.cs:строка 82
в Psbst.Bank.BusinessLogic.Core.AuthenticationService.Authenticate(String user, String password) в C:\agent\_work\1\s\src\Psbst.Bank.BusinessLogic\Core\AuthenticationService.cs:строка 27
в Psbst.Bank.LoginWindowViewModel.Login(PasswordBoxEdit passswordTextBox) в C:\agent\_work\1\s\src\Psbst.Bank\LoginWindowViewModel.cs:строка 115
в DevExpress.Mvvm.DelegateCommand`1.Execute(T parameter)
в DevExpress.Mvvm.CommandBase`1.System.Windows.Input.ICommand.Execute(Object parameter)
в MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)
в System.Windows.Controls.Primitives.ButtonBase.OnClick()
в System.Windows.Controls.Button.OnClick()
в DevExpress.Xpf.Core.SimpleButton.OnClick()
в System.Windows.Controls.Primitives.ButtonBase.OnAccessKey(AccessKeyEventArgs e)
в System.Windows.Input.AccessKeyManager.ProcessKey(List`1 targets, String key, Boolean existsElsewhere, Boolean userInitiated)
в System.Windows.Input.AccessKeyManager.ProcessKeyForSender(Object sender, String key, Boolean existsElsewhere, Boolean userInitiated)
в System.Windows.Input.AccessKeyManager.OnKeyDown(KeyEventArgs e)
в System.Windows.Input.AccessKeyManager.PostProcessInput(Object sender, ProcessInputEventArgs e)
в System.Windows.Input.InputManager.RaiseProcessInputEventHandlers(ProcessInputEventHandler postProcessInput, ProcessInputEventArgs processInputEventArgs)
в System.Windows.Input.InputManager.ProcessStagingArea()
в System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
в System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
в System.Windows.Interop.HwndKeyboardInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawKeyboardActions actions, Int32 scanCode, Boolean isExtendedKey, Boolean isSystemKey, Int32 virtualKey)
в System.Windows.Interop.HwndKeyboardInputProvider.ProcessKeyAction(MSG& msg, Boolean& handled)
в System.Windows.Interop.HwndSource.CriticalTranslateAccelerator(MSG& msg, ModifierKeys modifiers)
в System.Windows.Interop.HwndSource.OnPreprocessMessage(Object param)
в System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
в System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

I get by Wireshark the attach packets:
http://ADO.Net:
0000 3c a8 2a 0a 87 7c 10 c3 7b 50 cd 97 08 00 45 00 <.*..|..{P....E.
0010 01 d4 6a d4 40 00 80 06 31 cf ac 10 03 28 ac 10 ..j.@...1....(..
0020 01 38 ce e6 0b ea 9c 45 0f 42 8e a7 de f6 50 18 .8.....E.B....P.
0030 20 00 e1 d1 00 00 00 00 00 01 00 00 00 13 00 00 ...............
0040 00 03 00 00 00 01 00 00 00 06 72 65 73 5f 30 30 ..........res_00
0050 00 00 00 00 00 04 00 00 01 35 09 09 64 65 76 65 .........5..deve
0060 6c 6f 70 65 72 08 03 53 72 70 0a 03 53 72 70 07 loper..Srp..Srp.
0070 ff 00 43 30 31 34 34 37 33 46 44 46 45 37 31 38 ..C014473FDFE718
0080 45 34 31 30 30 46 32 39 46 43 33 36 44 33 43 43 E4100F29FC36D3CC
0090 37 31 44 45 32 44 37 30 46 45 39 42 42 32 42 36 71DE2D70FE9BB2B6
00a0 39 31 41 43 30 31 31 37 44 30 36 46 32 34 45 36 91AC0117D06F24E6
00b0 45 36 35 38 37 34 39 39 45 38 39 42 36 34 44 41 E6587499E89B64DA
00c0 41 38 42 37 38 37 35 37 41 39 45 36 33 34 31 39 A8B78757A9E63419
00d0 37 32 36 36 33 41 31 38 42 43 41 46 39 38 34 46 72663A18BCAF984F
00e0 37 30 43 31 38 31 31 43 34 43 45 42 46 34 37 35 70C1811C4CEBF475
00f0 42 38 35 45 35 44 34 46 39 42 45 41 45 41 44 38 B85E5D4F9BEAEAD8
0100 44 30 36 37 38 34 39 32 35 38 41 38 37 46 31 35 D067849258A87F15
0110 41 33 41 43 36 32 39 42 42 32 37 36 32 30 33 31 A3AC629BB2762031
0120 43 33 31 41 33 33 30 35 35 36 32 31 37 46 43 45 C31A330556217FCE
0130 31 35 33 43 32 46 39 35 38 39 41 39 44 30 37 33 153C2F9589A9D073
0140 43 41 42 33 41 31 33 45 33 41 30 44 33 33 31 37 CAB3A13E3A0D3317
0150 44 44 33 36 42 44 41 43 46 31 30 36 39 30 43 46 DD36BDACF10690CF
0160 38 46 31 32 32 33 34 33 45 45 36 43 42 32 45 33 8F122343EE6CB2E3
0170 07 03 01 35 45 0b 04 00 00 00 00 01 03 6c 73 76 ...5E........lsv
0180 04 0b 53 54 50 53 42 34 30 32 2d 31 36 06 00 00 ..STPSB402-16...
0190 00 00 00 00 00 0a 00 00 00 01 00 00 00 02 00 00 ................
01a0 00 03 00 00 00 00 00 00 80 0b 00 00 00 01 00 00 ................
01b0 00 02 00 00 00 05 00 00 00 01 00 00 80 0c 00 00 ................
01c0 00 01 00 00 00 02 00 00 00 05 00 00 00 02 00 00 ................
01d0 80 0d 00 00 00 01 00 00 00 02 00 00 00 05 00 00 ................
01e0 00 03 ..

IBExpert:
0000 3c a8 2a 0a 87 7c 10 c3 7b 50 cd 97 08 00 45 00 <.*..|..{P....E.
0010 01 fc 7b 69 40 00 80 06 21 12 ac 10 03 28 ac 10 ..{i@...!....(..
0020 01 38 d0 0f 0b ea 67 e9 88 5a 3a 5a 98 68 50 18 .8....g..Z:Z.hP.
0030 01 00 0d 24 00 00 00 00 00 01 00 00 00 13 00 00 ...$............
0040 00 03 00 00 00 1d 00 00 00 06 72 65 73 5f 30 30 ..........res_00
0050 00 00 00 00 00 05 00 00 01 49 09 06 53 59 53 44 .........I..SYSD
0060 42 41 08 03 53 72 70 0a 1a 53 72 70 2c 20 57 69 BA..Srp..Srp, Wi
0070 6e 5f 53 73 70 69 2c 20 4c 65 67 61 63 79 5f 41 n_Sspi, Legacy_A
0080 75 74 68 07 ff 00 39 44 42 35 31 39 35 36 44 31 uth...9DB51956D1
0090 42 30 38 46 32 46 36 37 44 31 31 34 46 35 33 33 B08F2F67D114F533
00a0 41 34 34 36 32 32 33 30 37 32 45 30 44 30 43 46 A446223072E0D0CF
00b0 31 41 35 43 34 35 39 34 44 37 33 46 35 36 45 38 1A5C4594D73F56E8
00c0 30 33 38 35 46 45 35 44 42 42 39 43 46 44 32 36 0385FE5DBB9CFD26
00d0 39 36 38 39 39 38 41 31 39 38 37 42 33 33 45 41 968998A1987B33EA
00e0 43 35 34 44 43 45 31 46 31 31 30 37 30 36 37 32 C54DCE1F11070672
00f0 44 45 38 42 34 46 33 32 36 41 35 34 39 36 38 46 DE8B4F326A54968F
0100 32 43 34 44 30 30 43 35 36 34 46 46 34 32 33 31 2C4D00C564FF4231
0110 41 30 42 32 39 41 46 38 46 46 39 37 41 36 37 34 A0B29AF8FF97A674
0120 31 39 34 38 44 31 36 45 37 37 31 33 39 32 38 33 1948D16E77139283
0130 44 42 30 42 44 46 32 31 42 30 36 32 33 43 39 36 DB0BDF21B0623C96
0140 36 33 31 39 42 42 33 31 31 32 36 34 42 36 34 33 6319BB311264B643
0150 30 39 35 44 34 43 37 34 37 32 31 46 44 38 31 34 095D4C74721FD814
0160 43 33 34 33 41 33 35 45 30 35 33 43 30 36 46 31 C343A35E053C06F1
0170 37 38 34 46 36 46 45 39 36 30 36 36 37 35 41 43 784F6FE9606675AC
0180 37 37 43 31 07 03 01 44 34 0b 04 01 00 00 00 01 77C1...D4.......
0190 03 6c 73 76 04 0b 73 74 70 73 62 34 30 32 2d 31 .lsv..stpsb402-1
01a0 36 06 00 00 00 00 00 00 00 0a 00 00 00 01 00 00 6...............
01b0 00 00 00 00 00 05 00 00 00 02 ff ff 80 0b 00 00 ................
01c0 00 01 00 00 00 00 00 00 00 05 00 00 00 04 ff ff ................
01d0 80 0c 00 00 00 01 00 00 00 00 00 00 00 05 00 00 ................
01e0 00 06 ff ff 80 0d 00 00 00 01 00 00 00 00 00 00 ................
01f0 00 05 00 00 00 08 ff ff 80 0e 00 00 00 01 00 00 ................
0200 00 00 00 00 00 05 00 00 00 0a ..........

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

What is the exact Firebird version, iirc from problems with Jaybird, either Firebird 3.0.0 or 3.0.1 didn't handle some combinations gracefully (should be fixed in Firebird 3.0.2). Also it might be better to just include Srp in the AuthServer anyway.

@firebird-automations
Copy link
Author

Commented by: Sergey (luzums)

FB version: LI-V3.0.3.32721 Firebird 3.0 HQbird.
By Wireshark: FirebirdSql.Data.FirebirdClient send only SRP avalible method in connected request. How to enable support connect in Legacy_Auth mode?

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

I looked at the sources: The problem is that for Firebird 3 and higher, the provider only supports Srp, and not Legacy Auth. You either need a version before 5.0, or create a Srp user.

@firebird-automations
Copy link
Author

Modified by: @cincuranet

Link: This issue is duplicated by DNET872 [ DNET872 ]

@firebird-automations
Copy link
Author

Commented by: Russell Rose (russ3ell)

Will the provider ever provide support for Legacy Auth?

@firebird-automations
Copy link
Author

Commented by: @cincuranet

At the moment it's not high on priority list, given the legacy auth is going to be deprecated anyway and given one can use FirebirdClient versions <6 where the SRP is not even tried. But I'm open to contributions.

@ilyacoder
Copy link

Can increase priority? FirebirdClient version <5 (where Legacy_Auth is working) does not work with .net core

@cincuranet
Copy link
Member

What I said in #722 (comment) still applies.

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

3 participants