Skip to content

Commit

Permalink
fix: token type retrieved in WebIdentity provider (#1446)
Browse files Browse the repository at this point in the history
  • Loading branch information
donatello authored Sep 28, 2024
1 parent d31ff33 commit adca8ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions minio/credentials/providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ def retrieve(self) -> Credentials:

if self._is_web_identity():
query_params["Action"] = "AssumeRoleWithWebIdentity"
query_params["WebIdentityToken"] = jwt.get("access_token", "")
query_params["WebIdentityToken"] = jwt.get("id_token", "")
if self._role_arn:
query_params["RoleArn"] = self._role_arn
query_params["RoleSessionName"] = (
Expand All @@ -666,7 +666,7 @@ def retrieve(self) -> Credentials:
)
else:
query_params["Action"] = "AssumeRoleWithClientGrants"
query_params["Token"] = jwt.get("access_token", "")
query_params["Token"] = jwt.get("id_token", "")

url = self._sts_endpoint + "?" + urlencode(query_params)
res = _urlopen(self._http_client, "POST", url)
Expand Down

0 comments on commit adca8ad

Please sign in to comment.