A Huawei Cloud access key is a pair: an Access Key ID (AK) and a Secret Access Key (SK). Together they let a program call the Huawei Cloud APIs as the IAM user the key belongs to, which can mean storage buckets, virtual machines, databases and networks, depending on that user’s permissions. The ID alone cannot sign requests, so a leaked ID is a warning rather than a breach, but it usually sits next to the secret, so treat both as exposed. Disable the pair first, then find out what it did.
Check your GitHub account for leaked secrets — free
- Provider
- Huawei Cloud
- Severity
- Medium
- Impact
- Cloud infrastructure access
- Checked live by LeakWatch
- No
What a Huawei Cloud Access Key looks like
The Access Key ID is 20 characters, uppercase letters and digits, with no fixed prefix:
XXXXXXXXXXXXXXXXXXXX Huawei Cloud Access Key ID (masked, 20 characters)
The Secret Access Key is a longer value kept separately; it is shown once, when the key is created, and usually downloaded as a credentials file. Because the ID has no prefix, it cannot be told apart from other identifiers by shape. What identifies it is context: variable names like HUAWEICLOUD_SDK_AK and HUAWEICLOUD_SDK_SK used by the official SDKs, Terraform provider settings for Huawei Cloud, the access_key and secret_key fields of the OBS tools, or a downloaded credentials file. The same IDs are also used for OBS (object storage) access. Temporary credentials issued through a token are a different mechanism and expire on their own.
How Huawei Cloud access keys get leaked
- SDK and CLI configuration. Scripts that set the key and secret as constants, or an SDK sample with the placeholders replaced by real values and committed.
- Terraform and infrastructure code. Provider blocks with the
access_keyandsecret_keywritten in the file, or a committed variables file. - Environment files.
.envfiles and Docker compose files that carryHUAWEICLOUD_SDK_AKand its secret. - Downloaded credentials files. The file offered when the key is created, left in a repository, a shared drive or a backup.
- Continuous integration. Pipeline definitions with the pair in clear text, or debug output that prints the environment.
What to do in the first hour
- Find the key in IAM. Sign in to the Huawei Cloud console with the account that owns the IAM user, and open the page where that user’s access keys are listed (see the link below). Match the leaked ID with the one in the list.
- Disable it, then delete it. Disabling stops the key from working at once and can be reversed if you made a mistake. Once you have checked that nothing legitimate depends on it, delete it. Create a replacement pair before you delete, if a service needs one.
- Deploy the new pair to the application or secret store, and check that your jobs still run.
- Audit the activity. Use the audit service of the platform, Cloud Trace Service, to look at operations performed with the key since the exposure. Look for resources you did not create, particularly virtual machines, new IAM users, changed policies and storage downloads.
- Check the permissions. Review what the IAM user could do. If it had broad rights, tighten them, and prefer separate users with narrow policies for each application.
- Look for persistence. Check for new users and keys, security group changes and objects in storage that you did not upload.
- Clean up the code and look for other secrets next to the key. See I accidentally pushed an API key to GitHub.
Not sure what else leaked from the same repository? Run a free scan.
Revoke it at Huawei Cloud
Access keys are managed in the IAM area of the Huawei Cloud console, in the page that lists the access keys of a user, after you sign in as the owner of that key or as an administrator who can manage it. Disable or delete the exposed key there. A person has not confirmed the exact menu wording for this guide, and the console can change, so if the page differs from this description, look for the section where access keys are created and listed, and follow the Huawei Cloud IAM documentation on access keys.
How LeakWatch detects it
The rule is called Huawei Cloud Access Key (contextual). Since the ID has no prefix, the rule relies on context: the word huawei, in any letter case, followed within 20 word, dot or dash characters by a colon or an equals sign, optional quotes and spaces, and then exactly 20 letters or digits. So HUAWEICLOUD_SDK_AK: … and huawei_access_key = "…" are reported, while a 19-character value, a variable named for another vendor, or a bare 20-character string with no context is not. Because the whole pattern is case-insensitive, a lowercase value is also accepted. The severity is medium, the lowest of the cloud key rules, because the ID alone does not authenticate anything without the secret and the pattern is not very specific. This type is not checked live: LeakWatch does not send any request to Huawei Cloud with the value it found.
LeakWatch detects this format but does not check it live: it can tell you the key is exposed, not whether it still works. Assume it does until you have revoked it.
FAQ
Is the Access Key ID alone dangerous?
Not by itself, since requests are signed with the secret. But the two are usually stored together, so assume the secret leaked as well and replace the pair.
Can I get the secret back for an existing key?
No. The secret is shown only when the key is created. If it is lost, you create a new key and delete the old one.
How do I know whether the key was used by someone else?
Look at the audit records for the period since the exposure, and at the resources in each region. Check for sources and locations you do not recognize.