Skip to content

[Bug] Obtain inconsistent STS tokens #55

@yesgibbs

Description

@yesgibbs

https://github.com/aliyun/credentials-python/blob/master/alibabacloud_credentials/credentials.py
Image

The code here has correctness issues when the token cache is about to expire. The access_key, secret_key, and security_token form a triplet that must be used together. Currently, refreshing the token logic independently for each value retrieval could lead to inconsistencies in the upper layer obtaining mismatched AK/SK/token combinations during expiration boundaries. Instead of returning individual elements of the triplet separately, they should be enforced to be returned as a whole. This has essentially dug a pit for the calling code to fall into.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions