File manager - Edit - /usr/local/CyberPanel/lib/python3.10/site-packages/google/auth/__pycache__/aws.cpython-310.pyc
Back
o �h� � @ s> d Z ddlZddlmZ ddlZddlZddlmZ ddl Z ddl Z ddlZddlZddl mZ ddlZddlmZ ddlmZ ddlmZ ddlmZ dd lmZ d ZdZdZd ZdZdZG dd� de�Zdd� Zdd� Z dd� Z!di fdd�Z"eG dd� d��Z#G dd� dej$d�Z%G d d!� d!e%�Z&G d"d#� d#ej'�Z'dS )$a AWS Credentials and AWS Signature V4 Request Signer. This module provides credentials to access Google Cloud resources from Amazon Web Services (AWS) workloads. These credentials are recommended over the use of service account credentials in AWS as they do not involve the management of long-live service account private keys. AWS Credentials are initialized using external_account arguments which are typically loaded from the external credentials JSON file. This module also provides a definition for an abstract AWS security credentials supplier. This supplier can be implemented to return valid AWS security credentials and an AWS region and used to create AWS credentials. The credentials will then call the supplier instead of using pre-defined methods such as calling the EC2 metadata endpoints. This module also provides a basic implementation of the `AWS Signature Version 4`_ request signing algorithm. AWS Credentials use serialized signed requests to the `AWS STS GetCallerIdentity`_ API that can be exchanged for Google access tokens via the GCP STS endpoint. .. _AWS Signature Version 4: https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html .. _AWS STS GetCallerIdentity: https://docs.aws.amazon.com/STS/latest/APIReference/API_GetCallerIdentity.html � N)� dataclass)�Optional)�urljoin)�_helpers)�environment_vars)� exceptions)�external_accountzAWS4-HMAC-SHA256�aws4_requestzx-amz-security-tokenz x-amz-datezNhttps://sts.{region}.amazonaws.com?Action=GetCallerIdentity&Version=2011-06-15�300c @ s&