googleapis / googleapis/google-cloud-python

AWS Workload Identity Federation

Đang mở
#15,186 3 bình luận 4 reaction 2 người được giao Được @BigTailWolf nhận Xem trên GitHub
Ngôn ngữ chính
Python
Star
5.4k
Fork
1.8k
Merge trung bình
3 ngày 4 giờ
Pull request đã merge (30 ngày)
122

Mô tả

Hey, do you have some documentation on how to use this lib with AWS and Workload Identity Federation?

The code below is given me the following error
```
cred = aws.Credentials.from_file("./work-identify-pool.json")
request = google.auth.transport.requests.Request()
aws_cred = cred.refresh(request)
```

```
{
"errorMessage": "('Unable to acquire impersonated credentials', '{\\n \"error\": {\\n \"code\": 400,\\n \"message\": \"Request contains an invalid argument.\",\\n \"status\": \"INVALID_ARGUMENT\"\\n }\\n}\\n')",
"errorType": "RefreshError",
"requestId": "",
"stackTrace": [
" File \"/var/lang/lib/python3.10/importlib/__init__.py\", line 126, in import_module\n return _bootstrap._gcd_import(name[level:], package, level)\n",
" File \"\", line 1050, in _gcd_import\n",
" File \"\", line 1027, in _find_and_load\n",
" File \"\", line 1006, in _find_and_load_unlocked\n",
" File \"\", line 688, in _load_unlocked\n",
" File \"\", line 883, in exec_module\n",
" File \"\", line 241, in _call_with_frames_removed\n",
" File \"/var/task/main.py\", line 20, in \n aws_cred = cred.refresh(request)\n",
" File \"/var/task/google/auth/external_account.py\", line 360, in refresh\n self._impersonated_credentials.refresh(request)\n",
" File \"/var/task/google/auth/impersonated_credentials.py\", line 247, in refresh\n self._update_token(request)\n",
" File \"/var/task/google/auth/impersonated_credentials.py\", line 276, in _update_token\n self.token, self.expiry = _make_iam_token_request(\n",
" File \"/var/task/google/auth/impersonated_credentials.py\", line 104, in _make_iam_token_request\n raise exceptions.RefreshError(_REFRESH_ERROR, response_body)\n"
]
}
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.