Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Overview

Updated on 2024-09-29 GMT+08:00

Function

Each time a client calls an OBS API, the HTTP request must be signed, so the server can verify the request signature and ensure secure access. By verifying a signature, OBS:

  • Prevents unauthorized access. As signatures carry user information, OBS can verify the user information carried in a signature to check if any unauthorized users are attempting to access resources.
  • Prevents in-transit data tampering. OBS compares the signature it received with the one it calculated to check if data was ever tampered with in transit.
  • Prevents the signature abuse. Signatures have validity periods, which help reduce the risk of an unauthorized party reusing it for malicious purposes.

Signing and Verification

Figure 1 shows how a signature is calculated and verified.

Figure 1 Signing and verification
Table 1 Signing and verification

Executor

No.

Step

Description

Client

1

HTTP request constructed.

An API request contains a URI, method, and headers, as well as an optional body. For details, see Constructing a Request.

2

Signature S calculated.

The signature is calculated based on the constructed request and an access key. You can calculate a signature (S) by:

3

S added to the request.

You can add a signature to:

4

S-carried request sent.

Your client sends the request that carries the signature to a server.

OBS server

5

Request received.

The server receives the request from the client.

6

Signature authenticated.

The server calculates a signature (S') based on the received request and the access key you provided and compares S' with the received signature S. If they match, the authentication is successful. Otherwise, the request is rejected.

7

API response returned.

  • If the authentication is successful, the server processes the request and then returns the processing result.
  • If the authentication fails, the server returns the status code 403 Forbidden and error code SignatureDoesNotMatch. To fix this issue, see Why Don't the Signatures Match?

Client

8

Response received from server.

Your client receives a response from the server.

Comparison Between Signature Carrying Methods

OBS can carry a signature in a header, URL, or browser-based upload. The third method is limited to making POST requests through a browser. The first two methods are compared in the following table:

Table 2 Comparison between carrying a signature in a header and in a URL.

Item

Carrying Signature in Header

Carrying Signature in URL

Application

Using a header is the recommended method of carrying a signature in most cases.

Using a pre-signed URL is useful if you want to grant only temporary access. With this method, you do not need to provide your access key to third parties. You instead provide them a pre-signed URL. Be aware of the potential risk as this method will expose your data to Internet within the validity period.

A pre-signed URL is recommended for accessing OBS through a browser.

Expires support

No

Yes

Date support

Yes

No

Common APIs

All OBS APIs

GET and PUT

Time formatting

The Date header indicates when the request was generated, recorded using Greenwich Mean Time (GMT) in the RFC 1123 format.

If the value of Date is over 15 minutes away from the current server time, the server returns 403, indicating that the request is invalid.

The Expires header indicates how long the pre-signed URL is valid, measured in seconds. When the specified period elapses, the pre-signed URL expires.

URL encoding required

No

Yes

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback