6
0
mirror of https://github.com/FirebirdSQL/firebird-qa.git synced 2025-01-23 14:03:06 +01:00
firebird-qa/tests/bugs/core_5495_test.py

55 lines
1.6 KiB
Python
Raw Normal View History

2021-04-26 20:07:00 +02:00
#coding:utf-8
2022-01-25 22:55:48 +01:00
"""
ID: issue-5764
ISSUE: 5764
TITLE: New users or changed passwords in legacy authentication do not work in Firebird 4
DESCRIPTION:
Used config:
AuthServer = Legacy_Auth,Srp
AuthClient = Legacy_Auth,Srp,Win_Sspi
WireCrypt = Disabled
UserManager = Srp, Legacy_UserManager
NOTES:
[3.11.2021] pcisar
This test fails with 4.0, even with specified config
Although user is created, the connect as user tmp$c5495 fails (unknown user)
JIRA: CORE-5495
FBTEST: bugs.core_5495
2022-01-25 22:55:48 +01:00
"""
2021-04-26 20:07:00 +02:00
2022-01-25 22:55:48 +01:00
import pytest
from firebird.qa import *
2021-04-26 20:07:00 +02:00
2022-01-25 22:55:48 +01:00
db = db_factory()
2021-04-26 20:07:00 +02:00
2022-01-25 22:55:48 +01:00
test_user = user_factory('db', name='tmp$c5495', password='123', plugin='Legacy_UserManager')
2021-04-26 20:07:00 +02:00
2022-01-25 22:55:48 +01:00
test_script = """
2021-04-26 20:07:00 +02:00
set list on;
set bail on;
connect '$(DSN)' user tmp$c5495 password '123';
2021-11-09 11:01:26 +01:00
--select mon$user,mon$remote_address,mon$remote_protocol,mon$client_version,mon$remote_version,mon$auth_method from mon$attachments
select mon$user,mon$remote_protocol,mon$auth_method from mon$attachments
2021-04-26 20:07:00 +02:00
where mon$attachment_id=current_connection;
commit;
connect '$(DSN)' user SYSDBA password 'masterkey';
commit;
2021-12-19 22:25:36 +01:00
"""
2021-04-26 20:07:00 +02:00
2022-02-09 20:47:40 +01:00
act = isql_act('db', test_script, substitutions=[('TCPv.*', 'TCP'),
('Commit current transaction \\(y/n\\)\\?', '')])
2021-04-26 20:07:00 +02:00
2022-01-25 22:55:48 +01:00
expected_stdout = """
2021-04-26 20:07:00 +02:00
MON$USER TMP$C5495
MON$REMOTE_PROTOCOL TCP
MON$AUTH_METHOD Legacy_Auth
2021-12-19 22:25:36 +01:00
"""
2021-04-26 20:07:00 +02:00
@pytest.mark.version('>=4.0')
2022-01-25 22:55:48 +01:00
def test_1(act: Action, test_user: User):
act.expected_stdout = expected_stdout
act.execute()
assert act.clean_stdout == act.clean_expected_stdout
2021-04-26 20:07:00 +02:00