hyb
2025-11-07 cadac0a99d87c53805a07f3b4ca7fd11e524fe4a
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
Ë
Wñúh¾$ãó^—dZddlZddlZddlmZddlmZddlmZm    Z    m
Z
m Z ddl m Z ddlmZerdd    lmZ    dd
lmZdd lmZmZdd lmZdd lmZ    ddlmZmZddl m!Z!dZ"dZ#dZ$dZ%dZ&Gd„de!«Z'y#e$re j8d«d‚wxYw#e$re j8d«d‚wxYw)zOCI Authentication Plugin.éN)Ú    b64encode)ÚPath)Ú TYPE_CHECKINGÚAnyÚDictÚOptional)Úerrors)Úloggeré)Ú MySQLSocket)ÚUnsupportedAlgorithm)ÚhashesÚ serialization)Úpadding)ÚPRIVATE_KEY_TYPESz'Package 'cryptography' is not installed)ÚconfigÚ
exceptionszGPackage 'oci' (Oracle Cloud Infrastructure Python SDK) is not installedé)ÚMySQLAuthPluginÚMySQLOCIAuthPlugini(z0Ephemeral security token is too large (10KB max)zGEphemeral security token file ('security_token_file') could not be readzKOCI configuration file does not contain a 'fingerprint' or 'key_file' entrycó—eZdZUdZdZeed<dZeed<e    jZ eed<e de deeefd    efd
„«Ze d ed    efd „«Zd    eeeffd „Zed    efd„«Zed    efd„«Zde ded    ee fd„Zddde ded    e fd„Zy)rz2Implement the MySQL OCI IAM authentication plugin.NÚcontextÚDEFAULTÚoci_config_profileÚoci_config_fileÚ    signatureÚ
oci_configÚreturncó²—t|«}|d|j«dœ}|jd«r^    t|d«}|j    «j
t kDrtjt«‚|jd¬«|d<tj|d¬    «S#ttf$r}tjt«|‚d}~wwxYw)
a=Prepare client's authentication response
 
        Prepares client's authentication response in JSON format
        Args:
            signature (bytes):  server's nonce to be signed by client.
            oci_config (dict): OCI configuration object.
 
        Returns:
            str: JSON string with the following format:
                 {"fingerprint": str, "signature": str, "token": base64.base64.base64}
 
        Raises:
            ProgrammingError: If the ephemeral security token file can't be open or the
                              token is too large.
        Ú fingerprint)r rÚsecurity_token_filezutf-8)ÚencodingÚtokenN)ú,ú:)Ú
separators)rÚdecodeÚgetrÚstatÚst_sizeÚOCI_SECURITY_TOKEN_MAX_SIZEr    ÚProgrammingErrorÚOCI_SECURITY_TOKEN_TOO_LARGEÚ    read_textÚOSErrorÚ UnicodeErrorÚ%OCI_SECURITY_TOKEN_FILE_NOT_AVAILABLEÚjsonÚdumps)rrÚ signature_64Ú auth_responser!Úerrs      úhH:\Change_password\venv_build\Lib\site-packages\mysql/connector/aio/plugins/authentication_oci_client.pyÚ_prepare_auth_responsez)MySQLOCIAuthPlugin._prepare_auth_responseQsԀô"! Ó+ˆ à% mÑ4Ø%×,Ñ,Ó.ñ
ˆ ð >‰>Ð/Ô 0ð     Ü&*¨:Ð6KÑ+LÓ&MÐ#à&×+Ñ+Ó-×5Ñ5Ô8SÒSÜ ×1Ñ1Ô2NÓOÐOØ)<×)FÑ)FÐPWÐ)FÓ)X ˜gÑ&ô
z‰z˜-°JÔ?Ð?øô    œ\Ð*ò Ü×-Ñ-Ü9óàðûð ús´AB(Â(CÂ7CÃCÚkey_pathcóH—    ttjj|«d«5}t    j
|j «d¬«}ddd«|S#1swYSxYw#ttttf$r }tjd|›d|›«‚d}~wwxYw)z+Get the private_key form the given locationÚrbN)Úpasswordz2An error occurred while reading the API_KEY from "z": ) ÚopenÚosÚpathÚ
expanduserrÚload_pem_private_keyÚreadÚ    TypeErrorr/Ú
ValueErrorr r    r,)r9Úkey_fileÚ private_keyr6s    r7Ú_get_private_keyz#MySQLOCIAuthPlugin._get_private_keyys¡€ð
    Ü”b—g‘g×(Ñ(¨Ó2°DÓ9ð ¸XÜ+×@Ñ@Ø—M‘M“OØ!ô ÷ ðÐ÷ ðÐûô œ7¤JÔ0DÐEò    Ü×)Ñ)ðؐ:˜S  ð'óð ûð    ús4‚)A(«&AÁA(ÁA%Á A(Á%A(Á(B!ÂBÂB!cóž—g}d„d„dœ}i}    tj|jxstj|jxsd«}|j «D]+\}}    ||r |||«s|j d|›d«Œ-    |r%tj d    |j›d
