Skip to main content

Huawei OBS

Connect your Huawei Object Storage Service (OBS) bucket to store GitSec backups.

Prerequisites

  • A Huawei Cloud account with OBS access.
  • An OBS bucket created in your desired region.
  • An IAM user with programmatic access and the required OBS permissions.
  • The Access Key ID and Secret Access Key for the IAM user.

Setup Steps

  1. Navigate to Storage in the sidebar.
  2. Click Add Storage Provider.
  3. Select the Huawei OBS card.
  4. Fill in the connection form:
FieldDescription
Connection NameA unique, friendly name to identify this storage provider (e.g., "Production Huawei OBS Mexico").
Bucket NameThe name of your OBS bucket. Cannot be changed after creation.
RegionThe Huawei Cloud region where the bucket is located. Cannot be changed after creation.
Access Key IDThe access key for your Huawei Cloud IAM user.
Secret Access KeyThe secret key for your Huawei Cloud IAM user.
  1. Click Test Connection to verify GitSec can access the bucket.
  2. If the test succeeds, click Add Storage to complete the setup.
tip

Click Show Huawei OBS Instructions on the form for step-by-step guidance.

Create an OBS Bucket

  1. Go to Huawei Cloud Console > Object Storage Service (OBS).
  2. Click Create Bucket.
  3. Enter a unique bucket name.
  4. Select your preferred region.
  5. You can leave other settings at their default values.

IAM User and Access Key Setup

Step 1: Create a Policy

  1. Go to Huawei Cloud Console > IAM > Permissions > Policies/Roles > Create Custom Policy.
  2. Set the policy name (e.g., OBSBackupPolicy).
  3. Use the JSON editor and configure the following policy:
{
"Version": "1.1",
"Statement": [
{
"Effect": "Allow",
"Action": [
"obs:bucket:CreateBucket",
"obs:object:PutObject",
"obs:object:GetObject",
"obs:object:DeleteObject",
"obs:bucket:ListBucket"
]
}
]
}

Specify the correct bucket name in resources if you want to restrict access to specific buckets.

info

You can also use the built-in OBS Administrator policy, but it has more permissions than needed. Creating a custom policy with least privilege is recommended.

  1. Go to IAM > User Groups > Create User Group.
  2. Set the group name (e.g., BackupUsers).
  3. Attach the policy you created above to this group. The selected permissions will take effect after 15 to 30 minutes.
  4. Click OK to create.

Huawei recommends managing policies through user groups for easier permission management across multiple users.

Step 3: Create an IAM User

  1. Go to IAM > Users > Create User.
  2. Set the username (e.g., backup-service-user).
  3. Set Access Type to Programmatic access.
  4. Set Credential Type to Access Key.
  5. Add the user to the group you created.
  6. Click Next and complete the creation.

Step 4: Create Access Key

  1. Go to the user details page.
  2. Navigate to the Security Settings tab.
  3. Click Create Access Key in the Access Keys section.
  4. Confirm the checkbox about reading recommendations.
  5. Save your Access Key ID and Secret Access Key immediately.
caution

Access keys are only shown once. Download and store them securely before closing the dialog.

Security Best Practices

  • Access keys are only shown once — download and store them securely.
  • Never share your secret access key.
  • Rotate your access keys regularly.
  • Use separate IAM users for different applications.

For more details, see the Huawei Cloud OBS Documentation and Huawei Cloud IAM Best Practices.