/var/opt/nydus/ops/mysql/connector/plugins/__pycache__
NameSizeModeActions
authentication_kerberos_client.cpython-312.pyc229970644editdlrm
authentication_ldap_sasl_client.cpython-312.pyc277530644editdlrm
authentication_oci_client.cpython-312.pyc102390644editdlrm
authentication_openid_connect_client.cpython-312.pyc71430644editdlrm
authentication_webauthn_client.cpython-312.pyc110030644editdlrm
caching_sha2_password.cpython-312.pyc60650644editdlrm
mysql_clear_password.cpython-312.pyc37420644editdlrm
mysql_native_password.cpython-312.pyc45940644editdlrm
sha256_password.cpython-312.pyc38860644editdlrm
__init__.cpython-312.pyc60470644editdlrm
Edit: /var/opt/nydus/ops/mysql/connector/plugins/__pycache__/caching_sha2_password.cpython-312.pyc (6065B)
N j~dZddlZddlmZddlmZmZmZddlm Z ddl m Z dd l m Z erdd l mZd ZGd d e Zy) z,Caching SHA2 Password Authentication Plugin.N)sha256) TYPE_CHECKINGAnyOptional)InterfaceError)logger)MySQLAuthPlugin) MySQLSocket"MySQLCachingSHA2PasswordAuthPluginceZdZUdZdZeed<dedefdZe de fdZ e de fdZ ded edeefd Zd d ded edefd Zd d ded edefdZy)r zClass implementing the MySQL caching_sha2_password authentication plugin Note that encrypting using RSA is not supported since the Python Standard Library does not provide this OpenSSL functionality. perform_full_authentication auth_datareturnc|s td|jsyt|jjj }t}|j t|j |j ||j }t ||Dcgc] \}}||z  }}}tjdg|}|Scc}}w)zReturn a scramble of the password using a Nonce sent by the server. The scramble is of the form: XOR(SHA2(password), SHA2(SHA2(SHA2(password)), Nonce)) z"Missing authentication data (seed)32B) r _passwordrencodedigestupdatezipstructpack) selfrhash1hash2 hash2_digesth1h2xoredhash3s ^/opt/nydus/tmp/pip-target-a90h98xg/lib/python/mysql/connector/plugins/caching_sha2_password.py _scramblez,MySQLCachingSHA2PasswordAuthPlugin._scramble7s !EF F~~t~~,,./668 VE]))+, Y||~ ),UL)AB)AXb"b)AB E*E* Cs.Ccy)zPlugin official name.caching_sha2_passwordrs r%namez'MySQLCachingSHA2PasswordAuthPlugin.nameMs'rcy)z'Signals whether or not SSL is required.Fr)r*s r% requires_sslz/MySQLCachingSHA2PasswordAuthPlugin.requires_sslRsrkwargsc |syt|dkDr|j|S|d|jk(r|jj dzSy)aMake the client's authorization response. Args: auth_data: Authorization data. kwargs: Custom configuration to be passed to the auth plugin when invoked. The parameters defined here will override the ones defined in the auth plugin itself. Returns: packet: Client's authorization response. Nr r)lenr&rrr)rrr.s r% auth_responsez0MySQLCachingSHA2PasswordAuthPlugin.auth_responseWsR y>A >>), , Q<4;; ;>>((*W4 4rsockr c |j|fi|}|r|j|t|jS)aEHandles server's `auth more data` response. Args: sock: Pointer to the socket connection. auth_data: Authentication method data (from a packet representing an `auth more data` response). kwargs: Custom configuration to be passed to the auth plugin when invoked. The parameters defined here will override the ones defined in the auth plugin itself. Returns: packet: Last server's response after back-and-forth communication. )r2sendbytesrecv)rr3rr.responses r%auth_more_responsez5MySQLCachingSHA2PasswordAuthPlugin.auth_more_responsems;"&4%%i:6:  IIh TYY[!!rc |j|fi|}| tdtjd|t ||j |t |j}tjd||S)aSHandles server's `auth switch request` response. Args: sock: Pointer to the socket connection. auth_data: Plugin provided data (extracted from a packet representing an `auth switch request` response). kwargs: Custom configuration to be passed to the auth plugin when invoked. The parameters defined here will override the ones defined in the auth plugin itself. Returns: packet: Last server's response after back-and-forth communication. zGot a NULL auth responsez# request: %s size: %sz# server response packet: %s)r2rr debugr1r5r6r7)rr3rr.r8pkts r%auth_switch_responsez7MySQLCachingSHA2PasswordAuthPlugin.auth_switch_responsesr"&4%%i:6:   !;< < -xXG (DIIK  3S9 rN)__name__ __module__ __qualname____doc__rint__annotations__r6r&propertystrr+boolr-rrr2r9r=r)rr%r r .s ()(5U,'c''du,"!".3"?B" ".!.3?B r)rArhashlibrtypingrrrerrorsrr r networkr AUTHENTICATION_PLUGIN_CLASSr r)rr%rMs9:3 //#%Bqqr