Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions src/snowflake/connector/wif_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,23 @@ def create_aws_attestation(
# TODO: SNOW-2223669 Investigate if our adapters - containing settings of http traffic - should be passed here as boto urllib3session. Those requests go to local servers, so they do not need Proxy setup or Headers customization in theory. But we may want to have all the traffic going through one class (e.g. Adapter or mixin).
session = get_aws_session(impersonation_path)

# enable_aws_get_web_identity_token_for_wif = os.environ.get(
# "ENABLE_AWS_GET_WEB_IDENTITY_TOKEN_FOR_WIF"
# )
# if (
# enable_aws_get_web_identity_token_for_wif
# and enable_aws_get_web_identity_token_for_wif.lower() == "true"
# ):
# response = session.client("sts").get_web_identity_token(
# Audience=[SNOWFLAKE_AUDIENCE],
# SigningAlgorithm="RS256",
# )
# return WorkloadIdentityAttestation(
# AttestationProvider.AWS,
# response["WebIdentityToken"],
# {"region": region, "partition": partition},
# )

aws_creds = session.get_credentials()
if not aws_creds:
raise ProgrammingError(
Expand Down
Loading