403Webshell
Server IP : 178.105.222.151  /  Your IP : 216.73.216.38
Web Server : nginx/1.28.3
System : Linux MNK 7.0.0-15-generic #15-Ubuntu SMP PREEMPT_DYNAMIC Wed Apr 22 16:06:43 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.5.4
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/botocore/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/botocore/__pycache__/credentials.cpython-314.pyc
+
��id���^RIt^RIt^RIt^RIt^RIt^RIt^RIt^RIt^RIH	t	^RI
Ht^RIH
t
^RIt^RIHt^RIHtHt^RIt^RIt^RIHt^RIHtHt^R	IHt^R
IHtHtHtH t H!t!H"t"H#t#H$t$H%t%^RI&H't'^RI(H)t)H*t*^R
I+H,t,H-t-H.t.H/t/H0t0H1t1H2t2H3t3H4t4]Pj!]64t7]	!R.RFORGR7t8RHt9RIt:RJRlt;!RR4t<Rt=Rt>Rt?RKRlt@RtARtBRtC!RR4tD!RR]D4tE!RR]E4tF!R R!4tG!R"R#]G4tH!R$R%]H4tI!R&R']H4tJ!R(R)4tK!R*R+]K4tL!R,R-]K4tM!R.R/]K4tN!R0R1]K4tO!R2R3]K4tP!R4R5]K4tQ!R6R7]K4tR!R8R9]K4tS!R:R;]K4tT!R<R=4tU!R>R?]K4tV!R@RA4tW!RBRC]G4tX!RDRE]K4tYR#)L�N)�
namedtuple)�deepcopy)�sha1��parse)�tzlocal�tzutc)�UNSIGNED)�compat_shell_split�
total_seconds)�Config)	�ConfigNotFound�CredentialRetrievalError�InfiniteLoopConfigError�InvalidConfigError�MetadataRetrievalError�PartialCredentialsError�RefreshWithMFAUnsupportedError�UnauthorizedSSOTokenError�UnknownCredentialError)�SSOTokenProvider)�register_feature_id�register_feature_ids)	�	ArnParser�ContainerMetadataFetcher�FileWebIdentityTokenLoader�InstanceMetadataFetcher�
JSONFileCache�SSOTokenLoader�create_nested_client�parse_key_val_file�resolve_imds_endpoint_mode�ReadOnlyCredentials)�defaultsc�
a�SPR4;'gRpSPR4pSPR4pSP4PR4RJpRSPR4R\S4R\R	SPR	4/pVf/p\4p\
4p	\\VVSP4VR
7R7p
\SWR7p\V3R
l\SV4VV\W�V
.4VR7pVV.p
VPVVR7p\4\!4V	V
.pW�,V,pV'd'VP#V4\$P'R4\)VR7pV#)z�Create a default credential resolver.

This creates a pre-configured credential resolver
that includes the default lookup chain for
credentials.

�profile�default�metadata_service_timeout�metadata_service_num_attemptsN�ec2_metadata_service_endpoint�"ec2_metadata_service_endpoint_mode�ec2_credential_refresh_window�ec2_metadata_v1_disabled)�timeout�num_attempts�
user_agent�config)�iam_role_fetcher)�cache�region_namec�<�SP#�N)�full_config��sessions��6/usr/lib/python3/dist-packages/botocore/credentials.py�<lambda>�,create_credential_resolver.<locals>.<lambda>ss���G�/�/�)�load_config�client_creatorr3�profile_name�credential_sourcer�profile_provider_builder�r@�disable_env_varszWSkipping environment variable credential check because profile name was explicitly set.��	providers)�get_config_variable�instance_variables�getr"�!_DEFAULT_ADVISORY_REFRESH_TIMEOUT�EnvProvider�ContainerProvider�InstanceMetadataProviderrr0�ProfileProviderBuilder�AssumeRoleProvider�_get_client_creator�CanonicalNameCredentialSourcerrF�OriginalEC2Provider�BotoProvider�remove�logger�debug�CredentialResolver)r9r3r4r@�metadata_timeoutr/rD�imds_config�env_provider�container_provider�instance_metadata_providerrB�assume_role_provider�pre_profile�profile_providers�post_profilerF�resolversf&&               r:�create_credential_resolverrbGs�����.�.�y�9�F�F�Y�L��2�2�3M�N���.�.�/N�O�L��1�1�3�7�7�	�B�$�N��	(��)D�)D�+�*
�	-�.H��/
�	(�)J�"�G�$?�$?�&�%
��K�
�}����=�L�*�,��!9�0�$�%��)�)�+��	
�"�� 6��u� ��.�/�*�7�K�@��!�9�
�/I�J�
�":�	��	���K�1�:�:�!�)�;���
	�����"�	�L��/�,�>�I�� 	����&����
8�	
�
"�I�6�H��Or=c�Va�]tRt^�toRtRRltRRltRtRtRt	Rt
R	tR
tVt
R#)
rNa�This class handles the creation of profile based providers.

NOTE: This class is only intended for internal use.

This class handles the creation and ordering of the various credential
providers that primarly source their configuration from the shared config.
This is needed to enable sharing between the default credential chain and
the source profile chain created by the assume role provider.
Nc�6�WnW nW0nW@nR#r6)�_session�_cache�_region_name�_sso_token_cache)�selfr9r3r4�sso_token_caches&&&&&r:�__init__�ProfileProviderBuilder.__init__�s�� �
���'�� /�r=c��VPVV4VPV4VPV4VPV4VP	V4.#r6)�_create_web_identity_provider�_create_sso_provider�"_create_shared_credential_provider�_create_process_provider�_create_config_provider�rir@rDs&&&r:rF� ProfileProviderBuilder.providers�sZ���.�.�� �
�
�%�%�l�3��3�3�L�A��)�)�,�7��(�(��6�	
�		
r=c�&a�\VV3RlR7#)c�0<�SPP#r6�rer7�ris�r:r;�AProfileProviderBuilder._create_process_provider.<locals>.<lambda>������
�
� 9� 9r=)r@r>)�ProcessProvider�rir@sf&r:rq�/ProfileProviderBuilder._create_process_provider�s����%�9�
�	
r=c�R�VPPR4p\VVR7#)�credentials_file)r@�creds_filename)rerG�SharedCredentialProvider)rir@�credential_files&& r:rp�9ProfileProviderBuilder._create_shared_credential_provider�s*���-�-�;�;�<N�O��'�%�*�
�	
r=c�R�VPPR4p\VVR7#)�config_file)r@�config_filename)rerG�ConfigProvider)rir@r�s&& r:rr�.ProfileProviderBuilder._create_config_provider�s)���m�m�7�7�
�F���%�'�
�	
r=c�|a�\V3Rl\SPSP4SPVVR7#)c�0<�SPP#r6rwrxs�r:r;�FProfileProviderBuilder._create_web_identity_provider.<locals>.<lambda>�rzr=)r>r?r3r@rD)�!AssumeRoleWithWebIdentityProviderrPrergrfrssf&&r:rn�4ProfileProviderBuilder._create_web_identity_provider�s9���0�9�.��
�
�t�0�0���+�+�%�-�
�	
r=c
�a�\V3RlSPPVSPSP\SPSPVR7R7#)c�0<�SPP#r6rwrxs�r:r;�=ProfileProviderBuilder._create_sso_provider.<locals>.<lambda>�rzr=)r3r@)r>r?r@r3�token_cache�token_provider)�SSOProviderre�
create_clientrfrhrr|sf&r:ro�+ProfileProviderBuilder._create_sso_provider�sN����9��=�=�6�6�%��+�+��-�-�+��
�
��+�+�)��

�	
r=)rfrgrerh�NNN�F)�__name__�
__module__�__qualname__�__firstlineno__�__doc__rkrFrqrprrrnro�__static_attributes__�__classdictcell__��
__classdict__s@r:rNrN�s2�����0�

�
�
�
�	
�
�
r=rNc�8�\V4pVP4#r6)rb�load_credentials)r9ras& r:�get_credentialsr��s��)�'�2�H��$�$�&�&r=c�P�\PP\44#r6)�datetime�nowr�r=r:�
_local_nowr��s����� � ���+�+r=c�\�\V\P4'dV#\V4#r6)�
isinstancer�r)�values&r:�_parse_if_neededr��s$���%��*�*�+�+�����<�r=c��\V\P4'd*V'dVP4#VPR4#V#)z%Y-%m-%dT%H:%M:%S%Z)r�r��	isoformat�strftime)r��isos&&r:�_serialize_if_neededr�s:���%��*�*�+�+���?�?�$�$��~�~�3�4�4��Lr=c�aa�VV3RlpV#)c�J<�RS/pVP!R/VB\SV3/VB#)r4r�)�updater )�service_name�kwargs�create_client_kwargsr4r9s&, ��r:r?�+_get_client_creator.<locals>.client_creators9��� -�{�;���#�#�-�f�-�#��\�
�%9�
�	
r=r�)r9r4r?sff r:rPrPs���
��r=c�aa�VV3RlpV#)c�<�SP!R	/SBpVR,pRVR,RVR,RVR,R\VR,4/#)
�Credentials�
access_key�AccessKeyId�
secret_key�SecretAccessKey�token�SessionToken�expiry_time�
Expirationr�)�assume_roler�)�response�credentials�client�paramss  ��r:�refresh�-create_assume_role_refresher.<locals>.refreshs[����%�%�/��/���}�-��
�+�m�4��+�&7�8��[��0��/��L�0I�J�	
�	
r=r�)r�r�r�sff r:�create_assume_role_refresherr�s���

��Nr=c�&�!RR4pV!V4#)c�,a�]tRtRtoRtRtRtVtR#)�/create_mfa_serial_refresher.<locals>._Refresheri'c� �WnRVnR#)FN)�_refresh�_has_been_called)rir�s&&r:rk�8create_mfa_serial_refresher.<locals>._Refresher.__init__(s��#�M�$)�D�!r=c�h�VP'd\4hRVnVP4#�T)r�rr�rxs&r:�__call__�8create_mfa_serial_refresher.<locals>._Refresher.__call__,s-���$�$�$�5�6�6�$(�D�!��=�=�?�"r=)r�r�N)r�r�r�r�rkr�r�r�r�s@r:�
_Refresherr�'s����	*�	#�	#r=r�r�)�actual_refreshr�s& r:�create_mfa_serial_refresherr�&s��#�#��n�%�%r=c�@a�]tRtRtoRtR	RltRtRtRtRt	Vt
R#)
r�i8a�
Holds the credentials needed to authenticate requests.

:param str access_key: The access key part of the credentials.
:param str secret_key: The secret key part of the credentials.
:param str token: The security token, valid only for session credentials.
:param str method: A string which identifies where the credentials
    were found.
:param str account_id: (optional) An account ID associated with the credentials.
Nc�n�WnW nW0nVfRpW@nWPnVP4R#)N�explicit)r�r�r��method�
account_id�
_normalize)rir�r�r�r�r�s&&&&&&r:rk�Credentials.__init__Ds1��%��$���
��>��F���$�����r=c��\PPVP4Vn\PPVP4VnR#r6)�botocore�compat�ensure_unicoder�r�rxs&r:r��Credentials._normalizeRs8��#�/�/�8�8����I���"�/�/�8�8����I��r=c�n�\VPVPVPVP4#r6)r#r�r�r�r�rxs&r:�get_frozen_credentials�"Credentials.get_frozen_credentials\s(��"��O�O�T�_�_�d�j�j�$�/�/�
�	
r=c�aa�VV3RlpV#)c�<�\SSR4#r6)�getattr)�
property_nameris��r:�get_property�7Credentials.get_deferred_property.<locals>.get_propertybs����4���5�5r=r�)rir�r�sff r:�get_deferred_property�!Credentials.get_deferred_propertyas���	6��r=)r�r�r�r�r�r�)r�r�r�r�r�rkr�r�r�r�r�r�s@r:r�r�8s$����	��J�
�
�r=r�c�fa�]tRtRtoRt]t]t]	RRR3Rlt
Rt]RRl4t
]R4t]P R4t]R	4t]P R
4t]R4t]P R4t]R
4t]P R4tRtRRltRtRtRt]R4tRtRtRtVtR#)�RefreshableCredentialsiha]
Holds the credentials needed to authenticate requests. In addition, it
knows how to refresh itself.

:param str access_key: The access key part of the credentials.
:param str secret_key: The secret key part of the credentials.
:param str token: The security token, valid only for session credentials.
:param datetime expiry_time: The expiration time of the credentials.
:param function refresh_using: Callback function to refresh the credentials.
:param str method: A string which identifies where the credentials
    were found.
:param function time_fetcher: Callback function to retrieve current time.
Nc��WPnWnW nW0nW�nW@nWpn\P!4Vn	W`n
\WW:4VnVP4VeW�nV	e	W�nR#R#r6)�_refresh_using�_access_key�_secret_key�_token�_account_id�_expiry_time�
_time_fetcher�	threading�Lock�
_refresh_lockr�r#�_frozen_credentialsr��_advisory_refresh_timeout�_mandatory_refresh_timeout)rir�r�r�r��
refresh_usingr��time_fetcher�advisory_timeout�mandatory_timeoutr�s&&&&&&&&&&&r:rk�RefreshableCredentials.__init__~s|��,��%��%����%��'��)��&�^�^�-�����#6��E�$
�� �	
�����'�-=�*��(�.?�+�)r=c��\PPVP4Vn\PPVP4VnR#r6)r�r�r�r�r�rxs&r:r��!RefreshableCredentials._normalize�s<��#�?�?�9�9�$�:J�:J�K���#�?�?�9�9�$�:J�:J�K��r=c���/pVeWFR&VeWVR&V!R
RVR,RVR,RVR,RVPVR,4RVRVR	VPR	4/VBpV#)Nrrr�r�r�r�r�rr�r�)�_expiry_datetimerI)�cls�metadatarr�rrr��instances&&&&&&  r:�create_from_metadata�+RefreshableCredentials.create_from_metadata�s������'�)9�%�&��(�*;�&�'��	
���-�	
���-�	
��7�#�	
��,�,�X�m�-D�E�		
�
�	
�(�
	
� �|�|�L�1�	
��	
���r=c�:�VP4VP#�z�Warning: Using this property can lead to race conditions if you
access another property subsequently along the refresh boundary.
Please use get_frozen_credentials instead.
)r�r�rxs&r:r��!RefreshableCredentials.access_key����	
�
�
�����r=c��WnR#r6)r��rir�s&&r:r�r���� �r=c�:�VP4VP#r)r�r�rxs&r:r��!RefreshableCredentials.secret_key�rr=c��WnR#r6)r�rs&&r:r�r�rr=c�:�VP4VP#r)r�r�rxs&r:r��RefreshableCredentials.token�s��	
�
�
���{�{�r=c��WnR#r6)r�rs&&r:r�r�s���r=c�:�VP4VP#r)r�r�rxs&r:r��!RefreshableCredentials.account_id�rr=c��WnR#r6)r�rs&&r:r�r�rr=c�Z�VPVP4,
p\V4#r6)r�r�r)ri�deltas& r:�_seconds_remaining�)RefreshableCredentials._seconds_remaining�s&���!�!�D�$6�$6�$8�8���U�#�#r=c��VPfR#Vf
VPpVP4V8�dR#\P	R4R#)aKCheck if a refresh is needed.

A refresh is needed if the expiry time associated
with the temporary credentials is less than the
provided ``refresh_in``.  If ``time_delta`` is not
provided, ``self.advisory_refresh_needed`` will be used.

For example, if your temporary credentials expire
in 10 minutes and the provided ``refresh_in`` is
``15 * 60``, then this function will return ``True``.

:type refresh_in: int
:param refresh_in: The number of seconds before the
    credentials expire in which refresh attempts should
    be made.

:return: True if refresh needed, False otherwise.

Fz!Credentials need to be refreshed.T)r�r�r!rUrV)ri�
refresh_ins&&r:�refresh_needed�%RefreshableCredentials.refresh_needed�sJ��(���$�����7�7�J��"�"�$�
�2�����8�9�r=c�&�VP^R7#)r)r$)r%rxs&r:�_is_expired�"RefreshableCredentials._is_expireds���"�"�a�"�0�0r=c��VPVP4'gR#VPPR4'd�VPVP4'gVPP	4R#VPVP
4pVP
VR7VPP	4R#VPVP
4'd^VP;_uu_4VPVP
4'gRRR4R#VP
RR7RRR4R#R# TPP	4i;i +'giR#;i)NF)�is_mandatoryT)r%r�r��acquire�releaser�_protected_refresh)ri�is_mandatory_refreshs& r:r��RefreshableCredentials._refreshs9���"�"�4�#A�#A�B�B�����%�%�e�,�,�	
-��*�*�4�+I�+I�J�J���"�"�*�*�,�
(,�':�':��3�3�(�$��'�'�5I�'�J���"�"�*�*�,�
�
 �
 ��!@�!@�
A�
A��#�#�#��*�*�4�+J�+J�K�K��$�#��'�'�T�'�:�$�#�B���"�"�*�*�,��$�#�#�s$� E�-E�#E-�0E-�E*�-E>	c��VP4pTP	T4\TPTPTPTP4Tn
TP4'd#Rp\PT4\T4hR# \d2T'dRMRp\PRTRR7T'dhR#i;i)�	mandatory�advisoryzARefreshing temporary credentials failed during %s refresh period.T��exc_infoNzLCredentials were refreshed, but the refreshed credentials are still expired.)
r��	ExceptionrU�warning�_set_from_datar#r�r�r�r�r�r(�RuntimeError)rir+r�period_name�msgs&&   r:r.�)RefreshableCredentials._protected_refresh8s���	��*�*�,�H�$	
���H�%�#6����d�.�.����T�=M�=M�$
�� ������;�
�
�N�N�3���s�#�#���+�	�)5�+�:�K��N�N�,���	
�
���
�!	�s�B�C�+#C�C�Cc��\V4#r6r)�time_strs&r:r	�'RefreshableCredentials._expiry_datetime_s���X��r=c���.R
OpV'gTpMVUu.uF
qDV9gKVNK	ppV'd0Rp\VPVRPV4,R7hVR,VnVR,VnVR,Vn\
VR,4VnVPR4Vn	\PRVP4VP4R	#uupi)r�r�r�r�z7Credential refresh failed, response did not contain: %s�, ��provider�	error_msgr�z(Retrieved credentials will expire at: %sN)r�r�r�r�)
rr��joinr�r�r�rr�rIr�rUrVr�)ri�data�
expected_keys�missing_keys�k�messages&&    r:r8�%RefreshableCredentials._set_from_datacs���L�
��(�L�'4�F�}�!��
�A�A�}�L�F��O�G�*����!�D�I�I�l�$;�;��
�
�|�,����|�,����'�]��
�!�$�}�"5�6����(�(�<�0������6��8I�8I�	
�	
�����#Gs
�C)�C)c�:�VP4VP#)a�Return immutable credentials.

The ``access_key``, ``secret_key``, and ``token`` properties
on this class will always check and refresh credentials if
needed before returning the particular credentials.

This has an edge case where you can get inconsistent
credentials.  Imagine this:

    # Current creds are "t1"
    tmp.access_key  ---> expired? no, so return t1.access_key
    # ---- time is now expired, creds need refreshing to "t2" ----
    tmp.secret_key  ---> expired? yes, refresh and return t2.secret_key

This means we're using the access key from t1 with the secret key
from t2.  To fix this issue, you can request a frozen credential object
which is guaranteed not to change.

The frozen credentials returned from this method should be used
immediately and then discarded.  The typical usage pattern would
be::

    creds = RefreshableCredentials(...)
    some_code = SomeSignerObject()
    # I'm about to sign the request.
    # The frozen credentials are only used for the
    # duration of generate_presigned_url and will be
    # immediately thrown away.
    request = some_code.sign_some_request(
        with_credentials=creds.get_frozen_credentials())
    print("Signed request:", request)

)r�r�rxs&r:r��-RefreshableCredentials.get_frozen_credentials{s��D	
�
�
���'�'�'r=)r�r�r�r�r�rr�r�r�r�r�r�r�r�r�r��NNr6)r�r�r�r�r�rJr��"_DEFAULT_MANDATORY_REFRESH_TIMEOUTrr�rkr��classmethodr
�propertyr��setterr�r�r�r!r%r(r�r.�staticmethodr	r8r�r�r�r�s@r:r�r�hs>����� !B��"D�� ����@�>L�����4� �� ����!��!�� �� ����!��!������\�\����� �� ����!��!�$� �D1�;�<%$�N�����0#(�#(r=r�c�Faa�]tRtRtoRt]3RltRV3RlltRtVt	V;t
#)�DeferredRefreshableCredentialsi�zqRefreshable credentials that don't require initial credentials.

refresh_using will be called upon first access.
c��WnRVnRVnRVnRVnRVnW0n\P!4Vn	W n
RVnR#r6)r�r�r�r�r�r�r�r�r�r�r�r�)rirr�rs&&&&r:rk�'DeferredRefreshableCredentials.__init__�sQ��+�������������� ���)��&�^�^�-�����#'�� r=c�B<�VPfR#\SV`	V4#)NT)r��superr%)rir$�	__class__s&&�r:r%�-DeferredRefreshableCredentials.refresh_needed�s"����#�#�+���w�%�j�1�1r=)
r�r�r�r�r�r�r�r�r�r�r6)r�r�r�r�r�r�rkr%r�r��
__classcell__�rZr�s@@r:rUrU�s�����
<F�
(�2�2r=rUc�^a�]tRtRtoR
tRRltRtRtRtRt	Rt
R	tR
tRt
RtVtR#)�CachedCredentialFetcheri�Nc��Vf/pWnVP4VnVf
VPpW n\4VnR#r6)rf�_create_cache_key�
_cache_key�DEFAULT_EXPIRY_WINDOW_SECONDS�_expiry_window_seconds�set�feature_ids)rir3�expiry_window_secondss&&&r:rk� CachedCredentialFetcher.__init__�sC���=��E����0�0�2��� �(�$(�$F�$F�!�&;�#��5��r=c��\R4h)z_create_cache_key()��NotImplementedErrorrxs&r:ra�)CachedCredentialFetcher._create_cache_key�s��!�"7�8�8r=c��VPRR4P\PR4pVPRR4#)�:�_�/)�replace�os�sep)ri�filenames&&r:�_make_file_safe�'CachedCredentialFetcher._make_file_safe�s8���#�#�C��-�5�5�b�f�f�c�B������S�)�)r=c��\R4h)z_get_credentials()rjrxs&r:�_get_credentials�(CachedCredentialFetcher._get_credentials�s��!�"6�7�7r=c�"�VP4#r6)�_get_cached_credentialsrxs&r:�fetch_credentials�)CachedCredentialFetcher.fetch_credentials�s���+�+�-�-r=c�6�VP4pVf#VP4pVPV4M\P	R4VR,p\VR,RR7pRVR,RVR	,R
VR,RVR
VP
R4/pV#)z~Get up-to-date credentials.

This will check the cache for up-to-date credentials, calling assume
role if none are available.
z*Credentials for role retrieved from cache.r�r�T)r�r�r�r�r�r�r�r�r��	AccountId)�_load_from_cacherx�_write_to_cacherUrVr�rI)rir��creds�
expirationr�s&    r:r{�/CachedCredentialFetcher._get_cached_credentials�s����(�(�*�����,�,�.�H�� � ��*��L�L�E�F���'��)�%��*=�4�H�
��%�
�.��%� 1�2��U�>�*��:��%�)�)�K�0�
���r=c���VPVP9dU\VPVP,4pVPV4'gV#\PR4R#)z6Credentials were found in cache, but they are expired.N)rbrfrr(rUrV)rir�s& r:r��(CachedCredentialFetcher._load_from_cache�sS���?�?�d�k�k�)��T�[�[����9�:�E��#�#�E�*�*������L��r=c�J�\V4VPVP&R#r6)rrfrb)rir�s&&r:r��'CachedCredentialFetcher._write_to_cache�s��'/��'9����D�O�O�$r=c��\VR,R,4p\V\4,
4pW0P8#)z!Check if credentials are expired.r�r�)r�rr�rd)rir��end_time�secondss&&  r:r(�#CachedCredentialFetcher._is_expired�s6��#�K�
�$>�|�$L�M����:�<� 7�8���4�4�4�4r=)rfrbrdrf�rN)r�r�r�r�rcrkrarurxr|r{r�r�r(r�r�r�s@r:r_r_�s=����$+�!�!�9�*�
8�.��2	�:�5�5r=r_c�Haa�]tRtRtoRV3RlltRtRtRtRtVt	V;t
#)�BaseAssumeRoleCredentialFetcheric�:<�WnW nVf	/VnM\V4VnVPVPR&VPP	R4VnRVnVP
'gVP4\SV`%WE4R#)N�RoleArn�RoleSessionNameF)
�_client_creator�	_role_arn�_assume_kwargsrrI�_role_session_name�_using_default_session_name�_generate_assume_role_namerYrk)rir?�role_arn�
extra_argsr3rgrZs&&&&&&�r:rk�(BaseAssumeRoleCredentialFetcher.__init__s���� .��!����"$�D��"*�:�"6�D��)-������I�&�"&�"5�"5�"9�"9�:K�"L���+0��(��&�&�&��+�+�-�
����6r=c��R\\P!442VnVPVPR&RVnR#)zbotocore-session-r�TN)�int�timer�r�r�rxs&r:r��:BaseAssumeRoleCredentialFetcher._generate_assume_role_names<��$5�c�$�)�)�+�6F�5G�"H���15�1H�1H����-�.�+/��(r=c�F�\VP4pVP'dVRRV9d!\P!VR,4VR&\P
!VRR7p\
VPR44P4pVPV4#)�{Create a predictable cache key for the current configuration.

The cache key is intended to be compatible with file names.
r��PolicyT)�	sort_keys�utf-8)
rr�r��json�loads�dumpsr�encode�	hexdigestru�ri�args�
argument_hashs&  r:ra�1BaseAssumeRoleCredentialFetcher._create_cache_key s���
��+�+�,���+�+�+��&�'��t��"�Z�Z��X��7�D��N��z�z�$�$�/���T�[�[��1�2�<�<�>�
��#�#�M�2�2r=c�
�VPR/4PR4p\P!V4'd0\4pVPV4R,pWAR,R&R#\PRV4R#)�AssumedRoleUser�Arn�accountr�rz)Unable to extract account ID from Arn: %sN)rIr�is_arn�	parse_arnrUrV)rir�r��
arn_parserr�s&&   r:�_add_account_id_to_response�;BaseAssumeRoleCredentialFetcher._add_account_id_to_response6sg���<�<� 1�2�6�:�:�5�A�����H�%�%�"��J�#�-�-�h�7�	�B�J�3=�]�#�K�0��L�L�D�h�Or=)r�r�r�r�r�r�)r�r�r�r�rkr�rar�r�r�r\r]s@@r:r�r�s ����7�00�
3�,P�Pr=r�c�Haa�]tRtRtoRV3RlltRtRtRtRtVt	V;t
#)�AssumeRoleCredentialFetcheri@c�<�W nWPnVPf\PVn\SV`VVVVVR7R#)a)
:type client_creator: callable
:param client_creator: A callable that creates a client taking
    arguments like ``Session.create_client``.

:type source_credentials: Credentials
:param source_credentials: The credentials to use to create the
    client for the call to AssumeRole.

:type role_arn: str
:param role_arn: The ARN of the role to be assumed.

:type extra_args: dict
:param extra_args: Any additional arguments to add to the assume
    role request using the format of the botocore operation.
    Possible keys include, but may not be limited to,
    DurationSeconds, Policy, SerialNumber, ExternalId and
    RoleSessionName.

:type mfa_prompter: callable
:param mfa_prompter: A callable that returns input provided by the
    user (i.e raw_input, getpass.getpass, etc.).

:type cache: dict
:param cache: An object that supports ``__getitem__``,
    ``__setitem__``, and ``__contains__``.  An example of this is
    the ``JSONFileCache`` class in aws-cli.

:type expiry_window_seconds: int
:param expiry_window_seconds: The amount of time, in seconds,
N�r�r3rg)�_source_credentials�
_mfa_prompter�getpassrYrk)	rir?�source_credentialsr�r��mfa_prompterr3rgrZs	&&&&&&&&�r:rk�$AssumeRoleCredentialFetcher.__init__AsK���R$6� �)�����%�!(���D��
�����!��"7�	�	
r=c��\VP4VP4pVP4pVP!R/VBpVPV4V#)�'Get credentials by calling assume role.r�)rrf�_assume_role_kwargs�_create_clientr�r�)rir�r�r�s&   r:rx�,AssumeRoleCredentialFetcher._get_credentialswsR���T�-�-�.��)�)�+���$�$�&���%�%�/��/���(�(��2��r=c���\VP4pVPR4pVeRVR2pVPV4pWAR&VPR4pVeWQR&V#)�AGet the arguments for assume role based on current configuration.�SerialNumberzEnter MFA code for z: �	TokenCode�DurationSeconds)rr�rIr�)ri�assume_role_kwargs�
mfa_serial�prompt�
token_code�duration_secondss&     r:r��/AssumeRoleCredentialFetcher._assume_role_kwargs�sv��%�d�&9�&9�:��'�+�+�N�;�
��!�*�:�,�b�9�F��+�+�F�3�J�.8�{�+�-�1�1�2C�D���'�4D�0�1�!�!r=c��VPP4pVPRVPVPVP
R7#)z2Create an STS client using the source credentials.�sts)�aws_access_key_id�aws_secret_access_key�aws_session_token)r�r�r�r�r�r�)ri�frozen_credentialss& r:r��*AssumeRoleCredentialFetcher._create_client�sM��!�5�5�L�L�N���#�#��0�;�;�"4�"?�"?�0�6�6�	$�
�	
r=)r�r�)NNNN)r�r�r�r�rkrxr�r�r�r�r\r]s@@r:r�r�@s����4
�l�"�$
�
r=r�c�Baa�]tRtRtoRV3RlltRtRtRtVtV;t	#)�*AssumeRoleWithWebIdentityCredentialFetcheri�c�<<�W n\SV`	VVVVVR7R#)a�
:type client_creator: callable
:param client_creator: A callable that creates a client taking
    arguments like ``Session.create_client``.

:type web_identity_token_loader: callable
:param web_identity_token_loader: A callable that takes no arguments
and returns a web identity token str.

:type role_arn: str
:param role_arn: The ARN of the role to be assumed.

:type extra_args: dict
:param extra_args: Any additional arguments to add to the assume
    role request using the format of the botocore operation.
    Possible keys include, but may not be limited to,
    DurationSeconds, Policy, SerialNumber, ExternalId and
    RoleSessionName.

:type cache: dict
:param cache: An object that supports ``__getitem__``,
    ``__setitem__``, and ``__contains__``.  An example of this is
    the ``JSONFileCache`` class in aws-cli.

:type expiry_window_seconds: int
:param expiry_window_seconds: The amount of time, in seconds,
r�N)�_web_identity_token_loaderrYrk)rir?�web_identity_token_loaderr�r�r3rgrZs&&&&&&&�r:rk�3AssumeRoleWithWebIdentityCredentialFetcher.__init__�s.���H+D�'�
�����!��"7�	�	
r=c���\VP4VP4p\\R7pVPRVR7pVP!R/VBpVPV4V#)r�)�signature_versionr��r1r�)rrfr�r
r
r��assume_role_with_web_identityr�)rir�r1r�r�s&    r:rx�;AssumeRoleWithWebIdentityCredentialFetcher._get_credentials�se���T�-�-�.��)�)�+���(�3���%�%�e�F�%�;���7�7�A�&�A���(�(��2��r=c�X�\VP4pVP4pW!R&V#)r��WebIdentityToken)rr�r�)rir��identity_tokens&  r:r��>AssumeRoleWithWebIdentityCredentialFetcher._assume_role_kwargs�s0��%�d�&9�&9�:���8�8�:��1?�-�.�!�!r=)r�r�)
r�r�r�r�rkrxr�r�r�r\r]s@@r:r�r��s����,
�\
�"�"r=r�c�>a�]tRtRtoRtRtRRltRtRtRt	Vt
R#)�CredentialProvideri�Nc��WnR#r6r8)rir9s&&r:rk�CredentialProvider.__init__�s���r=c��R#)a&
Loads the credentials from their source & sets them on the object.

Subclasses should implement this method (by reading from disk, the
environment, the network or wherever), returning ``True`` if they were
found & loaded.

If not found, this method should return ``False``, indictating that the
``CredentialResolver`` should fall back to the next available method.

The default implementation does nothing, assuming the user has set the
``access_key/secret_key/token`` themselves.

:returns: Whether credentials were found & set
:rtype: Credentials
Tr�rxs&r:�load�CredentialProvider.load�s��"r=c��.pVFpVPW,4K	V# \d\TPTR7hi;i)�rC�cred_var)�append�KeyErrorr�METHOD)ri�mapping�	key_names�found�key_names&&*  r:�_extract_creds_from_mapping�.CredentialProvider._extract_creds_from_mappingsS����!�H�
����W�.�/�"����	�
�-�!�[�[�8���
�s	�&�#A	r8r6)r�r�r�r�r��CANONICAL_NAMErkr�r�r�r�r�s@r:r�r��s%����
�F��N���&	�	r=r�c�va�]tRtRtoRt]P3RltRtRt	]
R4t]
R4tRt
R	tVtR
#)r{izcustom-processc�8�WnW nRVnW0nR#r6)�
_profile_name�_load_config�_loaded_config�_popen)rir@r>�popens&&&&r:rk�ProcessProvider.__init__s��)��'��"����r=c	�vaa�SPoSfR#\R4SPS4p\R4VPR4e'\PVVV3RlSP4#\VR,VR,VPR4SPVPR4R	7#)
N�CREDENTIALS_PROFILE_PROCESS�CREDENTIALS_PROCESSr�c�&<�SPS4#r6)�_retrieve_credentials_using)�credential_processris��r:r;�&ProcessProvider.load.<locals>.<lambda>%s����8�8�9K�Lr=r�r�r�r�)r�r�r�r�r�)�_credential_processrrrIr�r
r�r�)ri�
creds_dictrsf @r:r��ProcessProvider.loads����!�5�5���%���9�:��5�5�6H�I�
��1�2��>�>�-�(�4�)�>�>��L�����
��!�,�/�!�,�/��.�.��)��;�;�!�~�~�l�3�
�	
r=c���\V4pVPV\P\PR7pVP	4wrEVP
^8wd'\
VPVPR4R7h\PPPVPR44pVPRR4pV^8wd\
VPRVR2R7hRVR,R	VR
,RVPR4R
VPR4RVPV4/# \d p\
TPRT2R7hRp?ii;i))�stdout�stderrr�rB�Versionz<Version key not provided>zUnsupported version 'z8' for credential process provider, supported versions: 1r�r�r�r�r�r�r�r�r�z"Missing required key in response: N)rr�
subprocess�PIPE�communicate�
returncoderr��decoder�r�r�r�rI�_get_account_idr�)	rir�process_list�prr�parsed�version�es	&&       r:r�+ProcessProvider._retrieve_credentials_using1sM��*�*<�=���K�K��������
�
���������<�<�1��*�����
�
�g�0F��
����%�%�+�+�F�M�M�'�,B�C���*�*�Y�(D�E���a�<�*����+�G�9�56�7��
�	��f�]�3��f�%6�7�����N�3��v�z�z�,�7��d�2�2�6�:��
���	�*����>�q�c�B��
��	�s�2AD9�9E#�E�E#c�8�VPPR4#)r)�profile_configrIrxs&r:r
�#ProcessProvider._credential_processUs���"�"�&�&�';�<�<r=c��VPfVP4VnVPPR/4PVP/4pV#�N�profiles)r�r�rIr�)rirs& r:r�ProcessProvider.profile_configYsU�����&�"&�"3�"3�"5�D���,�,�0�0��R�@�D�D�����
���r=c�n�VPR4pT;'gVPPR4#)r�aws_account_id)rIr)rirr�s&& r:r�ProcessProvider._get_account_idbs0���Z�Z��,�
��F�F�T�0�0�4�4�5E�F�Fr=)r�r�rr�N)r�r�r�r�r�r�Popenrkr�rrQr
rrr�r�r�s@r:r{r{sW����
�F�8B�8H�8H��
�."�H�=��=�����G�Gr=r{c�4a�]tRtRtoRtRtRtRtRtVt	R#)rMigziam-role�Ec2InstanceMetadatac��WnR#r6��
_role_fetcher)rir2s&&r:rk�!InstanceMetadataProvider.__init__ks��-�r=c��VPpVP4pV'gR#\R4\P	RVR,4\
P
VVPVPR7pV#)N�CREDENTIALS_IMDSz#Found credentials from IAM Role: %s�	role_name�r�r)r,�retrieve_iam_role_credentialsrrU�infor�r
r�)ri�fetcherrr�s&   r:r��InstanceMetadataProvider.loadnss���$�$���8�8�:�����.�/����1�8�K�3H�	
�'�;�;���;�;�!�?�?�<�
��
�r=r+N)
r�r�r�r�r�r�rkr�r�r�r�s@r:rMrMgs����
�F�*�N�.��r=rMc�\a�]tRtRtoRtRtRtRtRR.tRt	R	t
RRltRtR
t
RtRtVtR
#)rKi��env�Environment�AWS_ACCESS_KEY_ID�AWS_SECRET_ACCESS_KEY�AWS_SECURITY_TOKEN�AWS_SESSION_TOKEN�AWS_CREDENTIAL_EXPIRATION�AWS_ACCOUNT_IDNc�f�Vf\PpWnVPV4VnR#)a�

:param environ: The environment variables (defaults to
    ``os.environ`` if no value is provided).
:param mapping: An optional mapping of variable names to
    environment variable names.  Use this if you want to
    change the mapping of access_key->AWS_ACCESS_KEY_ID, etc.
    The dict can have up to 5 keys:
    * ``access_key``
    * ``secret_key``
    * ``token``
    * ``expiry_time``
    * ``account_id``
