hyb
2026-01-07 c7f60dc7e9a36596f0e0d1787bd0cca4e9b57bcb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
Ë
Wñúhµ*ãó*—dZddlmZmZmZmZddlmZmZddl    m    Z    ddlm
Z
erddl m Z     dd    l mZdd
lmZmZdd lmZdd lmZ    ddlmZdZdZGd„de«ZGd„de
«Z y#e$rZej2d «e‚dZ[wwxYw#e$rdZYŒBwxYw)zWebAuthn Authentication Plugin.é)Ú TYPE_CHECKINGÚAnyÚCallableÚOptionalé)ÚerrorsÚutils)Úloggeré)ÚMySQLAuthPlugin)Ú MySQLSocket)Ú
dump_bytes)Ú Fido2ClientÚUserInteraction)Ú CtapHidDevice)Ú!PublicKeyCredentialRequestOptionszxModule fido2 is required for WebAuthn authentication mechanism but was not found. Unable to authenticate with the serverN)ÚCtapPcscDeviceTFÚMySQLWebAuthnAuthPlugincó,—eZdZdZddeefd„Zdd„Zy)ÚClientInteractionz(Provides user interaction to the Client.NÚcallbackcó —||_d|_y)NzTPlease insert FIDO device and perform gesture action for authentication to complete.)rÚmsg)Úselfrs  úiH:\Change_password\venv_build\Lib\site-packages\mysql/connector/plugins/authentication_webauthn_client.pyÚ__init__zClientInteraction.__init__Bs€Ø ˆŒ ð ð     ócó~—|j€t|j«y|j|j«y)z=Prompt message for the user interaction with the FIDO device.N)rÚprintr©rs rÚ    prompt_upzClientInteraction.prompt_upIs'€à =‰=Ð  Ü $—(‘(Oà M‰M˜$Ÿ(™(Õ #r©N)ÚreturnN)Ú__name__Ú
__module__Ú __qualname__Ú__doc__rrrr!©rrrr?s„Ù2ñ
 ¨(Ñ!3ó
ô$rrcóà—eZdZUdZdZeeed<dZee    ed<ddgdœZ
e ed<e de fd„«Ze defd    „«Z    dd
eedefd „Zd ed edeefd„Zddd ed edefd„Zddd ed edefd„Zy)rz<Class implementing the MySQL WebAuthn authentication plugin.NÚclientr)ÚrpIdÚ    challengeÚallowCredentialsÚoptionsr#có—y)zPlugin official name.Úauthentication_webauthn_clientr(r s rÚnamezMySQLWebAuthnAuthPlugin.nameXs€ð0rcó—y)z'Signals whether or not SSL is required.Fr(r s rÚ requires_sslz$MySQLWebAuthnAuthPlugin.requires_ssl]s€ðrÚ credential_idcó—|j€tjd«‚||ddœg|jd<|jj    t j |j««}t|j««}d}tjd«}|tj|«z }t|«D]Œ}|j|«}t|j«}|j}    |tjt|««z }||z }|tjt|    ««z }||    z }|j }ŒŽ|tjt|««z }||z }t#j$d|«|S)zôGet assertion from authenticator and return the response.
 
        Args:
            credential_id (Optional[bytearray]): The credential ID.
 
        Returns:
            bytearray: The response packet with the data from the assertion.
        zNo WebAuthn client foundz
