Skip to content

Commit

Permalink
fix: parse tuple credentials (#302)
Browse files Browse the repository at this point in the history
* Enhance security by introducing credential providers

Implemented the concepts of 'credentials' and 'credential providers'
to eliminate the need for hardcoding access keys in the codebase. Us-
ers can now securely obtain credentials via third-party SDKs, suppo-
rting retrieval from services like KMS and environment variables. This
enhancement aligns with best practices for cloud service interaction
and adds flexibility for custom use cases.

Signed-off-by: Zeyu Zhang <zhangzeyu.zzy@alibaba-inc.com>

* Retrieve credentials from providers

Signed-off-by: Zeyu Zhang <zhangzeyu.zzy@alibaba-inc.com>

* fix: parse tuple credentials

Signed-off-by: Zeyu Zhang <zhangzeyu.zzy@alibaba-inc.com>

* bump version to 0.9.10

Signed-off-by: Zeyu Zhang <zhangzeyu.zzy@alibaba-inc.com>

---------

Signed-off-by: Zeyu Zhang <zhangzeyu.zzy@alibaba-inc.com>
  • Loading branch information
zeyu-zh authored Aug 9, 2024
1 parent 97bd68f commit 9552eef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion aliyun/log/logclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,8 @@ def _replace_credentials(self):
self._last_refresh = time.time()
for tries in range(DEFAULT_REFRESH_RETRY_COUNT + 1):
try:
self._auth = make_auth(StaticCredentialsProvider(self._credentials_auto_refresher()),
credentials = self._credentials_auto_refresher()
self._auth = make_auth(StaticCredentialsProvider(credentials[0], credentials[1], credentials[2]),
self._auth_version, self._region)
except Exception as ex:
logger.error(
Expand Down
2 changes: 1 addition & 1 deletion aliyun/log/version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = '0.9.9'
__version__ = '0.9.10'

import sys
OS_VERSION = str(sys.platform)
Expand Down

0 comments on commit 9552eef

Please sign in to comment.