nakagami / pyfirebirdsql

Python DBAPI module for FirebirdSQL
BSD 2-Clause "Simplified" License
71 stars 29 forks source link

Legacy auth: failure #73

Closed kai3341 closed 2 years ago

kai3341 commented 6 years ago

Hex dump difference: https://box.unet.by/f/15/15157_474.png Active window authorized successfully: it's python-fdb module Sorry, i don't know how to fix this. Maybe you can give me initial help and i shall continue

nakagami commented 6 years ago

Paste example code and teache me your python environment.

kai3341 commented 6 years ago

I forked django-fdb to work with firebirdsql driver:`

'energy_local': {    # Local backup. Works ok
    'ENGINE' :      'django-firebirdsql',
    'NAME' :        'energy',
    'USER' :        'energy',
    'PASSWORD' :    '*********',
    'HOST' :        '0.0.0.0',
    'PORT' :        '3050',
    'ASKUE' :       'mikron',    #XXX Non-django field
    'CONN_MAX_AGE':    None,
    'OPTIONS' : {
        'charset' : 'WIN1251',
    },
},

'a2000_local': {    # Local backup. Works ok
    'ENGINE' :      'django-firebirdsql',
    'NAME' :        'A2000',
    'USER' :        'A2000',
    'PASSWORD' :    '*********',
    'HOST' :        '0.0.0.0',
    'PORT' :        '3050',
    'ASKUE' :       'konus',    #XXX non-django field, database backend
    'CONN_MAX_AGE':    None,
    'OPTIONS' : {
        'charset' : 'WIN1251',
    },
},

'energy': {    # This database doesn't work.
    'ENGINE' :      'django-firebirdsql',
    'NAME' :        'energy',
    'USER' :        'energy',
    'PASSWORD' :    '*********',
    'HOST' :        'asu-205-5',
    'PORT' :        '3051',
    'ASKUE' :       'mikron',    #XXX non-django field, database backend
    'CONN_MAX_AGE':    None,
    'OPTIONS' : {
        'charset' : 'WIN1251',
    },
},

'a2000': {    # This database works ok
    'ENGINE' :      'django-firebirdsql',
    'NAME' :        'a2000',
    'USER' :        'a2000',
    'PASSWORD' :    '*********',
    'HOST' :        'asu-205-5',
    'PORT' :        '3052',
    'ASKUE' :       'konus',    #XXX non-django field, database backend
    'CONN_MAX_AGE':    None,
    'OPTIONS' : {
        'charset' : 'WIN1251',
    },
},`

All this connections works with python-fdb

nakagami commented 6 years ago

Umm, sorry I do'nt why about django.

But at least 2 option settings need in firebird.conf

AuthServer = Legacy_Auth WireCrypt = Disabled

kai3341 commented 6 years ago

Server side, right?

Don't worry about django: in my current project django is a configuration storage only :( I have to manage connections manually, and all django code is:

self.connection.connect() self.raw = self.connection.connection.cursor()

And next code is a regular python code

level420 commented 6 years ago

@kai3341 did you solve this? I'm running into the same problem: connecting to firebird 2 works, but not to firebird 3. The firebird server has configured legacy auth:

ServerMode = SuperClassic
WireCrypt = Disabled
WireCompression = false
AuthServer = Legacy_Auth, Srp, Win_Sspi
AuthClient = Legacy_Auth, Srp, Win_Sspi
UserManager = Legacy_UserManager, Srp
kai3341 commented 6 years ago

@level420 i didn't. I switched database driver back to fdb. Pure python driver implementatin is interesting for reading and understanding, but not on the production

nakagami commented 6 years ago

I want information about

nakagami commented 2 years ago

The reason is unknown, but close it.