public-key)ÚidÚtyper-rrz&WebAuthn - payload response packet: %s)r*rÚInterfaceErrorr.Ú get_assertionrÚ    from_dictÚlenÚget_assertionsr    Úlc_intÚrangeÚ get_responseÚcbor_dump_bytesÚauthenticator_dataÚ    signatureÚ client_datar
Údebug)
rr4Ú    assertionÚnumber_of_assertionsÚclient_data_jsonÚpacketÚiÚassertion_responserArBs
          rÚget_assertion_responsez.MySQLWebAuthnAuthPlugin.get_assertion_responsebs€ð ;‰;Ð Ü×'Ñ'Ð(BÓCÐ Cà Ð $ð
(Ø(ñð0ˆDL‰LÐ+Ñ ,ð—K‘K×-Ñ-Ü -× 7Ñ 7¸¿ ¹ Ó Eó
ˆ    ô # 9×#;Ñ#;Ó#=Ó>ÐØÐô—‘˜a“ˆØ”%—,‘,Ð3Ó4Ñ4ˆôÐ+Ó,ò    >ˆAØ!*×!7Ñ!7¸Ó!:Ð ô"1Ð1C×1VÑ1VÓ!WÐ ð+×4Ñ4ˆIà ”e—l‘l¤3Ð'9Ó#:Ó;Ñ ;ˆFØ Ð(Ñ (ˆFØ ”e—l‘l¤3 y£>Ó2Ñ 2ˆFØ iÑ ˆFð 2×=Ñ=Ñ ð    >ð"    ”%—,‘,œsÐ#3Ó4Ó5Ñ5ˆØÐ"Ñ"ˆä ‰ Ð=¸vÔF؈ rÚ    auth_dataÚkwargsc óÈ—    tj|d«\}}tj|«\}}||jd<|j    «|jd<t j d|«t j d|jd«t j d|jd«ttj«d«}|t j d    «n$trttj«d«}|€tjd
«‚t|d |jd›t!|j"«¬ «|_|j$j&jj)d «st j d«yt j d«y#t$r}tjd«|‚d}~wwxYw)aEFind authenticator device and check if supports resident keys.
 
        It also creates a Fido2Client using the relying party ID from the server.
 
        Raises:
            InterfaceError: When the FIDO device is not found.
 
        Returns:
            bytes: 2 if the authenticator supports resident keys else 1.
        r r,r+zWebAuthn - capability: %dzWebAuthn - challenge: %szWebAuthn - relying party id: %sz2Unable to parse MySQL WebAuthn authentication dataNzWebAuthn - Use USB HID channelzNo FIDO device foundzhttps://)Úuser_interactionÚrkz6WebAuthn - Authenticator doesn't support resident keysó1z<WebAuthn - Authenticator with support for resident key foundó2)r    Úread_intÚread_lc_string_listr.Údecoder
rDÚ
ValueErrorrr8ÚnextrÚ list_devicesÚCTAP_PCSC_DEVICE_AVAILABLErrrrr*ÚinfoÚget)    rrLrMÚpacketsÚ
capabilityr,Úrp_idÚerrÚdevices             rÚ auth_responsez%MySQLWebAuthnAuthPlugin.auth_response¨s‡€ð     Ü"'§.¡.°¸AÓ">Ñ ˆGZÜ$×8Ñ8¸ÓAÑ ˆIuØ(1ˆDL‰L˜Ñ %Ø#(§<¡<£>ˆDL‰L˜Ñ  Ü L‰LÐ4°jÔ AÜ L‰LÐ3°T·\±\À+Ñ5NÔ OÜ L‰LÐ:¸D¿L¹LÈÑ<PÔ Qô”m×0Ñ0Ó2°DÓ9ˆØ Ð Ü L‰LÐ9Õ :Ý 'Üœ.×5Ñ5Ó7¸Ó>ˆFà ˆ>Ü×'Ñ'Ð(>Ó?Ð ?ô"Ø Øt—|‘| FÑ+Ð,Ð -Ü.¨t¯}©}Ó=ô
ˆŒ ð {‰{×Ñ×'Ñ'×+Ñ+¨DÔ1Ü L‰LÐQÔ RØä ‰ ÐSÔTØøô7ò    Ü×'Ñ'ØDóàð ûð    ús‚B9F=Æ=    G!ÇGÇG!Úsockr c ó—tj|«\}}|j|«}tjd|t |««|j |«t|j««}tjd|«|S)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.
        úWebAuthn - request: %s size: %sú%WebAuthn - server response packet: %s)    r    Úread_lc_stringrKr
rDr;ÚsendÚbytesÚrecv)rrbrLrMÚ_r4ÚresponseÚpkts        rÚauth_more_responsez*MySQLWebAuthnAuthPlugin.auth_more_responseØsn€ô"!×/Ñ/°    Ó:шˆ=à×.Ñ.¨}Ó=ˆä ‰ Ð6¸Ä#ÀhÃ-ÔPØ     ‰    (ÔäD—I‘I“KÓ ˆÜ ‰ Ð<¸cÔBàˆ
rc ón—|jd«xs|jd«}t|t«rtj|«n||_|j |«}d}|dk(r[tjd«|jtjt|«««t|j««S|j|«}tjd|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.
        Úwebauthn_callbackÚ fido_callbackNrQz WebAuthn - request credential_idrdre)r[Ú
isinstanceÚstrr    Ú import_objectrrar
rDrgr=ÚintrhrirKr;)rrbrLrMÚwebauth_callbackrkr4rls        rÚauth_switch_responsez,MySQLWebAuthnAuthPlugin.auth_switch_responseõsü€ð""Ÿ:™:Ð&9Ó:ò
¸f¿j¹jØ ó?
Ðô
Ð*¬CÔ0ô × Ñ Р0Ô 1à!ð     Œ ð ×%Ñ% iÓ0ˆØˆ à tÒ ä L‰LÐ;Ô <Ø I‰I”e—l‘l¤3 x£=Ó1Ô 2ô˜Ÿ™›Ó%Ð %à×.Ñ.¨}Ó=ˆä ‰ Ð6¸Ä#ÀhÃ-ÔPØ     ‰    (ÔäD—I‘I“KÓ ˆÜ ‰ Ð<¸cÔBàˆ
rr")r$r%r&r'r*rrÚ__annotations__rrr.ÚdictÚpropertyrrr1Úboolr3Ú    bytearrayrhrKrrarmrvr(rrrrQsô…ÙFà$(€FˆH[Ñ !Ó(Ø#'€HˆhxÑ Ó'Ø!°È"ÑM€GˆTÓMà ð0cò0óð0ðð˜dòóðð
48ñDØ% iÑ0ðDà    óDðL. uð.¸ð.ÀÈÁó.ð`Ø!ðØ.3ðØ?Bðà    óð:-Ø!ð-Ø.3ð-Ø?Bð-à    ô-r)!r'ÚtypingrrrrÚrr    r
r Únetworkr Ú
fido2.cborrr@Ú fido2.clientrrÚ    fido2.hidrÚfido2.webauthnrÚ ImportErrorÚ
import_errÚProgrammingErrorÚ
fido2.pcscrrYÚModuleNotFoundErrorÚAUTHENTICATION_PLUGIN_CLASSrrr(rrú<module>r‰sªðñ:&÷:Ó9çÝÝáÝ%ð    Ý8ß9Ý'Ý@ð'Ý)à!%Ðð
8Ðô$˜ô$ô$Q˜oõQøðGòØ
!ˆ&×
!ð    <ó ð ðûðûðò'Ø!&Òð'ús)¬A(ÁBÁ(BÁ-BÂBÂBÂB