N)rr�environ�_build_mapping�_mapping)rir@r�s&&&r:rk�EnvProvider.__init__�s)���?��j�j�G����+�+�G�4��
r=c�6�/pVfNVPVR&VPVR&VPVR&VPVR&VPVR&V#VPRVP4VR&VPRVP4VR&VPRVP4VR&\
VR,\4'gVR,.VR&VPRVP4VR&VPRVP4VR&V#)Nr�r�r�r�r�)�
ACCESS_KEY�
SECRET_KEY�TOKENS�EXPIRY_TIME�
ACCOUNT_IDrIr��list)rir��var_mappings&& r:rA�EnvProvider._build_mapping�s�����?�(,���K��%�(,���K��%�#'�;�;�K�� �)-�)9�)9�K�
�&�(,���K��%�"��)0����d�o�o�)�K��%�)0����d�o�o�)�K��%�$+�;�;�w����#D�K�� ��k�'�2�D�9�9�(3�G�(<�'=��G�$�)0����t�/�/�*�K�
�&�)0����d�o�o�)�K��%��r=c
���VPPVPR,R4pV'd�\P	R4VP4pV!RR7p\
R4VR,pVeD\V4p\VR,VR	,VR
,VVVPVR,R7#\VR,VR	,VR
,VPVR,R
7#R#)z;
Search for credentials in explicit environment variables.
r��z+Found credentials in environment variables.F)�require_expiry�CREDENTIALS_ENV_VARSr�Nr�r�r�)rr�r��r�r�)r@rIrBrUr3�_create_credentials_fetcherrrr�r�r�)rir�r4r�r�s&    r:r��EnvProvider.load�s���
�\�\�%�%�d�m�m�L�&A�2�F�
���K�K�E�F��6�6�8�G�!��7�K�� 6�7�%�m�4�K��&�#�K�0��-���-���-���(��")��;�;�*�<�8�����L�)��L�)��G�$��{�{�&�|�4��
�r=c�haaa�VPoVPoVPoRVVV3RllpV#)Tc�J<�/pSPS	R,R4pV'g\S
S	R,R7hW!R&SPS	R,R4pV'g\S
S	R,R7hW1R&RVR&S	R,F#pSPVR4pV'gKWQR&M	RVR&SPS	R,R4pV'dWaR&V'dV'g\S
S	R,R7hRVR&SPS	R,R4pV'dWqR&V#)r�rNr�r�Nr�r�r�)rIr)rOr�r�r��
token_env_varr�r�r�r@r�r�s&       ���r:r|�BEnvProvider._create_credentials_fetcher.<locals>.fetch_credentials�s0����K� ���W�\�%:�B�?�J��-�#�g�l�.C���)3��%� ���W�\�%:�B�?�J��-�#�g�l�.C���)3��%�#'�K�� �!(��!1�!1�
����M�2�6���5�+0��(��	"2�*.�K�
�&�!�+�+�g�m�&<�b�A�K��-8�M�*��k�-�#�g�m�.D���)-�K��%� ���W�\�%:�B�?�J��,6�L�)��r=r�)rBr�r@)rir|r@r�r�s& @@@r:rR�'EnvProvider._create_credentials_fetcher�s1����-�-�������,�,��&	�&	�P!� r=)rBr@rN)r�r�r�r�r�r�rErFrGrHrIrkrAr�rRr�r�r�s@r:rKrK�sJ����
�F�"�N�$�J�(�J�#�$7�
8�F�-�K�!�J�5�(�8"�H-!�-!r=rKc�Da�]tRtRtoRtRtRtRtRtRRlt	R	t
R
tVtR#)rRizec2-credentials-file�	Ec2Config�AWS_CREDENTIAL_FILE�AWSAccessKeyId�AWSSecretKeyNc�Z�Vf\PpVf\pWnW nR#r6)rrr@r!�_environ�_parser)rir@�parsers&&&r:rk�OriginalEC2Provider.__init__s$���?��j�j�G��>�'�F��
��r=c�p�RVP9d�\PPVPR,4pVP	V4pVP
V9dQ\PR4W P
,pW P,p\W4VPR7#R#R#)z>
Search for a credential file used by original EC2 CLI tools.
r[z)Found credentials in AWS_CREDENTIAL_FILE.�r�N)r_rr�path�
expanduserr`rErUr3rFr�r�)ri�	full_pathr�r�r�s&    r:r��OriginalEC2Provider.load$s���!�D�M�M�1����*�*��
�
�3�4��I��L�L��+�E����%�'����G�H�"�?�?�3�
�"�?�?�3�
�"�:�$�+�+�N�N�(�r=)r_r`rN)
r�r�r�r�r�r��
CRED_FILE_ENVrErFrkr�r�r�r�s@r:rRrRs-����
#�F� �N�)�M�!�J��J���r=rRc�Xa�]tRtRtoRtRtRtRtRR.tRt	RR
lt
RtRtR
t
RtVtR	#)r�i7zshared-credentials-file�SharedCredentialsr�r��aws_security_tokenr�r%Nc�r�WnVfRpW nVf\PPpW0nR#)Nr')�_creds_filenamer�r��configloader�raw_config_parse�_ini_parser)rir�r@�
ini_parsers&&&&r:rk�!SharedCredentialProvider.__init__Cs6��-����$�L�)����!�.�.�?�?�J�%�r=c���VPVP4pTPT9d�YP,pTPT9d�\
P
RTP4TPY PTP4wr4TPT4pTPT4p\R4\TTTTPTR7#R#R# \dR#i;i)Nz0Found credentials in shared credentials file: %s�CREDENTIALS_PROFILErQ)rqrnrr�rErUr3r�rF�_get_session_tokenrrr�r�)ri�available_credsr1r�r�r�r�s&      r:r��SharedCredentialProvider.loadLs���	�"�.�.�t�/C�/C�D�O�����0�$�%7�%7�8�F����&�(����F��(�(��*.�)I�)I��O�O�T�_�_�*�&�
��/�/��7��!�1�1�&�9�
�#�$9�:�"�����;�;�)���)�1���	��	�s�C$�$C3�2C3c�L�VPFpW!9gKW,u#	R#r6�rG)rir1�token_envvars&& r:rv�+SharedCredentialProvider._get_session_tokenfs�� �K�K�L��%��+�+�(r=c�8�VPVP4#r6�rIrI�rir1s&&r:r�(SharedCredentialProvider._get_account_idk����z�z�$�/�/�*�*r=)rnrqr�rN)r�r�r�r�r�r�rErFrGrIrkr�rvrr�r�r�s@r:r�r�7sD����
&�F�(�N�$�J�(�J�#�$7�
8�F�!�J�&��4,�
+�+r=r�c�\a�]tRtRtoRtRtRtRtRtRR.t	R	t
RRltRtR
t
RtRtVtR
#)r�ioz0INI based config provider with profile sections.zconfig-file�SharedConfigr�r�rlr�r%Nc�f�WnW nVf\PPpW0nR#)z�

:param config_filename: The session configuration scoped to the current
    profile.  This is available via ``session.config``.
:param profile_name: The name of the current profile.
:param config_parser: A config parser callable.

N)�_config_filenamer�r�ror>�_config_parser)rir�r@�
config_parsers&&&&r:rk�ConfigProvider.__init__}s-��!0��)��� �$�1�1�=�=�M�+�r=c�
�VPVP4pTPTR,9d�TR,TP,pTPT9d�\
P
RTP4TPY PTP4wr4TPT4pTPT4p\R4\TTTTPTR7#R#R# \dR#i;i)zZ
If there is are credentials in the configuration associated with
the session, use those.
Nr"z$Credentials found in config file: %srurQ)r�r�rr�rErUr3r�rFrvrrr�r�)rir7rr�r�r�r�s&      r:r��ConfigProvider.load�s���
	��-�-�d�.C�.C�D�K�����Z�!8�8�(��4�T�5G�5G�H�N����.�0����:��)�)��*.�)I�)I�"�O�O�T�_�_�*�&�
��/�/��?��!�1�1�.�A�
�#�$9�:�"�����;�;�)���1�&��/�	��	�s�C3�3D�Dc�L�VPFpW!9gKW,u#	R#r6rz)rir�
token_names&& r:rv�!ConfigProvider._get_session_token�s���+�+�J��+�%�1�1�&r=c�8�VPVP4#r6r~rs&&r:r�ConfigProvider._get_account_id�r�r=)r�r�r�r6)r�r�r�r�r�r�r�rErFrGrIrkr�rvrr�r�r�s@r:r�r�osH����:�
�F�#�N�$�J�(�J�#�$7�
8�F�!�J�
,��@2�
+�+r=r�c�La�]tRtRtoRtRtRtRR.tRtRt	R
R
lt
RtRtVt
R	#)rSi�zboto-config�Boto2Config�BOTO_CONFIGz
/etc/boto.cfgz~/.botor�r�Nc��Vf\PpVf\PPpWnW nR#r6)rrr@r�rorpr_rq)rir@rrs&&&r:rk�BotoProvider.__init__�s2���?��j�j�G���!�.�.�?�?�J��
�%�r=c��VPVP9d VPVP,.pMVPpVF�pVPV4pRT9gKTR,pTP
T9gK:\PRT4TPY@P
TP4wrV\R4\YVTPR7u#	R# \dK�i;i)z+
Look for credentials in boto config file.
r�z)Found credentials in boto config file: %s�CREDENTIALS_BOTO2_CONFIG_FILErdN)
�BOTO_CONFIG_ENVr_�DEFAULT_CONFIG_FILENAMESrqrrErUr3r�rFrr�r�)ri�potential_locationsrtr1r�r�r�s&      r:r��BotoProvider.load�s������4�=�=�0�#'�=�=��1E�1E�#F�"G��"&�"?�"?��+�H�
��)�)�(�3����&�$�]�3���?�?�k�1��K�K�C�X��.2�-M�-M�#�_�_�d�o�o�.�*�J�(�(G�H�&�"�t�{�{���!,��"�
��
�s�
C)�)C8�7C8)r_rqrN)r�r�r�r�r�r�r�r�rErFrkr�r�r�r�s@r:rSrS�s8����
�F�"�N�#�O� /��;��$�J�(�J�&��r=rSc�a�]tRtRtoRtRtRtRtRtRRRR	R
R/t	]
PRR3RltR
tRt
RtRtRtRtRtRtRtRtRtRtRtVtR#)rOi��assume-roleNr��web_identity_token_filer)r/r8rP�EcsContainer�CREDENTIALS_HTTPc��W0nWnW nW@nWPn/VnW`nWpnVP.Vn\4Vn
R#)a�
:type load_config: callable
:param load_config: A function that accepts no arguments, and
    when called, will return the full configuration dictionary
    for the session (``session.full_config``).

:type client_creator: callable
:param client_creator: A factory function that will create
    a client when called.  Has the same interface as
    ``botocore.session.Session.create_client``.

:type cache: dict
:param cache: An object that supports ``__getitem__``,
    ``__setitem__``, and ``__contains__``.  An example
    of this is the ``JSONFileCache`` class in the CLI.

:type profile_name: str
:param profile_name: The name of the profile.

:type prompter: callable
:param prompter: A callable that returns input provided
    by the user (i.e raw_input, getpass.getpass, etc.).

:type credential_sourcer: CanonicalNameCredentialSourcer
:param credential_sourcer: A credential provider that takes a
    configuration, which is used to provide the source credentials
    for the STS call.
N)r3r�r�r��	_prompterr��_credential_sourcer�_profile_provider_builder�_visited_profilesre�_feature_ids)rir>r?r3r@�prompterrArBs&&&&&&&&r:rk�AssumeRoleProvider.__init__�sT��V�
�'�� .��)��!��!���#5� �)A�&�"&�"4�"4�!5����E��r=c��VP4VnVPPR/4pVPVP/4pVP	V4'dVPVP4#R#)r"N)r�r�rIr��_has_assume_role_config_vars�_load_creds_via_assume_role)rir"r&s&  r:r��AssumeRoleProvider.load6sn��"�/�/�1����&�&�*�*�:�r�:���,�,�t�1�1�2�6���,�,�W�5�5��3�3�D�4F�4F�G�G�6r=c�N�VPV9;'dVPV9#r6)�ROLE_CONFIG_VAR�WEB_IDENTITY_TOKE_FILE_VAR�rir&s&&r:r��/AssumeRoleProvider._has_assume_role_config_vars=s/��� � �G�+�
;�
;�
�+�+�7�:�	
r=c	��VPV4pVPW!4p/pVPR4pVeWTR&VPR4pVeWdR&VPR4pVeWtR&VPR4pVeW�R&\VPVVR,VVP
VPR	7p	VPP4V	n	V	Pp
Ve\V
4p
VPPR
4\VP4\VPV
\ R7#)�role_session_namer��external_id�
ExternalIdr�r�r�r�r�)r?r�r�r�r�r3�CREDENTIALS_STS_ASSUME_ROLE)r�rr)�_get_role_config�_resolve_source_credentialsrIr�r�r�r3r��copyrfr|r��addrrUr�r�)rir@�role_configr�r�r�r�r�r�r4�	refreshers&&         r:r��.AssumeRoleProvider._load_creds_via_assume_roleHsE���+�+�L�9��!�=�=��
���
�'�O�O�,?�@���(�,=�(�)�!�o�o�m�4���"�'2�|�$� �_�_�\�2�
��!�)3�~�&�&�?�?�+=�>���'�,<�(�)�-��/�/�1� ��,�!�����*�*�

��#�/�/�4�4�6����-�-�	��!�3�I�>�I������;�<��T�.�.�/�.��;�;�#�#�
�	
r=c�N�VPPR/4pW!,pVPR4pVR,pVPR4pVPR4pVPR4pVPR4p	VPR4p
RVRVRVRV	RVRV/pV
e\V
4VR&VeVe\	R	VR
2R7hVfVf\VPRR
7hVeVPW4V#VPW4V# \dLni;i)z?Retrieves and validates the role configuration for the profile.r"�source_profiler��credential_sourcer�r�r�r��
The profile "z5" contains both source_profile and credential_source.�rDz#source_profile or credential_sourcer�)	r�rIr��
ValueErrorrrr��_validate_credential_source�_validate_source_profile)rir@r"r&r�r�r�r�r�r�r�r�s&&          r:r��#AssumeRoleProvider._get_role_configwse���&�&�*�*�:�r�:���(�� ���%5�6���:�&��#�K�K�(;�<���[�[��.�
��k�k�-�0��#�K�K�(;�<��"�;�;�'9�:��
���;��*��!2��n��!2�

���'�
�25�6F�2G��.�/��(�^�-G�$�#�L�>�2<�<��
��
&�>�+A�)����>��
��
*��,�,�\�M���
�)�)�,�G����-�
��
�s�'D�D$�#D$c��VPf\RVRVR2R7hVPPV4'g\RVRVR2R7hR#)NzThe credential_source "z" is specified in profile "z)", but no source provider was configured.r�zThe credential source "z" referenced in profile "z" is not valid.)r�r�is_supported)ri�parent_profiler�s&&&r:r��.AssumeRoleProvider._validate_credential_source�s����#�#�+�$�.�/@�.A�B$�$2�#3�4=�>��
��'�'�4�4�5F�G�G�$�.�/@�.A�B$�$2�#3�3C�E��
�Hr=c�X�\VPV4VPV4.4#r6)�any�_has_static_credentialsr�r�s&&r:�_source_profile_has_credentials�2AssumeRoleProvider._source_profile_has_credentials�s0����,�,�W�5��1�1�'�:�
�
�	
r=c�:�VPPR/4pW#9d\RVRVR2R7hW2,pW P9dR#W!8wd\	VVPR7hVPV4'g\	VVPR7hR#)r"zThe source_profile "z" referenced in the profile "z" does not exist.r�N)r��visited_profiles)r�rIrr�rr�)ri�parent_profile_name�source_profile_namer"r�s&&&  r:r��+AssumeRoleProvider._validate_source_profile�s����&�&�*�*�:�r�:���.�$�+�,?�+@�A%�%8�$9�9K�M��
�"�6���&<�&<�<���5�)�2�!%�!7�!7��
��+�+�N�;�;�)�2�!%�!7�!7��
�<r=c�a�RR.p\;QJdV3RlV4F'gKR#	R#!V3RlV44#)r�r�c3�,<"�TF	qS9x�K	R#5ir6r�)�.0�
static_keyr&s& �r:�	<genexpr>�=AssumeRoleProvider._has_static_credentials.<locals>.<genexpr>�s����G�;�Z��(�;���TF)r�)rir&�static_keyss&f r:r��*AssumeRoleProvider._has_static_credentials�s7���.�0C�D���s�G�;�G�s�s�G�s�G�s�G�;�G�G�Gr=c�$�VPR4pVe-VPPR4VPW24#VR,pVPPV4VPPR4VP
V4#)r��"CREDENTIALS_PROFILE_NAMED_PROVIDERr��"CREDENTIALS_PROFILE_SOURCE_PROFILE)rIr�r�� _resolve_credentials_from_sourcer�r��!_resolve_credentials_from_profile)rir�r@r�r�s&&&  r:r��.AssumeRoleProvider._resolve_source_credentials�s���'�O�O�,?�@���(����!�!�"F�G��8�8�!��
�%�%5�6�����%�%�n�5������B�C��5�5�n�E�Er=c��VPPR/4pW!,pVPPR4VP	V4'd$VP
'gVP
V4#VP	V4'gVPV4'gSVP
PVRR7p\V4pVP4pVfRp\Wq,R7hV#VPV4#)r"ruTrCz.The source profile "%s" must have credentials.r�)
r�rIr�r�r�r��(_resolve_static_credentials_from_profiler�rFrWr�rr�)rir@r"r&r_�
profile_chainr��
error_messages&&      r:r��4AssumeRoleProvider._resolve_credentials_from_profile�s���&�&�*�*�:�r�:���(�������3�4��(�(��1�1��2�2�2��@�@��I�I�
�
)�
)��
�
��2�2�7�;�;� $� >� >� H� H�)�!%�!I�!��/�/@�A�M�'�8�8�:�K��"�D��)�+�:������/�/��=�=r=c��\VR,VR,VPR4R7# \d&p\TP\T4R7hRp?ii;i)r�r�r�)r�r�r�r�N)r�rIr�rr��str)rir&rs&& r:r��;AssumeRoleProvider._resolve_static_credentials_from_profiles_��		��"�#6�7�"�#:�;��k�k�"5�6��
��
�	�)����s�1�v��
��	�s�*-�A� A�Ac���VPPV4pVf\VRV2R7hVPP	V4pV'dVP
P
V4V#)Nz@No credentials found in credential_source referenced in profile rB)r�r�r�NAMED_PROVIDER_FEATURE_MAPrIr�r�)rir�r@r��named_provider_feature_ids&&&  r:r��3AssumeRoleProvider._resolve_credentials_from_source%s����.�.�A�A��
����*�*�"�".��1��
�%)�$C�$C�$G�$G��%
�!�%����!�!�";�<��r=)
r�r�r�r�r�r�r�r�r�r3r�)r�r�r�r�r�r�r�r��EXPIRY_WINDOW_SECONDSr�r�rkr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�s@r:rOrO�s�����
�F��N� �O�!:��$���1��-��*�"������!%�="�~H�	
�-
�^/�b�"
�$�LH�F�>�B
��r=rOc�`a�]tRtRtoRtRtRRRRRR	/tRR
ltRtRt	R
t
RtRtRt
VtR#)r�i;zassume-role-with-web-identityNr��AWS_WEB_IDENTITY_TOKEN_FILEr��AWS_ROLE_SESSION_NAMEr��AWS_ROLE_ARNc��W@nWnW nW0nRVnWPnVf\pW`n\4Vn	R#r6)
r3r�r�r��_profile_config�_disable_env_varsr�_token_loader_clsrer�)rir>r?r@r3rD�token_loader_clss&&&&&&&r:rk�*AssumeRoleWithWebIdentityProvider.__init__DsE���
�'��-��)��#���!1���#�9��!1���E��r=c�"�VP4#r6)�_assume_role_with_web_identityrxs&r:r��&AssumeRoleWithWebIdentityProvider.loadXs���2�2�4�4r=c���VPfDVP4pVPR/4pVPVP/4VnVPPV4#r!)r�r�rIr�)ri�key�
loaded_configr"s&&  r:�_get_profile_config�5AssumeRoleWithWebIdentityProvider._get_profile_config[s^�����'� �-�-�/�M�$�(�(��R�8�H�#+�<�<��0B�0B�B�#G�D� ��#�#�'�'��,�,r=c���VP'dR#VPPV4pV'd-V\P9d\PV,#R#r6)r��_CONFIG_TO_ENV_VARrIrrr@)rir��env_keys&& r:�_get_env_config�1AssumeRoleWithWebIdentityProvider._get_env_configbsG���!�!�!���)�)�-�-�c�2���w�"�*�*�,��:�:�g�&�&�r=c���VPV4pVeVPPR4V#VPV4pVeVPPR4V#R#)N�%CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN�$CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN)rr�r�r)rir��	env_value�config_values&&  r:�_get_config�-AssumeRoleWithWebIdentityProvider._get_configjsg���(�(��-�	�� ����!�!�"I�J����/�/��4���#����!�!�"H�I���r=c��VPR4pV'gR#VPV4pVPR4pV'gRp\VR7h/pVPR4pVeWeR&\VPVVVVP
R7pVPP4VnVPPR4\VP4\VPVPR	7#)
r�Nr�z�The provided profile or the current environment is configured to assume role with web identity but has no role ARN configured. Ensure that the profile has the role_arnconfiguration set or the AWS_ROLE_ARN env var is set.r�r�r�)r?r�r�r�r3�"CREDENTIALS_STS_ASSUME_ROLE_WEB_IDr1)rr�rr�r�r3r�r�rfr�rrUr�r|)ri�
token_path�token_loaderr�rDr�r�r4s&       r:r��@AssumeRoleWithWebIdentityProvider._assume_role_with_web_identityws����%�%�&?�@�
����-�-�j�9���#�#�J�/���H�
�%�y�9�9��
� �,�,�-@�A���(�,=�(�)�<��/�/�&2��!��*�*�
��#�/�/�4�4�6��������B�C��T�.�.�/�.��;�;�!�3�3�
�	
r=)r�r�r�r�r�r�r�r3)NFN)r�r�r�r�r�r�rrkr�rrrr�r�r�r�s@r:r�r�;sK����
,�F��N�!�#@��4��N���"�(5�-���&
�&
r=r�c�Da�]tRtRtoRtRtRtRtRtRt	Rt
VtR	#)
rQi�c��WnR#r6��
_providers�rirFs&&r:rk�'CanonicalNameCredentialSourcer.__init__�s��#�r=c�Z�YPUu.uFq"PNK	up9#uupi)aValidates a given source name.

:type source_name: str
:param source_name: The value of credential_source in the config
    file. This is the canonical name of the credential provider.

:rtype: bool
:returns: True if the credential provider is supported,
    False otherwise.
)rr�)ri�source_namers&& r:r��+CanonicalNameCredentialSourcer.is_supported�s'�����I��A�/�/��I�I�I��Is�(c��VPV4p\V\4'dVP4#VP	4#)z�Loads source credentials based on the provided configuration.

:type source_name: str
:param source_name: The value of credential_source in the config
    file. This is the canonical name of the credential provider.

:rtype: Credentials
)�
_get_providerr�rWr�r�)rir�sources&& r:r��1CanonicalNameCredentialSourcer.source_credentials�s=���#�#�K�0���f�0�1�1��*�*�,�,��{�{�}�r=c��VPV4pVP4R9d(VPR4pVeVfV#\W2.4#Vf
\	VR7hV#)z�Return a credential provider by its canonical name.

:type canonical_name: str
:param canonical_name: The canonical name of the provider.

:raises UnknownCredentialError: Raised if no
    credential provider by the provided name
    is found.
r���name)�sharedconfig�sharedcredentials)�_get_provider_by_canonical_name�lower�_get_provider_by_methodrWr)ri�canonical_namerCr]s&&  r:r�,CanonicalNameCredentialSourcer._get_provider�st���7�7��G�����!�%J�J�#'�#?�#?�
�#N� �#�/�
�#�/�/�
*�+?�*J�K�K���(�n�=�=��r=c��VPF@pVPpV'gKVP4VP48XgK>Vu#	R#)z�Return a credential provider by its canonical name.

This function is strict, it does not attempt to address
compatibility issues.
N)rr�r&)rir(rCr"s&&  r:r%�>CanonicalNameCredentialSourcer._get_provider_by_canonical_name�s=�����H��*�*�D��t��
�
���(<�(<�(>�>���	(r=c�V�VPFpVPV8XgKVu#	R#)z0Return a credential provider by its METHOD name.N)rr�)rir�rCs&& r:r'�6CanonicalNameCredentialSourcer._get_provider_by_method�s!�����H����&�(���(r=rN)r�r�r�r�rkr�r�rr%r'r�r�r�s@r:rQrQ�s*����$�J��$�L
 � � r=rQc�fa�]tRtRtoRtRtRtRtRtRt	RR	lt
R
tRtRt
R
tRtRtRtVtR#)rLi�zcontainer-roler��&AWS_CONTAINER_CREDENTIALS_RELATIVE_URI�"AWS_CONTAINER_CREDENTIALS_FULL_URI�!AWS_CONTAINER_AUTHORIZATION_TOKEN�&AWS_CONTAINER_AUTHORIZATION_TOKEN_FILENc�b�Vf\PpVf\4pWnW nR#r6)rrr@rr_�_fetcher)rir@r4s&&&r:rk�ContainerProvider.__init__s'���?��j�j�G��?�.�0�G��
��
r=c��VPVP9gVPVP9dVP4#R#r6)�ENV_VARr_�ENV_VAR_FULL�_retrieve_or_failrxs&r:r��ContainerProvider.loads:���<�<�4�=�=�(�D�,=�,=����,N��)�)�+�+�-Or=c��VP4'd8VPPVPVP,4pMVPVP
,pVP
V4pV!4p\VR,VR,VR,VP\VR,4VVPR4R7#)r�r�r�r�r�)r�r�r�r�r�rr�)�_provided_relative_urir4�full_urlr_r7r8�_create_fetcherr�r�r�rI)ri�full_urir4r�s&   r:r9�#ContainerProvider._retrieve_or_fails����&�&�(�(��}�}�-�-�d�m�m�D�L�L�.I�J�H��}�}�T�%6�%6�7�H��&�&�x�0���	��%��\�*��\�*���.��;�;�(��}�)=�>�!��y�y��.�
�	
r=c��RpVPVP9dKVPVP,p\V4;_uu_4pVP4pRRR4M8VPVP9dVPVP,pVeVPV4RV/#R# +'giL+;i)N�
Authorization)�ENV_VAR_AUTH_TOKEN_FILEr_�open�read�ENV_VAR_AUTH_TOKEN�_validate_auth_token)ri�
auth_token�auth_token_file_path�
token_files&   r:�_build_headers� ContainerProvider._build_headerss����
��'�'�4�=�=�8�#'�=�=��1M�1M�#N� ��*�+�+�z�'�_�_�.�
�,�+�
�
$�
$��
�
�
5����t�'>�'>�?�J��!��%�%�j�1�#�Z�0�0�"�	,�+�s�B;�;C	c�8�RV9gRV9d\R4hR#)�
�
z,Auth token value is not a legal header valueN)r�)rirHs&&r:rG�&ContainerProvider._validate_auth_token+s"���:����!3��K�L�L�"4r=c�aa�VV3RlpV#)c�z<�SP4pSPPSVR7p\R4RTR,R	TR
,RTR,R
TR,RTPR4/# \d>p\
P
RTRR7\SP\T4R7hRp?ii;i))�headersr�z'Error retrieving container metadata: %sTr4rBNr�r�r�r�r��Tokenr�r�r�r)rKr4�retrieve_full_urirrrUrVrr�r�rI)rSr�rr?ris   ��r:�fetch_creds�6ContainerProvider._create_fetcher.<locals>.fetch_creds0s����
��-�-�/���=�=�:�:��g�;���$�$6�7��h�}�5��h�'8�9���'�*��x��5��h�l�l�;�7��
��*�
����=�q�4���/�!�[�[�C��F����	
�s�8A2�2B:�=8B5�5B:r�)rir?r�r�rVsff*, r:r>�!ContainerProvider._create_fetcher/s���	�,�r=c�4�VPVP9#r6)r7r_rxs&r:r<�(ContainerProvider._provided_relative_uriHs���|�|�t�}�}�,�,r=)r_r4rN)r�r�r�r�r�r�r7r8rFrCrkr�r9rKrGr>r<r�r�r�s@r:rLrL�sN����
�F�#�N�6�G�7�L�<��F�� �,�
�"
1�M��2-�-r=rLc�Ja�]tRtRtoRtRtRtRtRtRt	Rt
R	tVtR
#)rWiLc��WnR#)zA

:param providers: A list of ``CredentialProvider`` instances.

NrErs&&r:rk�CredentialResolver.__init__Ms	��#�r=c���VPUu.uFq3PNK	upPV4pTPPYB4R#uupi \d\	TR7hi;i)a�
Inserts a new instance of ``CredentialProvider`` into the chain that
will be tried before an existing one.

:param name: The short name of the credentials you'd like to insert the
    new credentials before. (ex. ``env`` or ``config``). Existing names
    & ordering can be discovered via ``self.available_methods``.
:type name: string

:param cred_instance: An instance of the new ``Credentials`` object
    you'd like to add to the chain.
:type cred_instance: A subclass of ``Credentials``
r!N)rFr��indexr�r�insert)rir"�credential_providerr�offsets&&&  r:�
insert_before� CredentialResolver.insert_beforeUs_��	4�(,���7��1�h�h��7�=�=�d�C�F�	
�����f�:��8���	4�(�d�3�3�	4�s�A�A�A�A�A0c�n�VPV4pVPPV^,V4R#)a�
Inserts a new type of ``Credentials`` instance into the chain that will
be tried after an existing one.

:param name: The short name of the credentials you'd like to insert the
    new credentials after. (ex. ``env`` or ``config``). Existing names
    & ordering can be discovered via ``self.available_methods``.
:type name: string

:param cred_instance: An instance of the new ``Credentials`` object
    you'd like to add to the chain.
:type cred_instance: A subclass of ``Credentials``
N)�_get_provider_offsetrFr`)rir"rarbs&&& r:�insert_after�CredentialResolver.insert_afteris-���*�*�4�0�������f�q�j�*=�>r=c��VPUu.uFq"PNK	ppW9dR#VPV4pVPPV4R#uupi)z�
Removes a given ``Credentials`` instance from the chain.

:param name: The short name of the credentials instance to remove.
:type name: string
N)rFr�r_�pop)rir"r�available_methodsrbs&&   r:rT�CredentialResolver.removezsO��04�~�~�>�~�!�X�X�~��>��(��"�(�(��.�������6�"��
?s�Ac�F�VPVPV4,#)z�Return a credential provider by name.

:type name: str
:param name: The name of the provider.

:raises UnknownCredentialError: Raised if no
    credential provider by the provided name
    is found.
)rFrf)rir"s&&r:�get_provider�CredentialResolver.get_provider�s���~�~�d�7�7��=�>�>r=c��VPUu.uFq"PNK	upPV4#uupi \d\	TR7hi;i)r!)rFr�r_r�r)rir"rs&& r:rf�'CredentialResolver._get_provider_offset�sJ��	4�&*�n�n�5�n��H�H�n�5�;�;�D�A�A��5���	4�(�d�3�3�	4�s�;�6�;�;�Ac��VPF;p\PRVP4VP	4pVfK9Vu#	R#)z_
Goes through the credentials chain, returning the first ``Credentials``
that could be loaded.
zLooking for credentials via: %sN)rFrUrVr�r�)rirCr�s&  r:r��#CredentialResolver.load_credentials�s@�����H��L�L�:�H�O�O�L��M�M�O�E�� ���	'�r=rEN)
r�r�r�r�rkrcrgrTrnrfr�r�r�r�s@r:rWrWLs-����#�;�(?�"
#�
?�4��r=rWc�Xaa�]tRtRtoRtRRRRR]3V3RlltRtRtRt	Rt
VtV;t#)	�SSOCredentialFetcheri�z%Y-%m-%dT%H:%M:%SZNc�<�WPnW nW0nW@nWnW`nW�nW�nW�n\SV`)Wx4R#r6)r��_sso_region�
_role_namer��
_start_url�
_token_loader�_token_provider�_sso_session_namer�rYrk)
ri�	start_url�
sso_regionr0r�r?rr3rgr��sso_session_namerrZs
&&&&&&&&&&&&�r:rk�SSOCredentialFetcher.__init__�sF��� .��%��#��%��#��)��-��!1��)��
����6r=c�<�RVPRVP/pVP'dVPVR&MVPVR&\P
!VRRR7p\
VPR44P4pVPV4#)	r��roleName�	accountId�sessionName�startUrlT)r��
separatorsr�)�,rn)
rxr�r|ryr�r�rr�r�rur�s&  r:ra�&SSOCredentialFetcher._create_cache_key�s���
������)�)�
���!�!�!�"&�"8�"8�D���#���D����z�z�$�$�:�F���T�[�[��1�2�<�<�>�
��#�#�M�2�2r=c��VR,p\PPV\44pVPVP4#)g@�@)r��
fromtimestampr	r��_UTC_DATE_FORMAT)ri�timestamp_ms�timestamp_seconds�	timestamps&&  r:�_parse_timestamp�%SSOCredentialFetcher._parse_timestamp�s?��(�6�1���%�%�3�3�4E�u�w�O�	��!�!�$�"7�"7�8�8r=c�Z�\\VPR7pVPRVR7pVP'd6VPP4pVP
4PpMzVPVP4pVR,p\PPVR,4p\W`P4,
4pV^8:d\4hRVP RVP"RV/p\%VP&4VP(!R/VBp	T	R,p
R	RR
RT
R,R
T
R,RT
R,RTP/T
R,4RTP"//p
T
# TP*P,d\4hi;i)z4Get credentials by calling SSO get role credentials.)r�r4�ssor��accessToken�	expiresAtr�r��roleCredentials�ProviderTyper�r��accessKeyIdr��secretAccessKeyr��sessionTokenr�r�rr�)r
r
rwr�r{�
load_token�get_frozen_tokenr�rzry�dateutilrarrr�rrxr�rrf�get_role_credentials�
exceptions�UnauthorizedExceptionr�)rir1r��initial_token_datar��
token_dictr��	remainingr�r�r�s&          r:rx�%SSOCredentialFetcher._get_credentials�s����&��(�(�
���%�%�e�F�%�;������!%�!5�!5�!@�!@�!B��&�7�7�9�?�?�E��+�+�D�O�O�<�J��}�-�E�
"���.�.�z�+�/F�G�J�%�j�3E�3E�3G�&G�H�I��A�~�/�1�1�
������)�)��5�
��
	.� ��!1�!1�2��2�2�<�V�<�H��0�1��
�E���{�=�9�!�;�/@�#A���N� ;��d�3�3�K��4M�N��T�-�-��	
������ � �6�6�	.�+�-�-�	.�s�
'F�&F*)	r�r�rxrwr|ryr�rzr{)
r�r�r�r�r�r�rkrar�rxr�r�r\r]s@@r:ruru�s8����+����"����7�23�,9�,�,r=ruc��a�]tRtRtoRt]PP]PPRRRR44t	Rt
R
t]
],tRRlt
RtR	tR
tRtVtR#)r�i	r��~z.awsr3Nc��Vf\VP4pWPnW`nVf/pW@nWnW nW0n\4Vn	R#r6)
r�_SSO_TOKEN_CACHE_DIR�_token_cacher{r3r�r�r�rer�)rir>r?r@r3r�r�s&&&&&&&r:rk�SSOProvider.__init__)	sQ����'��(A�(A�B�K�'��-���=��E��
�'��-��)���E��r=c�pa�VP4pVPR/4pVPpVPVP/4oVPR/4p\;QJd)V3RlVP4F'dKRM	RM!V3RlVP44'dR#VPSV4wrV/p.pVPV,p	V	F&p
W�9d
WZ,Wz&KVPV
4K(	V'd$RPV4p\RVRV2R	7hV#)
r"�sso_sessionsc3�,<"�TF	qS9x�K	R#5ir6r�)r��crs& �r:r��/SSOProvider._load_sso_config.<locals>.<genexpr>F	s����
�-O��^�#�-O�r�FTNrAr�zB" is configured to use SSO but is missing required configuration: r�)
r�rIr��all�_PROFILE_REQUIRED_CONFIG_VARS�_resolve_sso_session_reference�_ALL_REQUIRED_CONFIG_VARSr�rEr)
rir�r"r@r��resolved_config�
extra_reqsr1�missing_config_vars�all_required_configs�
config_var�missingrs
&           @r:�_load_sso_config�SSOProvider._load_sso_config>	s6����)�)�+�
� �$�$�Z��4���)�)��!���d�&8�&8�"�=��$�(�(���<���3�
�-1�-O�-O�
�3�3�3�
�-1�-O�-O�
�
�
��&*�&I�&I��L�'
�#���� ��#�=�=�
�J��.�J��,�%4�%@��"�#�*�*�:�6�	/���i�i� 3�4�G�$�#�L�>�2>�>E�Y�H��
��
r=c�>�VPR4pVfVR3#W29dRVR2p\VR7hVP4pW#,pVP4F=wrxVPWx4V8wdRVRWW,RVR2p\VR7hW�V&K?	VR	3#)
�sso_sessionz+The specified sso-session does not exist: "�"r�zThe value for z" is inconsistent between profile (z) and sso-session (z).r�)r�)rIrr��items)	rirr�rrDr1r9r��vals	&&&      r:r��*SSOProvider._resolve_sso_session_referenceb	s���)�-�-�m�<���#�!�2�%�%��/�E�FV�EW�WX�Y�I�$�y�9�9��$�$�&���0��&�}�}��O�J��z�z�*�*�c�1�$�Z�L�1 � &� 2�3�3F�s�e�2�O��)�9�=�=�!$�:�� /��'�'�'r=c���VP4pV'gR#RVR,RVR,RVR,RVR,RVPR	\VPR
7RVP/pRV9pV'd8VR,VR
&VP
VR&VPPR4MVPPR4\R/VBpVPP4Vn
V'dVPPR4MVPPR4\VP4\VPVPR7#)Nr}�
sso_start_urlr~r0�
sso_role_namer��sso_account_idr?r)r3r3r�rr��CREDENTIALS_PROFILE_SSO�CREDENTIALS_PROFILE_SSO_LEGACY�CREDENTIALS_SSO�CREDENTIALS_SSO_LEGACYr1r�)r�r�rr�r3r{r�r�rur�rfrrUr�r|)ri�
sso_config�fetcher_kwargs�sso_session_in_config�sso_fetchers&    r:r��SSOProvider.loady	sC���*�*�,�
���
��O�4��*�\�2���O�4��*�%5�6��d�2�2��N��1B�1B�C��T�Z�Z�
��!.�� ;�� �1;�M�1J�N�-�.�/3�/C�/C�N�+�,����!�!�";�<����!�!�"B�C�*�<�^�<��"&�"3�"3�"8�"8�":��� ����!�!�"3�4����!�!�":�;��T�.�.�/�-��;�;�%�7�7�
�	
r=)r�r�r�r�r�r{r3)r�r�)r�r~r�)r�r�r�r�r�rrrerfrEr�r��_SSO_REQUIRED_CONFIG_VARSr�rkr�r�r�r�r�r�s@r:r�r�	so����
�F��7�7�-�-�
�����S�&�%��1���%�!�!��
	&�(A�A��"�*"�H(�."
�"
r=r�)r�r�r�r�r6iXr�rNr�)Zr�r�r��loggingrrrr�r��collectionsrr�r�hashlibr�dateutil.parserr�r�dateutil.tzrr	�botocore.compatr��botocore.configloaderr
rr�botocore.configr
�botocore.exceptionsrrrrrrrrr�botocore.tokensr�botocore.useragentrr�botocore.utilsrrrrrrr r!r"�	getLoggerr�rUr#rOrJrbrNr�r�r�r�rPr�r�r�r�rUr_r�r�r�r�r{rMrKrRr�r�rSrOr�rQrLrWrur�r�r=r:�<module>r�s������	����"����!�&����=�"�
�
�
�-�H�
�
�
�
�	�	�8�	$�� ��7�
���&-�"�$+�!�]�@J
�J
�Z'�
,����
� &�$-�-�`v(�[�v(�r	2�%;�2�0F5�F5�R;P�&=�;P�|Z
�"A�Z
�zC"�#�C"�L+�+�\SG�(�SG�l�1��<L!�$�L!�^ �,� �F5+�1�5+�pC+�'�C+�L+�%�+�\U�+�U�p
b
�(:�b
�JU �U �pQ-�*�Q-�ha�a�Hd�2�d�ND
�$�D
r=

Youez - 2016 - github.com/yon3zu
LinuXploit