|›«‚|S#t$r|j d|›«YŒwwxYw#tjtjtjtjtjf$r$}|j t|««Yd}~Œ»d}~wwxYw) z=Get a valid OCI config from the given configuration file pathcó—t|«dkDS)Né )Úlen©Úxs r7ú<lambda>z:MySQLOCIAuthPlugin._get_valid_oci_config.<locals>.<lambda>Žs€¤c¨!£f¨r¡k€ócóz—tjjtjj|««S)N)r>r?Úexistsr@rLs r7rNz:MySQLOCIAuthPlugin._get_valid_oci_config.<locals>.<lambda>s"€¤2§7¡7§>¡>´"·'±'×2DÑ2DÀQÓ2GÓ#H€rO)r rErz Parameter "z " is invalidzDoes not contain parameter NzInvalid oci-config-file: z. Errors found: )rÚ    from_filerÚDEFAULT_LOCATIONrÚitemsÚappendÚKeyErrorrÚConfigFileNotFoundÚ InvalidConfigÚInvalidKeyFilePathÚInvalidPrivateKeyÚProfileNotFoundÚstrr    r,)ÚselfÚ
error_listÚreq_keysrÚreq_keyÚ    req_valuer6s       r7Ú_get_valid_oci_configz(MySQLOCIAuthPlugin._get_valid_oci_configŠsa€àˆ
á1ÙHñ
ˆð
&(ˆ
ð    (ä×)Ñ)Ø×$Ñ$Ò?¬×(?Ñ(?Ø×'Ñ'Ò4¨9óˆJð'/§n¡nÓ&6ò OÑ"˜ðOà! 'Ò*±9¸ZÈÑ=PÔ3QØ"×)Ñ)¨K¸°yÀ Ð*MÔNøñ     Oñ" Ü×)Ñ)Ø+¨D×,@Ñ,@Ð+AðB!Ø!+  ð.óð ð
Ðøô% òOØ×%Ñ%Ð(CÀGÀ9Ð&MÖNðOûô × )Ñ )Ü × $Ñ $Ü × )Ñ )Ü × (Ñ (Ü × &Ñ &ð 
ò    (ð × Ñ œc #›h× 'Ñ 'ûð    (ús=ACÁ$%B5    CÂ5CÃCÃCÃCÃAE Ä(EÅE có—y)zPlugin official name.Úauthentication_oci_client©©r]s r7ÚnamezMySQLOCIAuthPlugin.name²s€ð+rOcó—y)z'Signals whether or not SSL is required.Frerfs r7Ú requires_sslzMySQLOCIAuthPlugin.requires_ssl·s€ðrOÚ    auth_dataÚkwargsc óh—tjd|t|««|j«}|j    |d«}|j |t j«tj««}|j||«}tjd|«|j«S)z-Prepare authentication string for the server.zserver nonce: %s, len %drEzauthentication response: %s) r
ÚdebugrKrbrGÚsignrÚPKCS1v15rÚSHA256r8Úencode)r]rjrkrrFrr5s       r7r5z MySQLOCIAuthPlugin.auth_response¼s€ä ‰ Ð/°¼CÀ    »NÔKà×/Ñ/Ó1ˆ
à×+Ñ+¨J°zÑ,BÓCˆ Ø×$Ñ$ Y´×0@Ñ0@Ó0BÄFÇMÁMÃOÓTˆ    à×3Ñ3°I¸zÓJˆ ܏ ‰ Ð2°MÔBØ×#Ñ#Ó%Ð%rOÚsockr c‹óK—|jdd«|_|jdtj«|_t j d|j«|j|fi|¤Ž}|€tjd«‚t j d|t|««|j|«ƒd{–—†|j«ƒd{–—†}t j d|«t|«S7Œ=7Œ'­w)    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.
        rrrz!# oci configuration file path: %sNzGot a NULL auth responsez# request: %s size: %sz# server response packet: %s)r(rrrSrr
rmr5r    ÚInterfaceErrorrKÚwriterBÚbytes)r]rrrjrkÚresponseÚpackets      r7Úauth_switch_responsez'MySQLOCIAuthPlugin.auth_switch_responseÉsÕèø€ð" &Ÿz™zÐ*;¸YÓGˆÔØ"(§*¡*Ø  ¤&×"9Ñ"9ó#
ˆÔô     ‰ Ð8¸$×:NÑ:NÔOà%4×%Ñ% iÑ:°6Ñ:ˆØ Ð Ü×'Ñ'Ð(BÓCÐ Cä ‰ Ð-¨x¼¸X»ÔG؏j‰j˜Ó"×"Ð"à—y‘y“{×"ˆÜ ‰ Ð3°VÔ<äV‹}Ðð     #øà"ús$‚B;C?Â=C;Â>C?ÃC=Ã&C?Ã=C?)Ú__name__Ú
__module__Ú __qualname__Ú__doc__rrÚ__annotations__rr\rrSrÚ staticmethodrvrr8rrGrbÚpropertyrgÚboolrirr5ryrerOr7rrJs…Ù<à€GˆSÓØ'ИÓ'Ø!×2Ñ2€OSÓ2àð%@¨%ð%@¸TÀ#ÀsÀ(¹^ð%@ÐPSò%@óð%@ðNð 3ðÐ+<òóðð & t¨C°¨H¡~ó&ðPð+cò+óð+ðð˜dòóðð & uð &¸ð &ÀÈÁó &ð!Ø!ð!Ø.3ð!Ø?Bð!à    ô!rO)(r}r2r>Úbase64rÚpathlibrÚtypingrrrrÚmysql.connectorr    Úmysql.connector.loggerr
Únetworkr Úcryptography.exceptionsr Úcryptography.hazmat.primitivesrrÚ)cryptography.hazmat.primitives.asymmetricrÚ/cryptography.hazmat.primitives.asymmetric.typesrÚ ImportErrorr,ÚocirrÚrÚAUTHENTICATION_PLUGIN_CLASSr+r-r1ÚOCI_PROFILE_MISSING_PROPERTIESrrerOr7ú<module>r‘sÏðñ>!ã Û    åÝß5Ó5å"Ý)áÝ%ðWÝ<ßDÝAÝQðß&õ à2ÐØ'ÐØQÐàMð&ðRðô
`˜õ`øð/òWØ
!ˆ&×
!Ð"KÓ
LÐRVÐVðWûð
òØ
!ˆ&×
!ØQó à ððús¸A7ÁBÁ7BÂB,