Access control

BOS

  • Function Release Records
  • Product Announcement
  • S3
    • Overview
    • Compatible Interfaces
    • Compatible Signature Authentication
    • Service domain
    • Compatible Common Headers
    • Compatible Tools
  • Security and compliance
    • Overview
    • Monitoring and Audit
    • Data Disaster Recovery
    • Access control
    • Data protection
    • Data Retention Compliance
    • Data encryption
  • API Reference
    • Interface Specifications
    • Audio and Video Processing Interface
    • Access control
    • Introduction
    • Error code
    • Upload callback
    • Service-Related Interface
      • ListBuckets
      • Quota management
        • DeleteUserQuota
        • PutUserQuota
        • GetUserQuota
    • Image Moderation Service Interface
      • Politician Recognition (Politician)
      • Disgusting Image Recognition (Disgust)
      • API description
      • Watermark and QR Code Recognition (Watermark)
      • Face Detection (Face)
      • Image Quality Recognition (Quality)
      • General Text Recognition (OCR)
      • Pornography Recognition (Antiporn)
      • Public Figure Recognition (Public)
      • Terror Recognition (Terror)
    • Multipart Upload-Related Interface
      • AbortMultipartUpload
      • ListMultipartUploads
      • ListParts
      • User guide
      • UploadPart
      • InitiateMultipartUpload
      • UploadPartCopy
      • CompleteMultipartUpload
    • Bucket-Related Interface
      • Original image protection
        • PutBucketCopyrightProtection
        • GetCopyrightProtection
        • DeleteCopyrightProtection
      • Tag Management
        • PutBucketTagging
        • DeleteBucketTagging
        • GetBucketTagging
      • Quota management
        • PutBucketQuota
        • GetBucketQuota
        • DeleteBucketQuota
      • Data encryption
        • GetBucketEncryption
        • DeleteBucketEncryption
        • PutBucketEncryption
      • Event notification
        • PostResult
        • DeleteNotification
        • PostEvent
        • GetNotification
        • PutNotification
      • Recycle bin
        • DeleteBucketTrash
        • GetBucketTrash
        • PutBucketTrash
      • Data synchronization
        • GetBucketReplicationProgress
        • ListBucketReplication
        • GetBucketReplication
        • PutBucketReplication
        • DeleteBucketReplication
      • Cross-Origin Access
        • GetBucketCors
        • PutBucketCors
        • DeleteBucketCors
      • Mirror back-to-origin
        • PutBucketMirroring
        • DeleteBuketMirroring
        • GetBucketMirroring
      • Basic Operations
        • GetBucketLocation
        • HeadBucket
        • PutBucketStorageclass
        • PutBucket
        • GetBucketStorageClass
        • DeleteBucket
      • Lifecycle
        • DeleteBucketLifecycle
        • GetBucketLifecycle
        • PutBucketLifecycle
      • Permission control
        • PutBucketAcl
        • GetBucketAcl
      • Compliance retention
        • ExtendBucketObjectLock
        • DeleteBucketObjectLock
        • CompleteBucketObjectLock
        • InitBucketObjectLock
        • GetBucketObjectLock
      • Bucket inventory
        • GetBucketInventory
        • ListBucketInventory
        • DeleteBucketInventory
        • PutBucketInventory
      • Requester Pays
        • GetBucketRequestPayment
        • PutBucketRequestPayment
      • Static Website
        • PutBucketStaticWebsite
        • DeleteBucketStaticWebsite
        • GetBucketStaticWebsite
      • Versioning
        • PutBucketVersioning
        • GetBucketVersioning
      • Logging
        • DeleteBucketLogging
        • GetBucketLogging
        • PutBucketLogging
    • Object-Related Interface
      • Object Tag
        • PutObjectTagging
        • GetObjectTagging
        • DeleteObjectTagging
      • Basic Operations
        • CopyObject
        • ListObjects
        • FetchObject
        • GetObjectMeta
        • PostObject
        • listObjectVersions
        • DeleteObject
        • PutObject
        • AppendObject
        • DeleteMultipleObjects
        • RestoreObject
        • GetObject
        • OPTIONSObject
      • Soft links
        • GetSymlink
        • PutSymlink
      • Permission control
        • GetObjectAcl
        • PutObjectAcl
        • DeleteObjectAcl
      • Select scanning
        • SelectObject
  • Console Operation Guide
    • Hierarchical Namespace Bucket Operation Instructions
    • Configuring BOS Multi-User Access Control
    • Image Service
    • Operation preparation
    • Favorite Path
    • Quota management
    • Linkage with Baidu Netdisk sharing
    • Online data import
    • Statistics and monitoring
    • Intelligent Business Analysis
    • Event Notification and Data Processing
    • View and export usage data
    • Image Review Service
    • Automatic file decompression
    • Data Publishing
      • Data Publishing Introduction
      • Global Acceleration
      • Creating a Bucket Custom Domain Name
      • Viewing Bucket Official Domain Name
      • Configure Cache Management
      • Enabling CDN Official Acceleration Domain Name
      • Configuring CDN Upload Acceleration
    • Global Settings
      • VPC Access Control
    • Managing Bucket
      • Set static website hosting
      • Setting Up Log Query
      • Set referer allow list
      • Create bucket
      • Set cross-origin access
      • Set bucket trash
      • Set mirror back-to-origin
      • Set access logs
      • Set server-side encryption
      • Set storage inventory
      • Managing Bucket Tag
      • Querying Bucket
      • Data access trend analysis
      • Bucket quota management
      • Set compliance retention
      • Bucket overview
      • Set data synchronization
      • Setting Up Versioning
      • Requester Pays
      • Delete bucket
      • Managing Lifecycle
        • Overview
        • Configure intelligent tiering
        • Configuring Basic Lifecycle Management
        • Basic Lifecycle Management Usage Instructions
          • Lifecycle Rule Based on Last Accessed Time
          • Lifecycle Rule Based on Last Modified Time
      • Set bucket read-write permissions
        • Permission Introduction
        • Set bucket read-write permissions
    • Manage object
      • Setting Symlink
      • Select scanning
      • Setting Meta Information
      • Share files - get file URLs
      • Parts management
      • Folder sharing
      • Restore Archived Files
      • Delete file
      • Copy and move files
      • Delete folders in batches
      • Batch Managing Object
      • Folder statistics
      • Renamed files
      • Convert file storage class
      • Set file permissions
      • Download file
      • Querying Object
      • Upload files
      • Managing Folder
      • Object Tag
  • Managing Bucket
    • Set static website hosting
    • Set referer allow list
    • Create bucket
    • Set bucket trash
    • Set mirror back-to-origin
    • Set access logs
    • Set server-side encryption
    • Set storage inventory
    • Managing Bucket Tag
    • Bucket quota management
    • Set compliance retention
    • Bucket overview
    • Set data synchronization
    • Requester Pays
    • Delete bucket
    • _Archive
      • Set static website hosting
      • Set referer allow list
      • Create bucket
      • Set cross-origin access
      • Set bucket trash
      • Set mirror back-to-origin
      • Set access logs
      • Set server-side encryption
      • Set storage inventory
      • Managing Bucket Tag
      • Querying Bucket
      • Bucket quota management
      • Set compliance retention
      • Bucket overview
      • Set data synchronization
      • Requester Pays
      • Delete bucket
    • Set bucket read-write permissions
      • Permission Introduction
      • Set bucket read-write permissions
      • _Archive
        • Permission Introduction
        • Set bucket read-write permissions
  • Content Review
    • Video Review
    • Image audit
  • Service Level Agreement (SLA)
    • BOS Service Level Agreement SLA (V3_0)
    • Baidu AI Cloud Object Storage (BOS) Trusted Cloud Certification
  • Data processing
    • Image audit
    • Data Processing FAQs
    • Document preview
    • Video frame capture
    • Instant video transcoding
    • Data Processing Introduction
    • Image Processing Terminology Explanation
    • Multimedia cloud processing
    • Get video metadata
    • General Image Settings
      • Original image protection
    • Intelligent Recognition
      • Overview
    • Image Processing Guide V2_0
      • Removing Metadata
      • Image Scaling
      • Image Brightness
      • Getting Image Information
      • Image Blur
      • Usage rules
      • Image Resizing
      • Quality Transformation
      • Format conversion
      • Progressive Display
      • Image Sharpening
      • Grayscale Transformation
      • Image Contrast
      • Image Rotation
        • Normal Rotation
        • Adaptive Rotation
      • Intelligent Processing
        • Intelligent Processing Usage Rules
        • Intelligent Scenarios
          • Lossless magnification
          • Portrait Cartoonization
          • Sky Segmentation
          • Style conversion
          • Black and white coloring
          • Stretch Restoration
          • Object erasure
        • Intelligent Effects
          • Intelligent Contrast
          • Intelligent Sharpness
          • Intelligent defogging
          • Intelligent Color Grading
      • Image Cropping
        • Rounded-corner rectangle cropping
        • Incircle Crop
        • Normal Crop
        • Index Crop
      • Image Watermark
        • Add Image-Text Mixed Watermark
        • Add Text Watermark
        • Add image watermark
    • Image Processing Guide V1_0
      • Image Cropping
      • Getting Image Information
      • Image Thumbnailing
      • Usage rules
      • Quality Transformation
      • Format conversion
      • Watermark
      • Progressive Display
      • Image Rotation
  • Peripheral Tools
    • fsspec-bosfs
    • Peripheral Tools Overview
    • BOS-FTP Tool
    • Download Zone
    • BOS-AlluxioExtension Tool
    • BOS-PC Client
      • FAQs
      • User guide
      • Installation and Login
    • BOS-HDFS Tool
      • Overview
      • Configuration and Usage
      • Big Data Component Usage Guide
        • DataX Reading and Writing BOS
        • Hive Usage Guide
        • Presto Usage Guide
        • Spark Usage Guide
        • Flume Data Storage to BOS
        • Flink Usage Guide
        • Impala Usage Guide
    • BOS-Probe Error Detection Tool
      • Overview
      • Suggestions and Report Viewing
      • Checking Uploads and Downloads via BOSProbe
      • Installing BOSProbe
    • Docker
      • Overview
    • BOS-CMD Command-Line Tool
      • Configure BCECMD Command-Line Completion
      • Install BOSCMD
      • Overview
      • FAQs
      • Use BOS Service via CMD
      • BOS CMD Common Issues
      • BOSCMD Version Change Records
      • Configure BOSCMD
    • BOS-Import Data Cloud Migration Tool
      • Configuration file
      • Deployment methods
      • Overview
      • Version records
      • Exception handling
      • Log
      • Task Progress Recovery
    • BOS-FS Mount Tool
      • Operations and Practices
      • Overview
      • Version Change Records
      • FAQs
      • Install
      • Configuration
    • BOS-API Generation Tool
      • Overview
      • Service-Related Interface
        • List Buckets
        • Quota management
          • Delete User Credit Quota Settings
          • Get User Credit Quota Information
          • Set User Credit Quota
      • Image Moderation Service Interface
        • Image Review Interface
      • How to Call the API
        • Authentication
        • Construct a Request
        • Return a Response
      • Bucket Data Synchronization Related Interfaces
        • Retrieving the Process Status of Data Synchronization for a Specified ID in a Bucket
        • Setting Up Bucket Data Synchronization
        • Deleting the Synchronization Replication Configuration of a Specified ID in a Bucket
        • Listing All Replication Synchronization Rules of a Bucket
        • Retrieving Bucket Data Synchronization Information
      • Bucket-Related Interface
        • Original image protection
          • Disabling Bucket Original Image Protection Configuration
          • Get the original image protection configuration of bucket
          • Enable the original image protection function of bucket
        • Data encryption
          • Check If Encryption Is Enabled for a Bucket
          • Disable Server-Side Encryption (SSE) for a Bucket
          • Enable Encryption for a Bucket
        • Event notification
          • Setting Up Bucket Notification Rules
          • Retrieving Bucket Notification Rules
          • Pushing ImageOcr and ImageClassify Messages
          • Deleting Bucket Notification Rules
          • Pushing Event Messages
        • Recycle bin
          • Retrieving the Activation Status of the Bucket Recycle Bin
          • Disabling Bucket Recycle Bin Functionality
          • Enabling Bucket Recycle Bin Functionality
        • Cross-Origin Access
          • Get Cross-Origin Resource Sharing (CORS) Rules Set on a Specified Bucket
          • Disable Cross-Origin Resource Sharing (CORS) Rule on a Specified Bucket
          • Set a Cross-Origin Resource Sharing (CORS) Rule on a Specified Bucket
        • Basic Operations
          • List Buckets
          • Cross-Origin Query
          • Create a bucket
          • Get the Default Storage Class of a Bucket
          • List Objects in a Bucket
          • Set default bucket storage class
          • Get the Region of a Bucket
          • Check If a Bucket Exists and Whether the Requester Has Permission to Access the Bucket
          • Delete bucket
        • Lifecycle
          • Get Lifecycle Management Rules for a Bucket
          • Delete Lifecycle Management Rules for a Bucket
          • Set Lifecycle for a Bucket
        • Permission control
          • Set bucket access permissions
          • Get Access Permission for a Bucket
        • Compliance retention
          • Retrieving Bucket Compliance Retention Policies
          • Deleting Compliance Retention Policies
          • Locking Bucket Compliance Retention Policies
          • Delaying the Protection Period of Bucket Compliance Retention Policies
          • Initializing Compliance Retention Policies
        • Static Website
          • Set static website hosting
          • Delete Static Website Hosting Information for a Bucket
          • Get Static Website Hosting Information for a Bucket
        • Logging
          • Enable bucket access logs
          • Disable Access Log Configuration for a Bucket
          • Get Access Log Configuration for a Bucket
      • Object-Related Interface
        • Basic Operations
          • Get Meta Information of an Object
          • Restore Archived Files
          • Get an Object
          • Fetch an Object and Store It in a Bucket
          • Delete Multiple Objects
          • Delete Object
        • Soft links
          • Retrieve a symlink
          • Create a symlink
        • Permission control
          • Set access permission for an object
          • Delete Access Permission for an Object
          • Get Access Permission for an Object
        • Select scanning
          • Execute SQL Statement on an Object
    • MoonBox Physical Migration Device
      • MoonBox introduction
      • MoonBox Operation Process
    • BOS Connector for PyTorch
      • Overview
      • Functionality and Usage Instructions
      • Reading and Writing Checkpoints
      • Installing BOS Connector for Pytorch
      • Building a Dataset
      • Configuring BOS Connector for Pytorch
      • Performance test
    • BOS-CLI Command-Line Tool (Old Version)
      • Overview
      • Version Change Records
      • Configure BOSCLI
      • Install BOSCLI
      • Use BOS Service via CLI
    • BOS-Util Batch Operation Tool
      • Overview
      • Version Change Records
      • Install BOS-Util
      • Using BOS Service via BOS-Util
    • Third-party tools
      • rclone
      • S3 Browser
      • MinIO
      • Goofys
      • Other Tools
  • Typical Practices
    • Using BOS as Backend Storage Service for Jfrog Artifactory
    • How to Solve Browser Cross-Origin CORS Issues
    • Using HTTPDNS Service via Android SDK
    • Client-Side Encryption Practice
    • BOS Dedicated Line Back-to-Origin IDC Best Practices
    • Presto Practice Based on BOS
    • Accessing BOS via Dedicated Line-VPN in Hybrid Cloud
    • CDN Dynamic Acceleration Uploading Data to BOS
    • HTTPS Transmission Encryption Practice
    • Using CDN to Accelerate BOS
    • Hotlink Protection
    • AWS Lambda Synchronizing S3 Data to BOS
    • Impala Practice Based on BOS
    • Direct Upload of Web Data to BOS
      • Advanced Chapter I - STS Temporary Authentication
      • Basic Chapter - Directly Uploading Files to BOS in the Browser
      • Advanced Chapter II - Handling Older Versions of IE via the PostObject Interface
      • Principle Chapter III - STS Temporary Authentication
      • Principle Chapter I - Directly Uploading Files to BOS in the Browser
      • Principle Chapter II - Upload large file in parts
    • Data Migration
      • Migrating Data from Third-Party Clouds to BOS
      • Migrating Local Data to BOS
      • Scenario overview
    • Mobile Photo Editing App Practice
      • Overview and Scenario Introduction
      • Code example
      • Solution Practice - Building the Photo Editing App
      • Solution Practice - Using the Photo Editing App
    • Accessing BOS via Python API Request
      • Upload File to Bucket via PUT Request
      • Basics (Must-Read) - Generation of authentication string
      • Download Bucket File to Local via GET Request
  • FAQs
    • Certification and permission management
    • Image Service
    • Security Problems
    • Bucket Domain Name Request Style
    • General Problems
    • Object upload-download and management
    • Data Migration and Backup
    • Billing Problems
    • API & SDK & Tools
    • Common Questions Overview
    • Bucket access and management
    • Analysis and Statistic
    • Performance-related questions
  • Video Zone
    • Accessing BOS Resources via Domain Name
    • Object upload
    • Understanding BOS
    • BOS Tiered Storage
  • Quick Start
    • Create bucket
    • Get Object
    • Upload Object
    • Quick Start Guide
    • Getting Started with BOS
    • Delete Object
    • Delete bucket
  • Product pricing
    • Billing Cases
    • Insufficient Balance and Debt Reminder
    • View Consumption Details
    • Billing FAQs
    • Product price
      • Resource Package Price List
      • Pay-As-You-Go Charge Type
      • Pay-As-You-Go Price List
        • Traffic Price
        • Storage prices
        • Data Processing Price
        • Request Price
      • Resource Package Charge Type
        • Resource Package Deduction Rules
        • Resource Package Overview
      • Resource Package Price List - Deprecated
        • Internet downlink traffic package
        • Infrequent access storage package
        • Back-to-origin traffic package
        • Archive storage package
        • Cold storage package
        • Standard storage package
    • Charge Item Introduction
      • Traffic fees
      • Storage Cost
      • Request fees
      • Data processing fees
      • Charge Item Overview
  • SDK
    • SDK Overview
    • Harmony-SDK
      • Overview
      • Version Change Records
      • Initialization
      • Install the SDK Package
      • Exception handling
      • Log
      • Bucket management
        • Create Bucket
        • Bucket permission control
        • View the region to which a bucket belongs
        • Bucket Storage Class Setting and Query
        • View bucket list
        • Check if bucket exists
        • Delete bucket
      • Object management
        • Object permission control
        • Multipart upload of objects
        • Get Object
        • View the object in the bucket
        • Copy Object
        • Upload Object
        • Delete Object
    • Ruby-SDK
      • Overview
      • Version Change Records
      • Initialization
      • Install the SDK Package
      • SDK Logging
      • Exception handling
      • Bucket management
        • Create Bucket
        • List buckets
        • Overview
        • Bucket permission management
        • View the region to which a bucket belongs
        • Check if bucket exists
        • Delete bucket
      • File management
        • Object permission control
        • Change file storage class
        • Get file download URL
        • Delete file
        • Copy Object
        • Download file
        • Upload files
        • List files in the storage space
        • Get and update file meta information
        • Check if a file exists
    • Python-SDK
      • Overview
      • Version Change Records
      • Initialization
      • FAQs
      • Install the SDK Package
      • Exception handling
      • Log Control
      • Bucket management
        • Bucket cross-origin resource access
        • Create Bucket
        • Bucket Recycle Bin
        • List buckets
        • Overview
        • Bucket Inventory Management
        • Mirror back-to-origin
        • Bucket Lifecycle Management
        • Event notification
        • Set bucket storage class
        • Bucket permission management
        • View the region to which a bucket belongs
        • Close Recycle Bin
        • Logging
        • Data synchronization
        • Get Recycle Bin Activation Information
        • Check if bucket exists
        • User Credit Quota Management
        • Original image protection
        • Delete bucket
      • File management
        • Object permission control
        • Change file storage class
        • Get file download URL
        • Delete file
        • Copy Object
        • Select file
        • Soft links
        • Download file
        • Upload files
        • Restore archived storage class files
        • List files in the storage space
        • Get and update file meta information
        • Check if a file exists
    • JavaScript-SDK
      • Overview
      • Version Change Records
      • Initialization
      • Quota management
      • Bucket management
      • Install SDK
      • Bucket management
        • Data Synchronization Configuration
        • Create Bucket
        • Overview
        • Bucket Logging Management
        • Bucket Lifecycle Management
        • Set bucket storage class
        • Bucket permission management
        • View the region to which a bucket belongs
        • View bucket list
        • Check if bucket exists
        • Delete bucket
      • Object management
        • Multipart upload of objects
        • Get Object
        • View the object in the bucket
        • Copy Object
        • Upload Object
        • Get File URL
        • Delete Object
    • Android-SDK
      • Overview
      • Version Change Records
      • Initialization
      • Install the SDK Package
      • Exception handling
      • Bucket management
      • Log
      • Object management
      • Bucket management
        • Create Bucket
        • Bucket permission control
        • View bucket list
        • Check if bucket exists
        • Delete bucket
      • File management
        • Object permission control
        • Multipart upload of objects
        • Get Object
        • View the object in the bucket
        • Copy Object
        • Upload Object
        • Delete Object
    • Java-SDK
      • Overview
      • Version Change Records
      • Initialization
      • File management
      • FAQs
      • Install the SDK Package
      • SDK Logging
      • Exception handling
      • Data Processing and Usage
      • Bucket management
      • Bucket management
        • Bucket static website hosting
        • Recycle bin
        • Bucket data synchronization
        • Create Bucket
        • List buckets
        • Overview
        • Mirror back-to-origin
        • Set Bucket server-side encryption
        • Set bucket storage class
        • Bucket permission management
        • View the region to which a bucket belongs
        • Tag Management
        • Check if bucket exists
        • Original image protection
        • Delete bucket
      • File management
        • Copy files
        • Object permission control
        • Change file storage class
        • Get file download URL
        • Delete file
        • Get directory capacity overview
        • Select file
        • Download file
        • Upload files
        • Restore archived storage class files
        • List files in the storage space
        • Object Tag
        • Get and update file meta information
        • Check if a file exists
    • IOS-SDK
      • Overview
      • Version Change Records
      • Initialization
      • Install the SDK Package
      • Exception handling
      • Bucket management
      • Log
      • Object management
      • Bucket management
        • Create New Bucket
        • Determine whether the bucket exists and whether there is permission to access it
        • Bucket permission control
        • View bucket list
        • Delete bucket
      • File management
        • Multipart upload of objects
        • Get Object
        • View the object in the bucket
        • Copy Object
        • Upload Object
        • Delete Object
    • GO-SDK
      • Overview
      • Version Change Records
      • Initialization
      • File management
      • Install the SDK Package
      • SDK Logging
      • Data Processing and Usage
      • Bucket management
      • Request management
      • Error handling
    • C-Dotnet-SDK
      • Overview
      • Version Change Records
      • Initialization
      • Install the SDK Package
      • Exception handling
      • Bucket management
      • Object management
    • PHP-SDK
      • Overview
      • Version Change Records
      • Initialization
      • File management
      • Install the SDK Package
      • Exception handling
      • Bucket management
    • C-SDK
      • Overview
      • Version Change Records
      • Initialization
      • Exception handling
      • Install SDK Toolkit
      • Bucket management
        • Create Bucket
        • List Buckets
        • Overview
        • Check If Bucket Exists
        • Delete Bucket
      • File management
        • Copy files
        • Object permission control
        • Change file storage class
        • Delete file
        • Download file
        • Upload files
        • Archive storage
        • Get and Update Metadata Information
        • Get File Download Link
        • List files in the storage space
        • Check if a file exists
    • C++-SDK
      • Overview
      • Version Change Records
      • Initialization
      • Install the SDK Package
      • SDK Logging
      • Exception handling
      • Bucket management
        • Create Bucket
        • List buckets
        • Overview
        • Bucket permission management
        • View the region to which a bucket belongs
        • Check if bucket exists
        • Delete bucket
      • File management
        • Copy files
        • Object permission control
        • Change file storage class
        • Get file download URL
        • Delete file
        • Object Tag Management
        • Download file
        • Upload files
        • Archive storage
        • List files in the storage space
        • Get and update file meta information
        • Check if a file exists
      • Request management
        • Cancel request interruption
  • Product Description
    • Product functions
    • Application scenarios
    • Product advantages
    • Usage restrictions
    • Product introduction
    • Core concepts
    • Tiered Storage Introduction
      • Why Tiered Storage Exists
      • Introduction to storage classes
  • Data Cube
    • Batch processing
    • ZIP packaging and compression
    • Intelligent Data Processing
      • Video processing
        • Video frame capture
        • Instant video transcoding
        • Multimedia cloud processing
        • M3U8 signature
        • Get video metadata
      • Document processing
        • Document preview
      • Image processing
        • Image Processing Introduction
        • Image Processing FAQs
        • Image Processing Terminology Explanation
        • General Image Settings
          • Original image protection
        • Image Processing Guide V2_0
          • Removing Metadata
          • Image Scaling
          • Image Processing Persistence
          • Image Brightness
          • Image Blind Watermark
          • Return Original Image on Failure
          • Getting Image Information
          • Image Blur
          • Usage rules
          • Quality Transformation
          • Format conversion
          • Progressive Display
          • Image Sharpening
          • Grayscale Transformation
          • Image Compression
          • Image Anomaly Detection
          • Image Contrast
          • Image Rotation
            • Normal Rotation
            • Adaptive Rotation
          • Intelligent Processing
            • Intelligent Processing Usage Rules
            • Intelligent Scenarios
              • Lossless magnification
              • Portrait Cartoonization
              • Sky Segmentation
              • Style conversion
              • Black and white coloring
              • Stretch Restoration
              • Object erasure
            • Intelligent Effects
              • Intelligent Contrast
              • Intelligent Sharpness
              • Intelligent defogging
              • Intelligent Color Grading
          • Image Cropping
            • Rounded-corner rectangle cropping
            • Incircle Crop
            • Normal Crop
            • Index Crop
          • Image Watermark
            • Add Image-Text Mixed Watermark
            • Add Text Watermark
            • Add image watermark
        • Image Processing Guide V1_0
          • Image Cropping
          • Getting Image Information
          • Image Thumbnailing
          • Usage rules
          • Quality Transformation
          • Format conversion
          • Watermark
          • Progressive Display
          • Image Rotation
  • Related Agreements
    • Baidu AI Cloud Object Storage (BOS) and Baidu Netdisk Integration Usage Agreement
  • Developer Guide
    • Single-link rate limit
    • Image audit
    • Region and Endpoint
    • Event notification
    • Monitor Service Operations
    • Static website hosting
    • Basic concepts
    • Development Preparation
    • Data Publishing
      • Binding Custom Domain Name
      • CDN Acceleration Publishing
    • Data Disaster Recovery
      • Multi-AZ storage
      • Data synchronization
    • Data Security
      • Set anti-stealing-link
      • Set bucket trash
      • Set server-side encryption
      • Principle of least privilege
      • Permission control
        • Object permission control
        • Bucket permission control
        • IAM primary-IAM user access control
      • Versioning
        • Deletion Mark
        • Versioning Overview
    • Bucket Basic Operations
      • Create bucket
      • Data Publishing
      • Obtaining Bucket Region Information
      • Managing Lifecycle
      • Set access logs
      • Setting Bucket Tag
      • Setting Cross-Origin Resource Sharing (CORS)
      • View bucket list
      • Delete bucket
    • Data lifecycle management
      • Intelligent Business Analysis
    • Data Migration to Cloud
      • Migration from other clouds
      • Local data to cloud
      • Scenario overview
    • Data lake access
      • Hierarchical namespace
      • Metadata Conversion Service
    • Object Basic Operations
      • Managing Files
        • Copy data
        • Select scanning
        • Delete data
        • Obtaining Data Metadata
        • Viewing File List
        • Object Tag
      • Uploading Data
        • Simple upload
        • Append upload
        • Form upload
        • Upload callback
        • Chunking and Resumable Upload
      • Downloading Data
        • Simple Download
        • Resumable download
  • Data Lake Storage
    • Big Data Component Usage Guide
      • HBase Uses BOS as Underlying Storage
      • Kafka Data Storage to BOS
      • Hive Usage Guide
      • Presto Usage Guide
      • Spark Usage Guide
      • Flume Data Storage to BOS
      • Flink Usage Guide
      • Impala Usage Guide
      • Fluentd Collects Data Storage to BOS
      • Logstash Data Storage to BOS
      • Elasticsearch Snapshot Data Storage to BOS
      • Druid Uses BOS as Deep Storage
    • BOS HDFS tool
      • Overview
      • FAQs
      • Configuration and Usage
    • Data Migration and Transfer
      • Migrate Data to Hierarchical Namespace Bucket Using DistCp
      • DataX Read and Write BOS
    • Hierarchical namespace
      • Usage method
      • Service Introduction
      • Convert Normal Bucket to Hierarchical Namespace Bucket
      • Function Support Description
All documents
menu
No results found, please re-enter

BOS

  • Function Release Records
  • Product Announcement
  • S3
    • Overview
    • Compatible Interfaces
    • Compatible Signature Authentication
    • Service domain
    • Compatible Common Headers
    • Compatible Tools
  • Security and compliance
    • Overview
    • Monitoring and Audit
    • Data Disaster Recovery
    • Access control
    • Data protection
    • Data Retention Compliance
    • Data encryption
  • API Reference
    • Interface Specifications
    • Audio and Video Processing Interface
    • Access control
    • Introduction
    • Error code
    • Upload callback
    • Service-Related Interface
      • ListBuckets
      • Quota management
        • DeleteUserQuota
        • PutUserQuota
        • GetUserQuota
    • Image Moderation Service Interface
      • Politician Recognition (Politician)
      • Disgusting Image Recognition (Disgust)
      • API description
      • Watermark and QR Code Recognition (Watermark)
      • Face Detection (Face)
      • Image Quality Recognition (Quality)
      • General Text Recognition (OCR)
      • Pornography Recognition (Antiporn)
      • Public Figure Recognition (Public)
      • Terror Recognition (Terror)
    • Multipart Upload-Related Interface
      • AbortMultipartUpload
      • ListMultipartUploads
      • ListParts
      • User guide
      • UploadPart
      • InitiateMultipartUpload
      • UploadPartCopy
      • CompleteMultipartUpload
    • Bucket-Related Interface
      • Original image protection
        • PutBucketCopyrightProtection
        • GetCopyrightProtection
        • DeleteCopyrightProtection
      • Tag Management
        • PutBucketTagging
        • DeleteBucketTagging
        • GetBucketTagging
      • Quota management
        • PutBucketQuota
        • GetBucketQuota
        • DeleteBucketQuota
      • Data encryption
        • GetBucketEncryption
        • DeleteBucketEncryption
        • PutBucketEncryption
      • Event notification
        • PostResult
        • DeleteNotification
        • PostEvent
        • GetNotification
        • PutNotification
      • Recycle bin
        • DeleteBucketTrash
        • GetBucketTrash
        • PutBucketTrash
      • Data synchronization
        • GetBucketReplicationProgress
        • ListBucketReplication
        • GetBucketReplication
        • PutBucketReplication
        • DeleteBucketReplication
      • Cross-Origin Access
        • GetBucketCors
        • PutBucketCors
        • DeleteBucketCors
      • Mirror back-to-origin
        • PutBucketMirroring
        • DeleteBuketMirroring
        • GetBucketMirroring
      • Basic Operations
        • GetBucketLocation
        • HeadBucket
        • PutBucketStorageclass
        • PutBucket
        • GetBucketStorageClass
        • DeleteBucket
      • Lifecycle
        • DeleteBucketLifecycle
        • GetBucketLifecycle
        • PutBucketLifecycle
      • Permission control
        • PutBucketAcl
        • GetBucketAcl
      • Compliance retention
        • ExtendBucketObjectLock
        • DeleteBucketObjectLock
        • CompleteBucketObjectLock
        • InitBucketObjectLock
        • GetBucketObjectLock
      • Bucket inventory
        • GetBucketInventory
        • ListBucketInventory
        • DeleteBucketInventory
        • PutBucketInventory
      • Requester Pays
        • GetBucketRequestPayment
        • PutBucketRequestPayment
      • Static Website
        • PutBucketStaticWebsite
        • DeleteBucketStaticWebsite
        • GetBucketStaticWebsite
      • Versioning
        • PutBucketVersioning
        • GetBucketVersioning
      • Logging
        • DeleteBucketLogging
        • GetBucketLogging
        • PutBucketLogging
    • Object-Related Interface
      • Object Tag
        • PutObjectTagging
        • GetObjectTagging
        • DeleteObjectTagging
      • Basic Operations
        • CopyObject
        • ListObjects
        • FetchObject
        • GetObjectMeta
        • PostObject
        • listObjectVersions
        • DeleteObject
        • PutObject
        • AppendObject
        • DeleteMultipleObjects
        • RestoreObject
        • GetObject
        • OPTIONSObject
      • Soft links
        • GetSymlink
        • PutSymlink
      • Permission control
        • GetObjectAcl
        • PutObjectAcl
        • DeleteObjectAcl
      • Select scanning
        • SelectObject
  • Console Operation Guide
    • Hierarchical Namespace Bucket Operation Instructions
    • Configuring BOS Multi-User Access Control
    • Image Service
    • Operation preparation
    • Favorite Path
    • Quota management
    • Linkage with Baidu Netdisk sharing
    • Online data import
    • Statistics and monitoring
    • Intelligent Business Analysis
    • Event Notification and Data Processing
    • View and export usage data
    • Image Review Service
    • Automatic file decompression
    • Data Publishing
      • Data Publishing Introduction
      • Global Acceleration
      • Creating a Bucket Custom Domain Name
      • Viewing Bucket Official Domain Name
      • Configure Cache Management
      • Enabling CDN Official Acceleration Domain Name
      • Configuring CDN Upload Acceleration
    • Global Settings
      • VPC Access Control
    • Managing Bucket
      • Set static website hosting
      • Setting Up Log Query
      • Set referer allow list
      • Create bucket
      • Set cross-origin access
      • Set bucket trash
      • Set mirror back-to-origin
      • Set access logs
      • Set server-side encryption
      • Set storage inventory
      • Managing Bucket Tag
      • Querying Bucket
      • Data access trend analysis
      • Bucket quota management
      • Set compliance retention
      • Bucket overview
      • Set data synchronization
      • Setting Up Versioning
      • Requester Pays
      • Delete bucket
      • Managing Lifecycle
        • Overview
        • Configure intelligent tiering
        • Configuring Basic Lifecycle Management
        • Basic Lifecycle Management Usage Instructions
          • Lifecycle Rule Based on Last Accessed Time
          • Lifecycle Rule Based on Last Modified Time
      • Set bucket read-write permissions
        • Permission Introduction
        • Set bucket read-write permissions
    • Manage object
      • Setting Symlink
      • Select scanning
      • Setting Meta Information
      • Share files - get file URLs
      • Parts management
      • Folder sharing
      • Restore Archived Files
      • Delete file
      • Copy and move files
      • Delete folders in batches
      • Batch Managing Object
      • Folder statistics
      • Renamed files
      • Convert file storage class
      • Set file permissions
      • Download file
      • Querying Object
      • Upload files
      • Managing Folder
      • Object Tag
  • Managing Bucket
    • Set static website hosting
    • Set referer allow list
    • Create bucket
    • Set bucket trash
    • Set mirror back-to-origin
    • Set access logs
    • Set server-side encryption
    • Set storage inventory
    • Managing Bucket Tag
    • Bucket quota management
    • Set compliance retention
    • Bucket overview
    • Set data synchronization
    • Requester Pays
    • Delete bucket
    • _Archive
      • Set static website hosting
      • Set referer allow list
      • Create bucket
      • Set cross-origin access
      • Set bucket trash
      • Set mirror back-to-origin
      • Set access logs
      • Set server-side encryption
      • Set storage inventory
      • Managing Bucket Tag
      • Querying Bucket
      • Bucket quota management
      • Set compliance retention
      • Bucket overview
      • Set data synchronization
      • Requester Pays
      • Delete bucket
    • Set bucket read-write permissions
      • Permission Introduction
      • Set bucket read-write permissions
      • _Archive
        • Permission Introduction
        • Set bucket read-write permissions
  • Content Review
    • Video Review
    • Image audit
  • Service Level Agreement (SLA)
    • BOS Service Level Agreement SLA (V3_0)
    • Baidu AI Cloud Object Storage (BOS) Trusted Cloud Certification
  • Data processing
    • Image audit
    • Data Processing FAQs
    • Document preview
    • Video frame capture
    • Instant video transcoding
    • Data Processing Introduction
    • Image Processing Terminology Explanation
    • Multimedia cloud processing
    • Get video metadata
    • General Image Settings
      • Original image protection
    • Intelligent Recognition
      • Overview
    • Image Processing Guide V2_0
      • Removing Metadata
      • Image Scaling
      • Image Brightness
      • Getting Image Information
      • Image Blur
      • Usage rules
      • Image Resizing
      • Quality Transformation
      • Format conversion
      • Progressive Display
      • Image Sharpening
      • Grayscale Transformation
      • Image Contrast
      • Image Rotation
        • Normal Rotation
        • Adaptive Rotation
      • Intelligent Processing
        • Intelligent Processing Usage Rules
        • Intelligent Scenarios
          • Lossless magnification
          • Portrait Cartoonization
          • Sky Segmentation
          • Style conversion
          • Black and white coloring
          • Stretch Restoration
          • Object erasure
        • Intelligent Effects
          • Intelligent Contrast
          • Intelligent Sharpness
          • Intelligent defogging
          • Intelligent Color Grading
      • Image Cropping
        • Rounded-corner rectangle cropping
        • Incircle Crop
        • Normal Crop
        • Index Crop
      • Image Watermark
        • Add Image-Text Mixed Watermark
        • Add Text Watermark
        • Add image watermark
    • Image Processing Guide V1_0
      • Image Cropping
      • Getting Image Information
      • Image Thumbnailing
      • Usage rules
      • Quality Transformation
      • Format conversion
      • Watermark
      • Progressive Display
      • Image Rotation
  • Peripheral Tools
    • fsspec-bosfs
    • Peripheral Tools Overview
    • BOS-FTP Tool
    • Download Zone
    • BOS-AlluxioExtension Tool
    • BOS-PC Client
      • FAQs
      • User guide
      • Installation and Login
    • BOS-HDFS Tool
      • Overview
      • Configuration and Usage
      • Big Data Component Usage Guide
        • DataX Reading and Writing BOS
        • Hive Usage Guide
        • Presto Usage Guide
        • Spark Usage Guide
        • Flume Data Storage to BOS
        • Flink Usage Guide
        • Impala Usage Guide
    • BOS-Probe Error Detection Tool
      • Overview
      • Suggestions and Report Viewing
      • Checking Uploads and Downloads via BOSProbe
      • Installing BOSProbe
    • Docker
      • Overview
    • BOS-CMD Command-Line Tool
      • Configure BCECMD Command-Line Completion
      • Install BOSCMD
      • Overview
      • FAQs
      • Use BOS Service via CMD
      • BOS CMD Common Issues
      • BOSCMD Version Change Records
      • Configure BOSCMD
    • BOS-Import Data Cloud Migration Tool
      • Configuration file
      • Deployment methods
      • Overview
      • Version records
      • Exception handling
      • Log
      • Task Progress Recovery
    • BOS-FS Mount Tool
      • Operations and Practices
      • Overview
      • Version Change Records
      • FAQs
      • Install
      • Configuration
    • BOS-API Generation Tool
      • Overview
      • Service-Related Interface
        • List Buckets
        • Quota management
          • Delete User Credit Quota Settings
          • Get User Credit Quota Information
          • Set User Credit Quota
      • Image Moderation Service Interface
        • Image Review Interface
      • How to Call the API
        • Authentication
        • Construct a Request
        • Return a Response
      • Bucket Data Synchronization Related Interfaces
        • Retrieving the Process Status of Data Synchronization for a Specified ID in a Bucket
        • Setting Up Bucket Data Synchronization
        • Deleting the Synchronization Replication Configuration of a Specified ID in a Bucket
        • Listing All Replication Synchronization Rules of a Bucket
        • Retrieving Bucket Data Synchronization Information
      • Bucket-Related Interface
        • Original image protection
          • Disabling Bucket Original Image Protection Configuration
          • Get the original image protection configuration of bucket
          • Enable the original image protection function of bucket
        • Data encryption
          • Check If Encryption Is Enabled for a Bucket
          • Disable Server-Side Encryption (SSE) for a Bucket
          • Enable Encryption for a Bucket
        • Event notification
          • Setting Up Bucket Notification Rules
          • Retrieving Bucket Notification Rules
          • Pushing ImageOcr and ImageClassify Messages
          • Deleting Bucket Notification Rules
          • Pushing Event Messages
        • Recycle bin
          • Retrieving the Activation Status of the Bucket Recycle Bin
          • Disabling Bucket Recycle Bin Functionality
          • Enabling Bucket Recycle Bin Functionality
        • Cross-Origin Access
          • Get Cross-Origin Resource Sharing (CORS) Rules Set on a Specified Bucket
          • Disable Cross-Origin Resource Sharing (CORS) Rule on a Specified Bucket
          • Set a Cross-Origin Resource Sharing (CORS) Rule on a Specified Bucket
        • Basic Operations
          • List Buckets
          • Cross-Origin Query
          • Create a bucket
          • Get the Default Storage Class of a Bucket
          • List Objects in a Bucket
          • Set default bucket storage class
          • Get the Region of a Bucket
          • Check If a Bucket Exists and Whether the Requester Has Permission to Access the Bucket
          • Delete bucket
        • Lifecycle
          • Get Lifecycle Management Rules for a Bucket
          • Delete Lifecycle Management Rules for a Bucket
          • Set Lifecycle for a Bucket
        • Permission control
          • Set bucket access permissions
          • Get Access Permission for a Bucket
        • Compliance retention
          • Retrieving Bucket Compliance Retention Policies
          • Deleting Compliance Retention Policies
          • Locking Bucket Compliance Retention Policies
          • Delaying the Protection Period of Bucket Compliance Retention Policies
          • Initializing Compliance Retention Policies
        • Static Website
          • Set static website hosting
          • Delete Static Website Hosting Information for a Bucket
          • Get Static Website Hosting Information for a Bucket
        • Logging
          • Enable bucket access logs
          • Disable Access Log Configuration for a Bucket
          • Get Access Log Configuration for a Bucket
      • Object-Related Interface
        • Basic Operations
          • Get Meta Information of an Object
          • Restore Archived Files
          • Get an Object
          • Fetch an Object and Store It in a Bucket
          • Delete Multiple Objects
          • Delete Object
        • Soft links
          • Retrieve a symlink
          • Create a symlink
        • Permission control
          • Set access permission for an object
          • Delete Access Permission for an Object
          • Get Access Permission for an Object
        • Select scanning
          • Execute SQL Statement on an Object
    • MoonBox Physical Migration Device
      • MoonBox introduction
      • MoonBox Operation Process
    • BOS Connector for PyTorch
      • Overview
      • Functionality and Usage Instructions
      • Reading and Writing Checkpoints
      • Installing BOS Connector for Pytorch
      • Building a Dataset
      • Configuring BOS Connector for Pytorch
      • Performance test
    • BOS-CLI Command-Line Tool (Old Version)
      • Overview
      • Version Change Records
      • Configure BOSCLI
      • Install BOSCLI
      • Use BOS Service via CLI
    • BOS-Util Batch Operation Tool
      • Overview
      • Version Change Records
      • Install BOS-Util
      • Using BOS Service via BOS-Util
    • Third-party tools
      • rclone
      • S3 Browser
      • MinIO
      • Goofys
      • Other Tools
  • Typical Practices
    • Using BOS as Backend Storage Service for Jfrog Artifactory
    • How to Solve Browser Cross-Origin CORS Issues
    • Using HTTPDNS Service via Android SDK
    • Client-Side Encryption Practice
    • BOS Dedicated Line Back-to-Origin IDC Best Practices
    • Presto Practice Based on BOS
    • Accessing BOS via Dedicated Line-VPN in Hybrid Cloud
    • CDN Dynamic Acceleration Uploading Data to BOS
    • HTTPS Transmission Encryption Practice
    • Using CDN to Accelerate BOS
    • Hotlink Protection
    • AWS Lambda Synchronizing S3 Data to BOS
    • Impala Practice Based on BOS
    • Direct Upload of Web Data to BOS
      • Advanced Chapter I - STS Temporary Authentication
      • Basic Chapter - Directly Uploading Files to BOS in the Browser
      • Advanced Chapter II - Handling Older Versions of IE via the PostObject Interface
      • Principle Chapter III - STS Temporary Authentication
      • Principle Chapter I - Directly Uploading Files to BOS in the Browser
      • Principle Chapter II - Upload large file in parts
    • Data Migration
      • Migrating Data from Third-Party Clouds to BOS
      • Migrating Local Data to BOS
      • Scenario overview
    • Mobile Photo Editing App Practice
      • Overview and Scenario Introduction
      • Code example
      • Solution Practice - Building the Photo Editing App
      • Solution Practice - Using the Photo Editing App
    • Accessing BOS via Python API Request
      • Upload File to Bucket via PUT Request
      • Basics (Must-Read) - Generation of authentication string
      • Download Bucket File to Local via GET Request
  • FAQs
    • Certification and permission management
    • Image Service
    • Security Problems
    • Bucket Domain Name Request Style
    • General Problems
    • Object upload-download and management
    • Data Migration and Backup
    • Billing Problems
    • API & SDK & Tools
    • Common Questions Overview
    • Bucket access and management
    • Analysis and Statistic
    • Performance-related questions
  • Video Zone
    • Accessing BOS Resources via Domain Name
    • Object upload
    • Understanding BOS
    • BOS Tiered Storage
  • Quick Start
    • Create bucket
    • Get Object
    • Upload Object
    • Quick Start Guide
    • Getting Started with BOS
    • Delete Object
    • Delete bucket
  • Product pricing
    • Billing Cases
    • Insufficient Balance and Debt Reminder
    • View Consumption Details
    • Billing FAQs
    • Product price
      • Resource Package Price List
      • Pay-As-You-Go Charge Type
      • Pay-As-You-Go Price List
        • Traffic Price
        • Storage prices
        • Data Processing Price
        • Request Price
      • Resource Package Charge Type
        • Resource Package Deduction Rules
        • Resource Package Overview
      • Resource Package Price List - Deprecated
        • Internet downlink traffic package
        • Infrequent access storage package
        • Back-to-origin traffic package
        • Archive storage package
        • Cold storage package
        • Standard storage package
    • Charge Item Introduction
      • Traffic fees
      • Storage Cost
      • Request fees
      • Data processing fees
      • Charge Item Overview
  • SDK
    • SDK Overview
    • Harmony-SDK
      • Overview
      • Version Change Records
      • Initialization
      • Install the SDK Package
      • Exception handling
      • Log
      • Bucket management
        • Create Bucket
        • Bucket permission control
        • View the region to which a bucket belongs
        • Bucket Storage Class Setting and Query
        • View bucket list
        • Check if bucket exists
        • Delete bucket
      • Object management
        • Object permission control
        • Multipart upload of objects
        • Get Object
        • View the object in the bucket
        • Copy Object
        • Upload Object
        • Delete Object
    • Ruby-SDK
      • Overview
      • Version Change Records
      • Initialization
      • Install the SDK Package
      • SDK Logging
      • Exception handling
      • Bucket management
        • Create Bucket
        • List buckets
        • Overview
        • Bucket permission management
        • View the region to which a bucket belongs
        • Check if bucket exists
        • Delete bucket
      • File management
        • Object permission control
        • Change file storage class
        • Get file download URL
        • Delete file
        • Copy Object
        • Download file
        • Upload files
        • List files in the storage space
        • Get and update file meta information
        • Check if a file exists
    • Python-SDK
      • Overview
      • Version Change Records
      • Initialization
      • FAQs
      • Install the SDK Package
      • Exception handling
      • Log Control
      • Bucket management
        • Bucket cross-origin resource access
        • Create Bucket
        • Bucket Recycle Bin
        • List buckets
        • Overview
        • Bucket Inventory Management
        • Mirror back-to-origin
        • Bucket Lifecycle Management
        • Event notification
        • Set bucket storage class
        • Bucket permission management
        • View the region to which a bucket belongs
        • Close Recycle Bin
        • Logging
        • Data synchronization
        • Get Recycle Bin Activation Information
        • Check if bucket exists
        • User Credit Quota Management
        • Original image protection
        • Delete bucket
      • File management
        • Object permission control
        • Change file storage class
        • Get file download URL
        • Delete file
        • Copy Object
        • Select file
        • Soft links
        • Download file
        • Upload files
        • Restore archived storage class files
        • List files in the storage space
        • Get and update file meta information
        • Check if a file exists
    • JavaScript-SDK
      • Overview
      • Version Change Records
      • Initialization
      • Quota management
      • Bucket management
      • Install SDK
      • Bucket management
        • Data Synchronization Configuration
        • Create Bucket
        • Overview
        • Bucket Logging Management
        • Bucket Lifecycle Management
        • Set bucket storage class
        • Bucket permission management
        • View the region to which a bucket belongs
        • View bucket list
        • Check if bucket exists
        • Delete bucket
      • Object management
        • Multipart upload of objects
        • Get Object
        • View the object in the bucket
        • Copy Object
        • Upload Object
        • Get File URL
        • Delete Object
    • Android-SDK
      • Overview
      • Version Change Records
      • Initialization
      • Install the SDK Package
      • Exception handling
      • Bucket management
      • Log
      • Object management
      • Bucket management
        • Create Bucket
        • Bucket permission control
        • View bucket list
        • Check if bucket exists
        • Delete bucket
      • File management
        • Object permission control
        • Multipart upload of objects
        • Get Object
        • View the object in the bucket
        • Copy Object
        • Upload Object
        • Delete Object
    • Java-SDK
      • Overview
      • Version Change Records
      • Initialization
      • File management
      • FAQs
      • Install the SDK Package
      • SDK Logging
      • Exception handling
      • Data Processing and Usage
      • Bucket management
      • Bucket management
        • Bucket static website hosting
        • Recycle bin
        • Bucket data synchronization
        • Create Bucket
        • List buckets
        • Overview
        • Mirror back-to-origin
        • Set Bucket server-side encryption
        • Set bucket storage class
        • Bucket permission management
        • View the region to which a bucket belongs
        • Tag Management
        • Check if bucket exists
        • Original image protection
        • Delete bucket
      • File management
        • Copy files
        • Object permission control
        • Change file storage class
        • Get file download URL
        • Delete file
        • Get directory capacity overview
        • Select file
        • Download file
        • Upload files
        • Restore archived storage class files
        • List files in the storage space
        • Object Tag
        • Get and update file meta information
        • Check if a file exists
    • IOS-SDK
      • Overview
      • Version Change Records
      • Initialization
      • Install the SDK Package
      • Exception handling
      • Bucket management
      • Log
      • Object management
      • Bucket management
        • Create New Bucket
        • Determine whether the bucket exists and whether there is permission to access it
        • Bucket permission control
        • View bucket list
        • Delete bucket
      • File management
        • Multipart upload of objects
        • Get Object
        • View the object in the bucket
        • Copy Object
        • Upload Object
        • Delete Object
    • GO-SDK
      • Overview
      • Version Change Records
      • Initialization
      • File management
      • Install the SDK Package
      • SDK Logging
      • Data Processing and Usage
      • Bucket management
      • Request management
      • Error handling
    • C-Dotnet-SDK
      • Overview
      • Version Change Records
      • Initialization
      • Install the SDK Package
      • Exception handling
      • Bucket management
      • Object management
    • PHP-SDK
      • Overview
      • Version Change Records
      • Initialization
      • File management
      • Install the SDK Package
      • Exception handling
      • Bucket management
    • C-SDK
      • Overview
      • Version Change Records
      • Initialization
      • Exception handling
      • Install SDK Toolkit
      • Bucket management
        • Create Bucket
        • List Buckets
        • Overview
        • Check If Bucket Exists
        • Delete Bucket
      • File management
        • Copy files
        • Object permission control
        • Change file storage class
        • Delete file
        • Download file
        • Upload files
        • Archive storage
        • Get and Update Metadata Information
        • Get File Download Link
        • List files in the storage space
        • Check if a file exists
    • C++-SDK
      • Overview
      • Version Change Records
      • Initialization
      • Install the SDK Package
      • SDK Logging
      • Exception handling
      • Bucket management
        • Create Bucket
        • List buckets
        • Overview
        • Bucket permission management
        • View the region to which a bucket belongs
        • Check if bucket exists
        • Delete bucket
      • File management
        • Copy files
        • Object permission control
        • Change file storage class
        • Get file download URL
        • Delete file
        • Object Tag Management
        • Download file
        • Upload files
        • Archive storage
        • List files in the storage space
        • Get and update file meta information
        • Check if a file exists
      • Request management
        • Cancel request interruption
  • Product Description
    • Product functions
    • Application scenarios
    • Product advantages
    • Usage restrictions
    • Product introduction
    • Core concepts
    • Tiered Storage Introduction
      • Why Tiered Storage Exists
      • Introduction to storage classes
  • Data Cube
    • Batch processing
    • ZIP packaging and compression
    • Intelligent Data Processing
      • Video processing
        • Video frame capture
        • Instant video transcoding
        • Multimedia cloud processing
        • M3U8 signature
        • Get video metadata
      • Document processing
        • Document preview
      • Image processing
        • Image Processing Introduction
        • Image Processing FAQs
        • Image Processing Terminology Explanation
        • General Image Settings
          • Original image protection
        • Image Processing Guide V2_0
          • Removing Metadata
          • Image Scaling
          • Image Processing Persistence
          • Image Brightness
          • Image Blind Watermark
          • Return Original Image on Failure
          • Getting Image Information
          • Image Blur
          • Usage rules
          • Quality Transformation
          • Format conversion
          • Progressive Display
          • Image Sharpening
          • Grayscale Transformation
          • Image Compression
          • Image Anomaly Detection
          • Image Contrast
          • Image Rotation
            • Normal Rotation
            • Adaptive Rotation
          • Intelligent Processing
            • Intelligent Processing Usage Rules
            • Intelligent Scenarios
              • Lossless magnification
              • Portrait Cartoonization
              • Sky Segmentation
              • Style conversion
              • Black and white coloring
              • Stretch Restoration
              • Object erasure
            • Intelligent Effects
              • Intelligent Contrast
              • Intelligent Sharpness
              • Intelligent defogging
              • Intelligent Color Grading
          • Image Cropping
            • Rounded-corner rectangle cropping
            • Incircle Crop
            • Normal Crop
            • Index Crop
          • Image Watermark
            • Add Image-Text Mixed Watermark
            • Add Text Watermark
            • Add image watermark
        • Image Processing Guide V1_0
          • Image Cropping
          • Getting Image Information
          • Image Thumbnailing
          • Usage rules
          • Quality Transformation
          • Format conversion
          • Watermark
          • Progressive Display
          • Image Rotation
  • Related Agreements
    • Baidu AI Cloud Object Storage (BOS) and Baidu Netdisk Integration Usage Agreement
  • Developer Guide
    • Single-link rate limit
    • Image audit
    • Region and Endpoint
    • Event notification
    • Monitor Service Operations
    • Static website hosting
    • Basic concepts
    • Development Preparation
    • Data Publishing
      • Binding Custom Domain Name
      • CDN Acceleration Publishing
    • Data Disaster Recovery
      • Multi-AZ storage
      • Data synchronization
    • Data Security
      • Set anti-stealing-link
      • Set bucket trash
      • Set server-side encryption
      • Principle of least privilege
      • Permission control
        • Object permission control
        • Bucket permission control
        • IAM primary-IAM user access control
      • Versioning
        • Deletion Mark
        • Versioning Overview
    • Bucket Basic Operations
      • Create bucket
      • Data Publishing
      • Obtaining Bucket Region Information
      • Managing Lifecycle
      • Set access logs
      • Setting Bucket Tag
      • Setting Cross-Origin Resource Sharing (CORS)
      • View bucket list
      • Delete bucket
    • Data lifecycle management
      • Intelligent Business Analysis
    • Data Migration to Cloud
      • Migration from other clouds
      • Local data to cloud
      • Scenario overview
    • Data lake access
      • Hierarchical namespace
      • Metadata Conversion Service
    • Object Basic Operations
      • Managing Files
        • Copy data
        • Select scanning
        • Delete data
        • Obtaining Data Metadata
        • Viewing File List
        • Object Tag
      • Uploading Data
        • Simple upload
        • Append upload
        • Form upload
        • Upload callback
        • Chunking and Resumable Upload
      • Downloading Data
        • Simple Download
        • Resumable download
  • Data Lake Storage
    • Big Data Component Usage Guide
      • HBase Uses BOS as Underlying Storage
      • Kafka Data Storage to BOS
      • Hive Usage Guide
      • Presto Usage Guide
      • Spark Usage Guide
      • Flume Data Storage to BOS
      • Flink Usage Guide
      • Impala Usage Guide
      • Fluentd Collects Data Storage to BOS
      • Logstash Data Storage to BOS
      • Elasticsearch Snapshot Data Storage to BOS
      • Druid Uses BOS as Deep Storage
    • BOS HDFS tool
      • Overview
      • FAQs
      • Configuration and Usage
    • Data Migration and Transfer
      • Migrate Data to Hierarchical Namespace Bucket Using DistCp
      • DataX Read and Write BOS
    • Hierarchical namespace
      • Usage method
      • Service Introduction
      • Convert Normal Bucket to Hierarchical Namespace Bucket
      • Function Support Description
  • Document center
  • arrow
  • BOS
  • arrow
  • API Reference
  • arrow
  • Access control
Table of contents on this page
  • Signature certification access
  • Original AK/SK authentication
  • Temporary authorized access
  • STS Introduction
  • STS authentication
  • GetSessionToken API
  • View access permissions
  • Object permission control

Access control

Updated at:2025-11-03

Signature certification access

Baidu AI Cloud features a unified API authentication mechanism. Refer to [Authentication Mechanism](Reference/Authentication mechanism/Introduction.md) for details.

Original AK/SK authentication

  • The original AK/SK refers to the [AK (access key ID)/SK (secret access key) ](Reference/Retrieve AK and SK/How to Obtain AKSK.md)automatically assigned to you when you register BOS, which is mainly used to authenticate and certify the user’s calling behavior, equivalent to the user name and password dedicated to Baidu AI Cloud API. Every request you send to BOS shall pass authentication and certification before BOS processes your request.
  • The interactive process of using the original AK/SK authentication in the mobile scenario is shown in the following figure:

  • Sending your original AK/SK to the mobile side is bound to cause certain security risks. Therefore, the original AK/SK authentication is only recommended for you to use in the test while the STS authentication is recommended for the formal provision of services.

Note: For authorization, it is recommended to strictly follow the principle of minimum permission, limit users to restricted operations (such as only authorizing read operations) and set access to resources with specified prefixes, so as to avoid granting excessive permission, resulting in unexpected unauthorized operations and data security risks.

Temporary authorized access

STS Introduction

BOS allows temporary third-party access authorization via the STS mechanism. STS (Security Token Service) is Baidu AI Cloud's temporary authorization service. By using STS, you can issue access credentials with custom validity periods and permissions to third-party users, enabling them to call Baidu AI Cloud APIs directly to access cloud resources.

Note: The third-party users here mainly refer to the end users of the Applications you have developed. For example, if you are a mobile App developer, your App end users are called third-party users.

Take the mobile client access to BOS service as an example:

If you are a mobile App developer, have enabled the BOS service and need to provide your App client with access to BOS service, you have the following two methods to authenticate the mobile client:

STS authentication

To ensure secure and convenient BOS services on mobile devices, Baidu AI Cloud has developed the STS service to meet security requirements in mobile scenarios. Through STS, temporary authorization can be granted without exposing your own AK/SK.

The process of using STS to temporarily authorize the APP client is shown in the following figure:

image.png

  1. Request permissions to access BOS.

    To gain access to BOS resources, app clients must request access permissions from the AppServer. The AppServer empowered with BOS service can assign permissions and restrict resource access for various app end users.

  2. Request temporary access credentials.

    AppServer shall apply for a temporary access credential from STS service. AppServer applies for the temporary access credential by calling STS's GetSessionToken() API, and meanwhile specifies the resource access permission and its expiration time. For the calling method of GetSessionToken(), please refer to [GetSessionToken API](#GetSessionToken API), and for STS service details, please refer to STS-related API document.

  3. The AppServer receives the STS credentials.

    After reviewing the application, STS sends temporary access credentials back to the AppServer. The credentials include the temporary access key AK/SK, SessionToken, expiration time, and the AppServer’s user ID. The AppServer can store these credentials in a cache and directly provide them to multiple app clients needing the same permissions.

  4. The AppServer forwards the STS credentials to the app client.

    The AppServer sends the obtained STS credentials to app clients, which can cache the credentials. If the credentials expire, the app client must reapply for valid credentials from the AppServer.

  5. App clients utilize STS credentials to access BOS resources.

    App client devices can use the provided STS credentials to build API requests for direct access to BOS resources. BOS recognizes STS credentials and uses the STS service to validate them, ensuring proper responses to user requests.

Advantages of using STS:

  • You only need to request temporary access credentials from STS and share them with third-party users without revealing your administrative account or AK/SK credentials. You can define the permissions and validity periods of these access credentials according to your requirements.
  • Permission revocation is not a concern, as temporary access credentials automatically expire once their validity period ends.

GetSessionToken API

API description

The GetSessionToken API is used for temporary authorization to request and obtain a set of temporary access credentials.

Permission description

The request initiator must possess a valid AccessKeyID and SecretAccessKey to submit the request.

Request

  • Request syntax

    Plain Text
    1POST /v1/sessionToken?durationSeconds=DurationSeconds HTTP/1.1
    2Host: sts.bj.baidubce.com
    3Date: <Date>
    4Authorization: <AuthorizationString>
    5{
    6 "id":"userid",
    7 "accessControlList": [
    8  {   
    9   "eid":<eid>,
    10   "service":"bce:bos",
    11   "region":"bj",
    12   "effect": "Allow",
    13   "resource": ["Bucketname/*"],
    14   "permission": ["READ"]
    15   }
    16  ]
    17 }
  • Request parameters
Name Parameter location Description Default value Required or not
durationSeconds Query The validity period for a temporary access credential during which you can repeatedly use it to access BOS resources after a single STS request is specified in seconds. The maximum duration allowed is 129,600 seconds (36 hours). Data type: int. 43200 (12 hours) No
  • Request headers
Name Data type Description Default value Required or not
Authorization string For the computing method of certification string, please refer to [Generate certification string](Reference/Authentication mechanism/Generate Authentication String.md). - Yes
  • Request elements

    The request element of this API is central to permission management. It comprises one or more ACL configuration items, with each item being independent of the others.

    Name Data type Description Default value Required or not Parent node
    accessControlList array Determine the start of the ACL body, which is made up of one or more groups of ACL configuration items. - Yes -
    effect string Specify whether the Request that matches this ACL configuration item can be executed, and its value is Allow or Deny.Allow means the execution is allowed; Deny means the execution is denied. - Yes accessControlList
    eid string Identify the ACL configuration item's ID. - No accessControlList
    id string ACL identifier. - No -
    permission array Permissions affected by ACL configuration items may be READ, WRITE, LIST, MODIFY, FULL_CONTROL, GetObject or other fine-grained permissions. - Yes accessControlList
    region string Regions covered by ACL configuration items, with “*” representing all regions. - Yes accessControlList
    resource array Resources affected by ACL configuration items, supporting wildcards. For example, <BucketName>/<ObjectKey> or <BucketName>/xxx* - Yes accessControlList
    service string Service components impacted by ACL configuration items, with “*” representing all services. - Yes accessControlList

Description:

  • Since GetSessionToken's response might include STS credentials, it is highly recommended to invoke it over the HTTPS protocol.
  • Service: Using BOS service as an example, the value is "service":"bce:bos".
  • Resource: For "service":"bce:bos", the resource supports both buckets and objects.

    • When resource is bucket, its value is . For example, "resource": ["sts-bucket-1"];
    • When resource is object, its value is <BucketName/ObjectName>. For example, "resource": ["sts-bucket-1/object1"];
    • In addition, resource also supports the wildcard *, indicating all objects under bucket For example, "resource": ["sts-bucket-1"].
  • permission: BOS service supports the READ/WRITE/LIST/MODIFY/GetObject permission. Each permission corresponds to a set of API requests as follows:

    • Operations corresponding to the READ permission include:

      • GetBucketLocation
      • HeadBucket
      • GetObject
      • GetObjectMeta
      • ListParts
    • Operations corresponding to the WRITE permission include:

      • PutObject
      • PostObjcet
      • InitiateMultipartUpload
      • UploadPart
      • CompleteMultipartUpload
      • AppendObject
      • AbortMultipartUpload
      • DeleteObject
      • DeleteMultipleObjects
      • FetchObject
    • Operations corresponding to the LIST permission include:

      • ListObjects
      • ListMultipartUploads
    • Operations corresponding to the MODIFY permission include:

      • PutObject
      • PostObjcet
      • AppendObject
      • RenameObject
      • CopyObject
      • FetchObject
      • PutSymlink
    • Operations corresponding to the GetObject permission include: **

      • GetObject
      • GetObjectMeta

Note:

  • If no ACL is specified in the request element, the temporary permission credentials returned by default will match your current READ/WRITE permissions. Authorizing third-party users could pose risks to your account resources. It is advisable to specify the ACL explicitly when granting temporary permissions to mitigate these risks. If the request body is empty, the default STS credentials returned will align with your current permissions.
  • To specify ACL, it is recommended to strictly follow the principle of [minimum permission](BOS/Developer Guide/Data Security/Principle of least privilege.md), limit users to restricted operations (permission field) and set access to resources with specified prefixes (resource field), so as to avoid data security risks.

Response

  • Response headers

    This API uses only public response headers.

  • Response element
Name Data type Description
accessKeyId string Access Key (AK) for STS credential access.
expiration date Access expiration duration.
secretAccessKey string Secret Key (SK) for STS credential access.
sessionToken string When using STS credentials, the SessionToken must be included.
userId string Your user ID.

Example

  • Request example

    Plain Text
    1POST /v1/sessionToken?durationSeconds=DurationSeconds HTTP/1.1
    2Host: sts.bj.baidubce.com
    3Date: Wed, 06 Apr 2016 06:34:40 GMT
    4Authorization: AuthorizationString
    5Content-type:application/json
    6Content-Length:178
    7
    8 {
    9  "id":"10eb6f5ff6ff4605bf044313e8f3ffa5",
    10  "accessControlList": [
    11   {   
    12    "eid":<eid>,
    13    "service":"bce:bos",
    14    "region":"bj",
    15    "effect": "Allow",
    16    "resource": ["sts-bucket-1-140683201300192-1447847972462384520478/*"],
    17    "permission": ["READ"]
    18    }
    19   ]
    20  }
  • Response example

    JSON
    1HTTP/1.1 200 OK
    2Server: Apache-Coyote/1.1
    3Content-Type: application/json;charset=UTF-8
    4Date: Wed, 06 Apr 2016 06:34:40 GMT
    5{
    6  "accessKeyId": "3bdecf4afebd41849628389a20629ecc",
    7  "secretAccessKey": "3f901ef12d454b9c92ba2dde7c029140",
    8  "sessionToken": "ZGZiM2M3MmU4Mjk4NGQ2MGEzYTNhYTAyMDE3NTZmZmV8AAAAAC8CAABf0XcbS9E/leusHxRyZ4DYNb+SH374S+mmkxaOpcwdLPC7JL/aTF5F7x83dQn354VKiTyNGuvQIsv7MidIPN7+0oOehdFlHua4RkwqIi8wOslX0qNitZa56WpxowLprrMksOHiQiEqYEzAyaVF3Oy3hBbMiX/RprtcnxERAi1/skNR1VzTZyYfS5D4p8Ul62X9Whwmj5Lkxy6yuZ1og94wytwTc8aWPFPGFIpQyCpCaxYvl/QkA1M0rxQ6SMaHbxTyEYuG2Eg8EOP0EKn2O2DMjGuLURRKuxHRCrFidRxDqOX9kM/L7gQXuaZl9DdB1DwZPrSo8xiPDRrfkpIqvkJEeB0blb8dXtMm0V0lmTznUrnPuoD4nfVyEPKCET+0JhQooxNLWDE6x4alnR8QtJkJ2yjrYaoMZdeuqKRcpgehVOIgI8ZDIumN1rdObs7a4Hw4Gmx7f0gQgLWdIF4ZOKsSpWP8aos+vzdOA+NNSHsTVg==",
    9  "createTime": "2015-11-18T11:48:17Z",
    10  "expiration": "2015-11-18T23:48:17Z",
    11  "userId": "2d6f4473c99e4ca7be1ca19ec18beacf"
    12}
  • Example of sts configuring with modify permission (see bucket permission control below for the definition of modify permission)

    • Deny MODIFY + Allow WRITE: In this configuration, addition and deletion are allowed, but overwriting is prohibited
JSON
1       POST /v1/sessionToken?durationSeconds=DurationSeconds HTTP/1.1
2      Host: sts.bj.baidubce.com
3      Date: Wed, 06 Apr 2016 06:34:40 GMT
4      Authorization: AuthorizationString
5      Content-type:application/json
6      Content-Length:178
7       {
8        "id":"10eb6f5ff6ff4605bf044313e8f3ffa5",
9        "accessControlList": [
10         {   
11          "eid":<eid>,
12          "service":"bce:bos",
13          "region":"bj",
14          "effect": "Allow",
15          "resource": ["sts-bucket-1-140683201300192-1447847972462384520478/*"],
16          "permission": ["WRITE"]
17          },
18          {   
19          "eid":<eid>,
20          "service":"bce:bos",
21          "region":"bj",
22          "effect": "Deny",
23          "resource": ["sts-bucket-1-140683201300192-1447847972462384520478/*"],
24          "permission": ["MODIFY"]
25          }
26         ]
27        }
28  ```
29  - `Allow MODIFY`: In this configuration, overwriting is allowed, but addition and deletion are prohibited
30  ```json
31       POST /v1/sessionToken?durationSeconds=DurationSeconds HTTP/1.1
32      Host: sts.bj.baidubce.com
33      Date: Wed, 06 Apr 2016 06:34:40 GMT
34      Authorization: AuthorizationString
35      Content-type:application/json
36      Content-Length:178
37       {
38        "id":"10eb6f5ff6ff4605bf044313e8f3ffa5",
39        "accessControlList": [
40          {   
41          "eid":<eid>,
42          "service":"bce:bos",
43          "region":"bj",
44          "effect": "Allow",
45          "resource": ["sts-bucket-1-140683201300192-1447847972462384520478/*"],
46          "permission": ["MODIFY"]
47          }
48         ]
49        }
50  ```
51
52### STS authentication process
53
54When a third-party user uses the returned temporary AK/SK and SessionToken to make a request to the Baidu AI Cloud server, how does the server complete the temporary authentication verification?
55
56-  **First, the server will verify the validity of the request.**
57
58The server identifies the corresponding Secret Access Key using the Access Key ID provided in the request, then extracts the signature string and signature from the request. If the server's computed signature matches the provided signature, the request is deemed valid; otherwise, it is considered invalid and denied.  
59
60- **Then, the server will verify whether the requester has permission to operate the resource.**
61
62The server will compare this request with the ACL list carried by GetSessionToken when applying for temporary token one by one, and the processing logic after comparison is as follows:
63
64    ![STS](https://doc.bce.baidu.com/bce-documentation/BOS/sts_rz.png?responseContentDisposition=attachment)
65
66- **Example:**
67
68Suppose the ACL is as follows when applying for temporary token:
69
70  [{
71      "effect": "Allow",
72      "resource": ["sts-bucket-1"],
73      "region": "bj",
74      "service": "bce:bos",
75      "permission": ["READ"]
76  }],
77
78The authorized third party wants to perform GetObject operation on img.jpg under sts-bucket-1.
79Because GetOject corresponds to the Read permission, this request can be written as:
80
81  [{
82      "resource": ["sts-bucket-1/img.jpg"],
83      "region": "bj",
84      "service": "bce:bos",
85      "permission": ["READ"]
86  }],
87
88Matching with the ACL above will fail because the resource doesn’t match. If the resource is written as `sts-bucket-1/img.jpg` or `sts-bucket-1/*`when applying for temporary token, the matching may succeed.
89
90### Access to BOS service with STS credentials
91
92After App clients get STS temporary credentials, signatures can be constructed through SessionToken and temporary access keys (AK/SK). The signature method is the same as the [signature certification access](#Signature certification access). Attention shall be paid to the following key points: signature keys used by users are temporary access keys (AK/SK) provided by STS.
93
94Compared with ordinary APIs, when calling APIs with STS credentials, you only need to add `x-BCE-security-token: <Session-token>` in the request, **with PutObject as an example:**
95
96  PUT /object HTTP/1.1
97  Host: <BucketName>.bos.bj.baidubce.com
98  Date: Wed, 06 Apr 2016 06:34:40 GMT
99  Authorization: <AuthorizationString>
100  x-bce-security-token: <SessionToken>
101  Content-Type: text/plain
102  Content-Length: 11434
103
104> **Description:**
105> - STS now supports fine-grained API requests such as READ, WRITE, LIST, MODIFY, FULL_CONTROL, and GetObject.  
106> - With its caching mechanism, STS can allow repeated access to BOS resources using a single access credential within its validity period, eliminating the need to repeatedly send STS requests. The validity period for temporary access credentials can be adjusted by modifying the durationSeconds parameter in the request.  
107
108
109## Bucket permission control
110
111### Permission control overview
112
113BOS utilizes ACL to manage bucket permissions. Bucket ACL serves as a set of permissions attached to a resource (i.e., a bucket), fundamentally granting specific permissions to grantees. To help users manage bucket resources more precisely, bucket ACL supports both resource and notResource fields. The resource field enables control over prefix and object granular permissions within a specified range, while the notResource field allows control outside that specified range. Additionally, the condition field in bucket ACL lets users set information such as the IP or referer of visitors.
114
115**To ensure the high security of your data stored in BOS, we provide you with rich multilevel permission management capabilities.
116BOS's permission system is divided into the following three levels:**
117
118- Bucket standard permissions (namely CannedACL)
119- Coarse-grained custom permissions
120- Fine-grained custom permissions
121
122Now, BOS can set ACL by **uploading ACL files** or **using CannedAcl**, and both the two method are realized through [PutBucketAcl API](BOS/API Reference/Bucket-Related Interface/Permission control/PutBucketAcl.md). Uploading ACL files aims to describe who (grantee) can execute what operations (permissions) on what resources (resource or notResource) under what conditions through a JSON file. The threshold for directly editing ACL files is high, so BOS also supports CannedAcl method. CannedAcl essentially encapsulates several common permission control scenarios, and directly sets resources in the `x-bce-acl` field in the PutBucketAcl header field.
123
124### Permission control by CannedAcl
125
126CannedAcl is a convenient way for users to use, which encapsulates several common permission situations. The resource is set through the `x-bce-ac` field in the PutBucketAcl header field. For example, `x-bce-acl:public-read`。 Fields are case-sensitive.
127
128**The currently supported CannedAcls include:**
129
130| ACL | Added permissions |
131| ----------------------------- | ------------------------------------------------------- |
132| private | Bucket owner gets FULL_CONTROL, and others have no permission |
133| public-read | Bucket owner gets FULL_CONTROL, and others get read permission |
134| Public-read-write | The bucket owner has FULL_CONTROL, while others are granted read and write permissions. Note: This permission poses a very high security risk.   |
135
136> **Note:** The default permission for a new bucket created via PutBucket is private.  
137
138### Permission control by uploading ACL files
139
140#### ACL file format
141
142PutBucketAcl allows access permissions to be set by uploading an ACL file. BOS ACL uses a policy description language in JSON format with camel case naming, starting with a lowercase letter. The fields are case-sensitive.  
143
144For BOS ACL contents, [BOS ACL editing tool](https://console.bce.baidu.com/tools/#/editTools) can be used to obtain the permission configuration template and custom configuration.
145
146- **Field overview:**
147
148<table>
149<tr><th width=12%>Field</th><th width=8%>Data type</th><th width=60%>Description</th><th width=8%>Required or not</th><th width=12%>Parent node</th></tr>
150<tr><td>accessControlList</td><td>array</td><td>Identify the start of the ACL body, which includes one or more groups of ACL configuration items made up of grant+permission+resource+condition.  </td><td>Yes</td><td>None</td></tr>
151<tr><td>+effect</td><td>string</td><td>Determine whether requests matching this ACL configuration item are permitted. The values can be "Allow" or "Deny". "Allow" means execution is permitted, while "Deny" means execution is denied.  </td><td>No</td><td>accessControlList</td></tr>
152<tr><td>+grantee</td><td>array</td><td>Specify the grantee.  </td><td>Yes</td><td>accessControlList</td></tr>
153<tr><td>++id</td><td>string</td><td>Provide the account ID of the grantee. You can find the user's account ID by logging into the console and navigating to User Information - Basic Information under the account name.  </td><td>Yes</td><td>grantee</td></tr>
154<tr><td>+permission</td><td>array</td><td>Permissions affected by ACL configuration items may be <code>READ</code>, <code>LIST</code>, <code>WRITE</code>, and <code>GetObject</code>. For the detailed explanation of permissions, please refer to "permission supported by bucket ACL".</td><td>Yes</td><td>accessControlList</td></tr>
155<tr><td>+resource</td><td>array</td><td>Specify the resources affected by ACL configuration items. These indicate access permissions for resources defined in the resource field, supporting wildcards like &lt;BucketName>/&lt;ObjectKey> or &lt;BucketName>/xxx*. If the resource field is blank or filled with the bucket name, it means access permissions are set for the bucket and all objects within ([&lt;bucketName>, &lt;bucketName>/*]).  </td><td>No</td><td>accessControlList</td></tr>
156<tr><td>+notResource</td><td>array</td><td>Specify the resources excluded by ACL configuration items through the notResource field. This indicates access permissions for resources outside the range defined in notResource, supporting wildcards like &lt;BucketName>/&lt;ObjectKey> or &lt;BucketName>/xxx*. Leaving the notResource field blank implies it is not configured, meaning access permissions are set for the bucket and all objects by default.  </td><td>No</td><td>accessControlList</td></tr>
157<tr><td>+condition</td><td>array</td><td>Restrictions contained in ACL configuration items support the configuration of IP address and referer list</td><td>No</td><td>accessControlList</td></tr>
158<tr><td>++ipAddress</td><td>array</td><td>Identify the ip to which access permission is granted</td><td>No</td><td>condition</td></tr>
159<tr><td>++notIpAddress</td><td>array</td><td>Identify the non-ip to which access permission is granted, meaning that those ips are excluded</td><td>No</td><td>condition</td></tr>
160<tr><td>++referer</td><td>object</td><td>Identify the referer to which access permission is granted</td><td>No</td><td>condition</td></tr>
161<tr><td>+++stringLike</td><td>string[]</td><td>Identify the fuzzy matching addresses in the referer allow list</td><td>No</td><td>referer</td></tr>
162<tr><td>+++stringEquals</td><td>string[]</td><td>Identify the exact matching addresses in the referer allow list</td><td>No</td><td>referer</td></tr>
163<tr><td>++secureTransport</td><td>bool</td><td>Indicate whether only HTTPS access is allowed. Options are "true" or "false", with "false" as the default. When set to "true," only HTTPS access is allowed.  </td><td>No</td><td>condition</td></tr>
164<tr><td>++currentTime</td><td>object</td><td>Configure time restrictions in the condition section, supporting "dateLessThan," "dateLessThanEquals," "dateGreaterThan," and "dateGreaterThanEquals." Any number of these can be set, but all specified conditions must be satisfied for a match.  </td><td>No</td><td>condition</td></tr>
165<tr><td>+++dateLessThan</td><td>string</td><td>Specify that the granted access permission is valid for a duration shorter than the specified time. The format should conform to ISO 8601, e.g., "2018-07-01T12:00:00Z".  </td><td>No</td><td>currentTime</td></tr>
166<tr><td>+++dateLessThanEquals</td><td>string</td><td>Specify that the granted access permission is valid for a duration shorter than or equal to the specified time. The format should conform to ISO 8601, e.g., "2018-07-01T12:00:00Z".  </td><td>No</td><td>currentTime</td></tr>
167<tr><td>+++dateGreaterThan</td><td>string</td><td>Specify that the granted access permission is valid for a duration longer than the specified time. The format should conform to ISO 8601, e.g., "2018-07-01T12:00:00Z".  </td><td>No</td><td>currentTime</td></tr>
168<tr><td>+++dateGreaterThanEquals</td><td>string</td><td>Specify that the granted access permission is valid for a duration longer than or equal to the specified time. The format should conform to ISO 8601, e.g., "2018-07-01T12:00:00Z".  </td><td>No</td><td>currentTime</td></tr>
169</table>
170
171> **Description:**
172>
173> -   The ACL format used is as described above; when uploading ACL files, the owner attribute (json field identifies the owner of bucket) is not required; if it has the owner attribute, its id value must be the owner id of bucket
174> -   The size of the uploaded ACL file must not exceed 20KB.  
175> -   If the user specifies ACL settings both in the HTTP header (Canned ACL) and the body when using the PutBucketAcl API, an error code 400 will be returned with the message "incorrect parameters."  
176> -   When setting the currentTime subfield, remember that GMT time must be used, which may differ from local time.  
177> -   Within an ACL rule, only one of resource or notResource can be specified at a time.  
178
179#### Bucket ACL supports coarse-grained custom permissions
180
181Permissions correspond to specific BOS API operations, which are classified into bucket-level APIs and object-level APIs. For example, ListObjects is a bucket-level API for viewing all object lists in a bucket, while PutObject is an object-level API for file uploads. In the ACL file, once a permission is defined, a corresponding resource or notResource must be set. By default, leaving the resource field blank or filling it with the bucket name enables all operations at both bucket and object levels.
182
183- **Bucket ACL supports the following coarse-grained custom permissions:**
184
185| Permission name | Operations supported by permissions |
186| ------------ | ------------------------------------------------------------ |
187| READ | Objects and related information in bucket can be read, but there is no list permission. The specific operation permissions include [GetBucketLocation](https://cloud.baidu.com/doc/BOS/s/Wkc49bfga), [HeadBucket](https://cloud.baidu.com/doc/BOS/s/Mkc4eqkiz), [GetObject](BOS/API Reference/Object-Related Interface/Basic Operations/GetObject.md), [GetObjectMeta](BOS/API Reference/Object-Related Interface/Basic Operations/GetObjectMeta.md), [ListParts](BOS/API Reference/Multipart Upload-Related Interface/ListParts.md), [RestoreObject](BOS/API Reference/Object-Related Interface/Basic Operations/RestoreObject.md). APIs corresponding to read permissions include both bucket-level APIs such as GetBucketLocation and object-level APIs such as GetObject and ListParts. |
188| LIST | List permissions, you can view the object list under the specified bucket and obtain all the unfinished MultipartUpload. The specific operation permissions include [ListObjects](https://cloud.baidu.com/doc/BOS/s/Tkc4eakqz) and [ListMultipartUploads](BOS/API Reference/Multipart Upload-Related Interface/ListMultipartUploads.md). List permissions correspond to bucket-level APIs only. |
189| WRITE | Creation, overwriting and deletion of objects in bucket are allowed, and specific operation permissions include [PutObject](BOS/API Reference/Object-Related Interface/Basic Operations/PutObject.md), [PostObject](BOS/API Reference/Object-Related Interface/Basic Operations/PostObject.md), [InitiateMultipartUpload](BOS/API Reference/Multipart Upload-Related Interface/InitiateMultipartUpload.md), [UploadPart](BOS/API Reference/Multipart Upload-Related Interface/UploadPart.md), [CompleteMultipartUpload](BOS/API Reference/Multipart Upload-Related Interface/CompleteMultipartUpload.md), [AbortMultipartUpload](BOS/API Reference/Multipart Upload-Related Interface/AbortMultipartUpload.md), [AppendObject](BOS/API Reference/Object-Related Interface/Basic Operations/AppendObject.md), [DeleteObject](BOS/API Reference/Object-Related Interface/Basic Operations/DeleteObject.md), [DeleteMultipleObjects](BOS/API Reference/Object-Related Interface/Basic Operations/DeleteMultipleObjects.md)and [FetchObject](BOS/API Reference/Object-Related Interface/Basic Operations/FetchObject.md). WRITE permissions correspond to object-level APIs only. |
190| MODIFY | Users are limited to related write operations, such as PutObject and AppendObject, and cannot add or delete data. This permission is mainly used in conjunction with Deny to prevent tampering with data in the bucket.   |
191| FULL_CONTROL | All above permissions are included. In addition to all operation permissions of READ, LIST and WRITE, FULL_CONTROL also includes all fine-grained APIs, including the following operation permissions [PutBucketAcl](BOS/API Reference/Bucket-Related Interface/Permission control/PutBucketAcl.md), [GetBucketACL](BOS/API Reference/Bucket-Related Interface/Permission control/GetBucketAcl.md),  [PutBucketCors](BOS/API Reference/Bucket-Related Interface/Cross-Origin Access/PutBucketCors.md) and [GetBucketCors](BOS/API Reference/Bucket-Related Interface/Cross-Origin Access/GetBucketCors.md). Refer to the following fine-grained permission list for details. FULL_CONTROL permissions correspond to both bucket-level and object-level APIs. |
192
193<br/>
194
195#### Bucket ACL supports fine-grained custom permissions
196
197To enhance the security of your data stored in BOS and provide more granular access control over BOS resources, BOS now supports a variety of fine-grained permissions in addition to READ, LIST, WRITE, MODIFY, and FULL_CONTROL.  
198
199- **The related permissions of bucket level are described as follows:**
200
201| Bucket fine-grained permissions | Supported operation | Coarse-grained permissions |
202| ---------------------- | ------------------------------------------------------------ |-----|
203| GetBucket | This permission means that users are allowed to obtain the contents of bucket and its related information, for example, listing objects under bucket, and listing all unfinished multipart upload under bucket when uploading in three steps | LIST、FULL_CONTROL |
204| GetBucketAcl | This permission means that users are allowed to obtain the information of bucket Acl | FULL_CONTROL |
205| PutBucketAcl | This permission means that users are allowed to add the bucket Acl | FULL_CONTROL |
206| GetBucketCors | This permission means that users are allowed to obtain the cross-origin resource sharing (CORS) rules on bucket | FULL_CONTROL |
207| PutBucketCors | This permission means that users are allowed to set or delete a cross-origin resource sharing (CORS) rule on the specified bucket | FULL_CONTROL |
208| GetBucketStyle | This permission means that users are allowed to obtain or list bucket style rule | FULL_CONTROL |
209| PutBucketStyle | This permission means that users are allowed to add or delete bucket style rule. | FULL_CONTROL |
210| GetBucketMirroring | This permission means that users are allowed to obtain information related to bucket mirror back-to-origin | FULL_CONTROL |
211| PutBucketMirroring | This permission means that users are allowed to add or delete information related to bucket image back to origin | FULL_CONTROL |
212| GetCopyRightProtection | This permission means that users are allowed to obtain the original image protection configuration information of bucket | FULL_CONTROL |
213| PutCopyRightProtection | This permission means that users are allowed to enable or disable the original picture protection function of bucket | FULL_CONTROL |
214| PutBucketLifecycle | This permission means that users are allowed to enable or disable the lifecycle function of bucket | FULL_CONTROL |
215| GetBucketLifecycle | This permission means that users are allowed to obtain the lifecycle function of bucket | FULL_CONTROL |
216| PutBucketReplication | This permission means that users are allowed to enable or disable the data synchronization function of bucket | FULL_CONTROL |
217| GetBucketReplication | This permission means that users are allowed to get the data synchronization function of bucket | FULL_CONTROL |
218| PutBucketEncryption | This permission means that users are allowed to enable or disable the data encryption function of bucket | FULL_CONTROL |
219| GetBucketEncryption | This permission means that users are allowed to get the data encryption function of bucket | FULL_CONTROL |
220| PutBucketStaticWebsite | This permission means that users are allowed to enable or disable the static website function of bucket | FULL_CONTROL |
221| GetBucketStaticWebsite | This permission means that users are allowed to get the static website function of bucket | FULL_CONTROL |
222| PutBucketLogging | This permission means that users are allowed to enable or disable the log management function of bucket | FULL_CONTROL |
223| GetBucketLogging | This permission means that users are allowed to get the log management function of bucket | FULL_CONTROL |
224| PutBucketRequestPayment | This permission means that users are allowed to enable or disable the requester payment function of bucket | FULL_CONTROL |
225| GetBucketRequestPayment | This permission means that users are allowed to get the requester payment function of bucket | FULL_CONTROL |
226| PutBucketTagging | This permission means that users are allowed to enable or disable the tag management function of bucket | FULL_CONTROL |
227| GetBucketTagging | This permission means that users are allowed to get the tag management function of bucket | FULL_CONTROL |
228| PutNotification | This permission means that users are allowed to enable or disable the event notification function of bucket | FULL_CONTROL |
229| GetNotification | This permission means that users are allowed to get the event notification function of bucket | FULL_CONTROL |
230| PutBucketObjectLock | This permission means that users are allowed to enable or disable the compliance retention function of bucket | FULL_CONTROL |
231| GetBucketObjectLock | This permission means that users are allowed to get the compliance retention function of bucket | FULL_CONTROL |
232| PutBucketInventory | This permission means that users are allowed to enable or disable the list setting function of bucket | FULL_CONTROL |
233| GetBucketInventory | This permission means that users are allowed to get the list setting function of bucket | FULL_CONTROL |
234| PutBucketStorageAnalysis | This permission means that users are allowed to enable or disable the analysis function of bucket | FULL_CONTROL |
235| GetBucketStorageAnalysis | This permission means that users are allowed to get the analysis function of bucket | FULL_CONTROL |
236| PutBucketStorageClass | This permission means that users are allowed to enable or disable the storage class management function of bucket | FULL_CONTROL |
237| GetBucketStorageClass | This permission means that users are allowed to get the storage class management function of bucket | FULL_CONTROL |
238| PutBucketTrash | This permission means that users are allowed to enable or disable the bucket trash function of bucket | FULL_CONTROL |
239| GetBucketTrash | This permission means that users are allowed to get the bucket trash function of bucket | FULL_CONTROL |
240| PutBucketQuota | This permission means that users are allowed to enable or disable the quota management function of bucket | FULL_CONTROL |
241| GetBucketQuota | This permission means that users are allowed to get the quota management function of bucket | FULL_CONTROL |
242| PutBucketVersioning | This permission means that users are allowed to enable or disable the multi-version management function of bucket | FULL_CONTROL |
243| GetBucketVersioning | This permission means that users are allowed to get the multi-version management function of bucket | FULL_CONTROL |
244| GetObjectVersion | This permission means that users are allowed to obtain the multi-version information of the object | FULL_CONTROL |
245| DeleteObjectVersion | This permission means that users are allowed to delete the multi-version information of the object | FULL_CONTROL |
246| ListObjectVersions | This permission means that users are allowed to list the multi-version information of the object | FULL_CONTROL |
247| PutObjectVersionAcl | This permission means that users are allowed to set the multi-version permission of the object | FULL_CONTROL |
248| GetObjectVersionAcl | This permission means that users are allowed to get the multi-version permission of the object | FULL_CONTROL |
249
250
251- **The related permissions of object level are described as follows:**
252
253| Object fine-grained permissions | Supported operation | Coarse-grained permissions |
254| --------------- | ------------------------------------------------------------ |-----|
255| PutObject | This permission means that users are allowed to perform related operations of object upload, such as PutObject, PostObject, AppendObject, FetchObject, CopyObject, three-step upload and three-step copy | WRITE、FULL_CONTROL |
256| GetObject | Only [GetObject](BOS/API Reference/Object-Related Interface/Basic Operations/GetObject.md) and [GetObjectMeta](BOS/API Reference/Object-Related Interface/Basic Operations/GetObjectMeta.md) operations are supported. GetObject permissions correspond to object-level APIs only. | READ、FULL_CONTROL |
257| RestoreObject | This permission means that users are allowed to retrieve archive storage class files | READ、FULL_CONTROL |
258| DeleteObject | This permission means that users are allowed to delete a single object or bulk delete objects | WRITE、FULL_CONTROL |
259| RenameObject | This permission means that users are allowed to rename the object | WRITE、FULL_CONTROL |
260| ListParts | This permission means that users are allowed to list all uploaded Parts of the UploadId specified in the three-step upload process, and users can view the current progress of the three-step upload | READ、FULL_CONTROL |
261| GetObjectAcl | This permission means that users are allowed to obtain object Acl | FULL_CONTROL |
262| PutObjectAcl | This permission means that users are allowed to add or delete object Acl | FULL_CONTROL |
263
264> **Description:**
265>
266> -   The newly introduced coarse- and fine-grained permissions do not affect the previously defined permissions like READ, LIST, WRITE, FULL_CONTROL, MODIFY, GetObject, and RestoreObject. Among these, READ, WRITE, LIST, FULL_CONTROL, and MODIFY are considered coarse-grained permissions.  
267> -   Coarse-grained permissions have precedence over fine-grained permissions. If both types of permissions are assigned, coarse-grained permissions will take priority and override fine-grained permissions.  
268> -   Bucket-level fine-grained permissions pertain to operations that are related to the bucket itself.  
269> -   Object-level fine-grained permissions pertain to operations that are related to individual objects.  
270
271**Bucket ACL supports Deny and data tamper prevention**
272
273Bucket Acl also supports the effect field, which is used to set the effect of this permission. Effect supports two configuration methods: `Allow` and `Deny`.
274
275> **Description:**
276>
277> -   If the effect is not configured, it is implicitly set to Allow by default. When the effect is configured and set to Allow, it is explicitly Allow. Whether the effect is not configured or explicitly configured as Allow, both cases are treated as equivalent.  
278> -   The semantics of Deny take precedence over Allow. If both Allow and Deny are set, Deny will override and block access; even with fine-grained permissions set to Allow, Deny at the coarse-grained level will prevail.  
279> -   If Allow is assigned to a coarse-grained permission while Deny is assigned to a fine-grained permission, only the operations that fall outside the fine-grained Deny scope will be allowed.  
280> -   Currently, READ, LIST, WRITE, FULL_CONTROL, and MODIFY are considered coarse-grained permissions, while others are treated as fine-grained permissions.  
281
282To solve the risks of data deletion and tampering caused by key leakage, lax permission control and misoperation, BOS introduces the tamper-proof function for bucket data, and the tamper-proof effect of bucket data can be achieved by **setting the MODIFY coarse-grained permission and Deny keyword combination** in bucket Acl. For example, the prohibition of overwriting and deleting the object can be achieved by setting `Deny MODIFY` + `Deny DeleteObject`at the same time.
283
284Now, the coarse-grained permissions related to write include WRITE, FULL_CONTROL and MODIFY, and the fine-grained permissions related to write include `PutObject`, `RenameObject` and `DeleteObject`.
285
286There are two main ways to use MODIFY: `Allow` and `Deny`.
287> **Description:**
288>
289> -   Write operations include adding, overwriting, and deleting. Adding refers to uploading a new object that did not previously exist, while overwriting refers to uploading an object that already exists.  
290> -   MODIFY coarse-grained write permissions encompass certain operations within RenameObject and PutObject fine-grained write permissions, such as PutObject, PostObject, AppendObject, CopyObject, FetchObject, and MultiUploadInitObject, among others.  
291> -   If the configuration allows any one of several WRITE permissions, such as PutObject, RenameObject, DeleteObject, WRITE, and FULL_CONTROL, and Deny for MODIFY is not configured, users will be permitted to perform regular write operations.  
292
293<br/>
294
295#### Allow example
296
297| Example of configuring MODIFY as Allow | Configuration example description | Remarks |
298| ------------------------------------------------------ | ------------------------------------------------------- | ------------------------------------------------------------ |
299| Allow MODIFY | Only Allow MODIFY is configured, and no other write permissions are configured | In this scenario, only overwriting is allowed, and addition or deletion is prohibited |
300| Allow MODIFY+Allow fine-grained write permission | Allow MODIFY and fine-grained write permission are configured | In this scenario, the operations under the configured fine-grained write permission can be added and overwritten |
301| Allow MODIFY+Allow coarse-grained write permission | Allow MODIFY and coarse-grained write permission are configured | In this scenario, any write operation is allowed |
302| Allow MODIFY+Allow coarse-grained write permission + fine-grained write permission | Allow MODIFY and coarse/fine-grained write permission are configured | Any write operations are permitted in this scenario. When both coarse-grained permission and fine-grained permission are configured, the coarse-grained permission takes precedence. |
303| Allow MODIFY+Deny fine-grained write permission | Allow MODIFY and DIFY fine-grained write permission are configured | In this scenario, addition and deletion are prohibited, and the operations other than the configured fine-grained write permissions can be overwritten |
304| Allow MODIFY+Deny coarse-grained write permission | Allow MODIFY and DIFY coarse-grained write permission are configured | In this scenario, addition, deletion and overwriting are prohibited |
305| Allow MODIFY+ Deny fine-grained write permission + Allow coarse-grained write permission | Allow MODIFY, Deny fine-grained write permission + Allow coarse-grained write permission are configured | In this scenario, the operations under the configured fine-grained write permission cannot be added, deleted or overwritten; the operations other than the configured fine-grained write permission can be added and overwritten. |
306
307<br/>
308
309#### Deny example
310
311| Example of configuring MODIFY as Deny | Configuration example description | Remarks |
312| ---------------------------------------------------- | ------------------------------------------------------ | ------------------------------------------------------------ |
313| Deny MODIFY | Only Deny MODIFY is configured, and no other write permissions are configured | In this scenario, overwriting is prohibited, and addition or deletion is allowed |
314| Deny MODIFY+Deny fine-grained write permission | Deny MODIFY and fine-grained write permission are configured | In this scenario, overwriting is not allowed. Operations other than the fine-grained write permissions that are configured can be added or deleted. For instance, by configuring Deny MODIFY along with Deny DeleteObject, overwriting and object deletion can both be prohibited.   |
315| Deny MODIFY+Deny coarse-grained write permission | Deny MODIFY and coarse-grained write permission are configured | In this scenario, any write operation is not allowed |
316| Deny MODIFY+Deny coarse/fine-grained write permission | Deny MODIFY and coarse/fine-grained write permission are configured | No write operations are permitted in this scenario. When both coarse-grained permission and fine-grained permission are configured, the coarse-grained permission takes precedence. |
317| Deny MODIFY+Allow fine-grained write permission | Deny MODIFY and Allow fine-grained write permission are configured | In this scenario, the operations under the configured fine-grained write permission can be added and deleted but can not be overwritten |
318| Deny MODIFY+Allow coarse-grained write permission | Deny MODIFY and Allow coarse-grained write permission are configured | In this scenario, addition and deletion are allowed but overwriting is prohibited |
319| Deny MODIFY+ Deny fine-grained write permission + Allow coarse-grained write permission | Deny MODIFY, Deny fine-grained write permission + Allow coarse-grained write permission are configured | In this scenario, the operations under the configured fine-grained permission cannot be added, deleted or overwritten; the operations under other fine-grained permissions can be added and deleted, but not be overwritten |
320
321> **Data safety prompt:**
322>
323> When granting permissions to users, it is recommended to strictly follow the [principle of minimum permission](BOS/Developer Guide/Data Security/Principle of least privilege.md), limit users to restricted operations and set access to resources with specified prefixes, so as to avoid granting excessive permission, resulting in unexpected unauthorized operations and data security risks. Including but unlimited to the following typical scenarios:
324> -   Coarse-grained custom permissions like LIST and WRITE pose significant security risks and are not recommended for authorization to all users. Grantees should be identified explicitly by setting the grantee field.  
325> -   When authorizing WRITE operations, it is advised to avoid granting bucket-level WRITE permissions. Instead, the resource field should be defined precisely to specify values such as BucketName/ObjectName/*.  
326> -   Among customized coarse-grained permissions, the READ permission allows reading objects and related information within the bucket but does not include LIST permissions. The LIST permission enables viewing the list of objects within a specified bucket and obtaining any unfinished MultipartUpload tasks. It is recommended to differentiate the operational boundaries of READ and LIST and assign permissions to users in the smallest necessary scope.  
327> -   When multiple users share a single bucket, it is advisable to segment the bucket by areas to define specific resources that users may access, ensuring that the authorization specifies the range down to BucketName/Userid/*.  
328> -   When the user sets the MODIFY permission of sts and the MODIFY permission of bucket at the same time, the principle of [minimum permission](BOS/Developer Guide/Data Security/Principle of least privilege.md) shall prevail, and when the permissions of the two dimensions do not intersect, access will be directly prohibited.
329
330### Request authorization process
331
332When managing bucket permissions via ACL, each bucket may contain only one ACL file. However, an ACL file can have multiple sets of configurations defining various operational permissions for different users and resources. The accessControlList field identifies the start of an ACL subject. Each set of ACL configurations includes grant, permission, resource (or notResource), and condition. Authorization will only succeed if all conditions within a set match; should any condition within the set fail, the request will be denied. The ACL authorization process evaluates conditions sequentially, and at least one mismatch within a set results in authorization failure; conversely, all conditions must match for successful authorization.  
333
334![](https://doc.bce.baidu.com/bce-documentation/BOS/BOS_ACL.png?responseContentDisposition=attachment)
335
336Suppose the grantee defined in an ACL file is *, representing all users, with READ permission and the resource as bucket1.
337
338-   If the request is PutObject, which involves uploading the file cat.jpg to bucket1, it will be rejected because PutObject is not included in the API permissions granted under READ, so the request cannot be authorized.
339-   If the request is GetObject, which involves downloading the file cat.jpg from bucket1, it will be authorized because GetObject corresponds to the READ permission, meeting all the conditions in the ACL.
340
341> **Note:** CopyObject operation requires READ, GetObject or FULL_CONTROL permission for the source object and WRITE or FULL_CONTROL permission for the target object.
342
343**Example**
344
345-   This example primarily illustrates the fundamental usage of grantees and permissions.
346
347    Assume that the bucket1 owner wants another Baidu AI Cloud user (userid=16147f559dd14bb294175a8bab74ff1f) to help him manage bucket1, namely, giving the user the FULL_CONTROL permission for bucket1. The corresponding ACL file format is as follows:
348
349      {
350          "accessControlList": [
351              {
352                  "grantee": [
353                      {
354                          "id": "16147f559dd14bb294175a8bab74ff1f"
355                      }
356                  ],
357                  "permission": [
358                      "FULL_CONTROL"
359                  ]
360              }
361          ]
362      }
363
364-   This example primarily demonstrates how to configure multiple ACL items.
365
366     The owner of bucket1 wants everyone to have READ access to the contents of the bucket, but only one Baidu AI Cloud user (userid=b124deeaf6f641c9ac27700b41a350a8) to have management privileges. To achieve this, all users are granted READ permission, while the user with userid=b124deeaf6f641c9ac27700b41a350a8 is assigned FULL_CONTROL. The corresponding ACL file format is as follows:
367
368```javascript
369      {
370          "accessControlList": [
371              {
372                  "grantee": [
373                      {
374                          "id": "b124deeaf6f641c9ac27700b41a350a8"
375                      }
376                  ],
377                  "permission": [
378                      "FULL_CONTROL"
379                  ]
380              },
381              {
382                  "grantee": [
383                      {
384                          "id": "*"
385                      }
386                  ],
387                  "permission": [
388                      "READ"
389                  ]
390              }
391          ]
392      }
  • This example primarily explains how to use the condition field.

    The owner of bucket1 allows users with userid=10eb6f5ff6ff4605bf044313e8f3ffa5 to manage the bucket only from specific IP segments. This is implemented by defining conditions and granting FULL_CONTROL permissions to these users. The corresponding ACL file format is as follows:

Javascript
1        {
2          "accessControlList": [
3              {
4                  "grantee": [
5                      {
6                          "id":"10eb6f5ff6ff4605bf044313e8f3ffa5"
7                      }
8                  ],
9                  "permission": [
10                      "FULL_CONTROL"
11                  ],
12                  "condition" : {
13                    "ipAddress": [
14                          "192.168.0.0/16",
15                          "192.169.0.*",
16                          "192.170.0.5"
17                      ]
18                  }
19              }
20          ]
21        }

The owner of bucket1 allows users with userid=10eb6f5ff6ff4605bf044313e8f3ffa5 to manage the bucket from outside specific IP segments. This is implemented by defining conditions that exclude certain IP segments and granting these users FULL_CONTROL permissions. The corresponding ACL file format is as follows:

Javascript
1        {
2          "accessControlList": [
3              {
4                  "grantee": [
5                      {
6                          "id":"10eb6f5ff6ff4605bf044313e8f3ffa5"
7                      }
8                  ],
9                  "permission": [
10                      "FULL_CONTROL"
11                  ],
12                  "condition" : {
13                    "notIpAddress": [
14                          "192.168.0.0/16",
15                          "192.169.0.*",
16                          "192.170.0.5"
17                      ]
18                  }
19              }
20          ]
21        }
  • This example primarily explains how to utilize the secureTransport and currentTime fields in conditions.

    The owner of bucket1 allows users with userid=10eb6f5ff6ff4605bf044313e8f3ffa5 to manage the bucket only when accessing via HTTPS at a specific time. This is achieved by defining secureTransport and currentTime in the condition fields and granting these users FULL_CONTROL. The corresponding ACL file format is as follows:

Javascript
1    {
2       "accessControlList": [
3            {
4                "grantee": [
5                    {
6                        "id": "10eb6f5ff6ff4605bf044313e8f3ffa5"
7                    }
8                ],
9                "permission": [
10                    "FULL_CONTROL"
11                ],
12                "resource": [
13                    "bucket1/*"
14                ],
15                "condition": {
16                    "currentTime": {
17                        "dateLessThan": "2020-07-01T12:00:00Z" ,
18                        "dateGreaterThan": "2018-03-01T15:00:00Z"
19                    },
20                    "secureTransport": true
21                }
22            }
23        ]
24    }
  • This example primarily demonstrates the usage of the referer field.

    The bucket1 owner allows users with a referer matching the configured allow list and userid=c558855ea8514c299508699b115473ef to view bucket and object information through the specific IP. The referer field is used to define the allow list that can be accessed, stringEquals is used for exact matching, and stringLike is used for fuzzy matching. In stringLike, * represents 0 to any number, at most one * is allowed, and * can be anywhere in the string. The corresponding ACL file format is as follows:

Javascript
1        {
2           "accessControlList": [
3                {
4                    "condition": {
5                        "referer": {
6                            "stringLike": [
7                                "http://www.abc.com/*"
8                            ],
9                            "stringEquals": [
10                                "http://www.abc.com"
11                            ]
12                        },
13                        "ipAddress": [
14                            "192.168.1.1"
15                        ]
16                    },
17                    "grantee": [
18                        {
19                            "id": "c558855ea8514c299508699b115473ef"
20                        }
21                    ],
22                    "permission": [
23                        "LIST"
24                    ],
25                    "resource": [
26                        "bucket1",
27                        "bucket1/*"
28                    ]
29                }
30            ]
31        }
  • This example primarily demonstrates the usage of the resource field.

    The resource field can be used to set access permissions for specific files and directories (prefix) within the bucket. For example, the owner of bucket1 allows another Baidu AI Cloud user (userid=10eb6f5ff6ff4605bf044313e8f3ffa5) to have FULL_CONTROL over objects with the prefix "cook," the prefix "edu/," and the object "travel/Chinese National Geography." There must be exactly one * at the end of the resource field. Since the resource assigned in the resource field pertains to objects, only object-level API operations such as PutObject, GetObject, and DeleteObject are allowed under FULL_CONTROL. The corresponding ACL file format is as follows:

Javascript
1        {
2          "accessControlList": [
3              {
4                  "grantee": [
5                      {
6                          "id":"10eb6f5ff6ff4605bf044313e8f3ffa5"
7                      }
8                  ],
9                  "permission": [
10                      "FULL_CONTROL"
11                  ],
12                  "resource": [
13                      "bucket1/cook*",
14                      "bucket1/edu/*",
15 "bucket1/travel/Chinese National Geography"
16                  ]
17              }
18           ]
19        }
  • This example primarily demonstrates the usage of the notResource field.

    The notResource field can be used to set access permissions for all objects except those matching specific files and directories (prefix) within the bucket. For instance, the owner of bucket1 allows another Baidu AI Cloud user (userid=10eb6f5ff6ff4605bf044313e8f3ffa5) to have FULL_CONTROL over all objects except those with the prefix "cook," the prefix "edu/," and the object "travel/Chinese National Geography." There must be exactly one * at the end of the notResource field. Since the resource assigned in the notResource field pertains to objects, only object-level API operations such as PutObject, GetObject, and DeleteObject can be performed under FULL_CONTROL. The corresponding ACL file format is as follows:

Javascript
1         {
2           "accessControlList": [
3               {
4                   "grantee": [
5                       {
6                           "id":"10eb6f5ff6ff4605bf044313e8f3ffa5"
7                       }
8                   ],
9                   "permission": [
10                       "FULL_CONTROL"
11                   ],
12                   "notResource": [
13                       "bucket1/cook*",
14                       "bucket1/edu/*",
15 "bucket1/travel/Chinese National Geography"
16                   ]
17               }
18            ]
19         }
  • This example mainly explains the basic use method of bucket-level permissions. The bucket1 owner hopes that just one Baidu AI Cloud user (userid= userid=b124deeaf6f641c9ac27700b41a350a8) can view the information of bucket or list objects in bucket, so this user is given the GetBucket permission. The corresponding ACL file format is as follows:
Javascript
1{
2    "accessControlList": [
3        {
4            "grantee": [
5                {
6                    "id": "b124deeaf6f641c9ac27700b41a350a8"
7                }
8            ],
9            "permission": [
10                "GetBucket"
11            ]
12        }
13    ]
14}
  • This example primarily explains the basic usage of object-level permissions.

    The owner of bucket1 wants everyone to have read and write access to the objects in the bucket but grants management privileges only to one Baidu AI Cloud user (userid=b124deeaf6f641c9ac27700b41a350a8). Thus, all users are granted GetObject and PutObject permissions, while the user with userid=b124deeaf6f641c9ac27700b41a350a8 is assigned FULL_CONTROL. The corresponding ACL file format is as follows:

Javascript
1    {
2        "accessControlList": [
3            {
4                "grantee": [
5                    {
6                        "id": "b124deeaf6f641c9ac27700b41a350a8"
7                    }
8                ],
9                "permission": [
10                    "FULL_CONTROL"
11                ]
12            },
13            {
14                "grantee": [
15                    {
16                        "id": "*"
17                    }
18                ],
19                "permission": [
20                    "GetObject","PutObject"
21                ]
22            }
23        ]
24    }
  • This example primarily demonstrates the basic methods for preventing data tampering in the bucket.

    The bucket1 owner doesn't want a Baidu AI Cloud user (userid=b124deeaf6f641c9ac27700b41a350a8) to tamper with bucket data, but allows him to add and read data, so the user with userid=b124deeaf6f641c9ac27700b41a350a8 is given Deny MODIFY, Allow PutObject and Allow READ permissions. The corresponding ACL file format is as follows:

Javascript
1    {
2    	"accessControlList": [
3    		{	
4    			"effect" : "Deny",
5    			"grantee": [
6    				{
7                        "id": "b124deeaf6f641c9ac27700b41a350a8"
8                    }
9                ],
10                "permission": [
11                    "MODIFY"
12                ]
13            },{	
14    			"effect" : "Allow",
15    			"grantee": [
16    				{
17                        "id": "b124deeaf6f641c9ac27700b41a350a8"
18                    }
19                ],
20                "permission": [
21                    "PutObject","READ"
22                ]
23            }
24        ]
25    }

View access permissions

  • To view the access permission of a bucekt, please see [GetBucketAcl API](BOS/API Reference/Bucket-Related Interface/Permission control/GetBucketAcl.md) for details.
  • The owner attribute is automatically added to the returned ACL.

Object permission control

BOS supports ACLs for managing object permissions. An object ACL is essentially a permission attached to a resource (such as an object) and is used to grant specific permissions to designated grantees.

Now, BOS can set ACL by uploading ACL files or using CannedAcl, and both the two method are realized through [PutObjectAcl API](BOS/API Reference/Object-Related Interface/Permission control/PutObjectAcl.md).

  • Uploading ACL files allows you to describe the ACL information of an object using a JSON file. Since directly editing ACL files can be complex, BOS also supports the CannedACL method.
  • CannedACL simplifies permission control by encapsulating several common scenarios. It directly sets resource permissions in the "x-bce-acl" or "x-bce-grant-read/x-bce-grant-full-control" fields in the PutObjectAcl header.

Permission supported by object ACL

Permission value supported by object ACL Supported operation
READ This attribute means that users are allowed to read the contents of the object and its related information.
FULL_CONTROL This attribute means that users have the control permission for the object, which is equivalent to the permission of read and put/get/delete object acl.

Types supported by CannedACL

Acl Added permissions
private Bucket owner gets FULL_CONTROL, and others have no permission
public-read Bucket owner gets FULL_CONTROL, and others get read permission

Three headers supported by CannedACL

To make permission settings easier, you can include a CannedACL when creating or copying an object, or when setting an object's ACL. This allows you to define object access permissions through the "x-bce-acl" or "x-bce-grant-permission" fields in the header. Note that you cannot set both a CannedACL and upload ACL files simultaneously in the same request. The main methods for setting headers are detailed below, and these two types of headers cannot coexist in a single request.

CannedACL Header Valid value Required or not
x-bce-acl private/public-read No
x-bce-grant-read It supports multiple IDs, and is separated by commas. No
x-bce-grant-full-control It supports multiple IDs, and is separated by commas. No

Description:

  • If the object belongs to the archive storage class, its ACL configuration cannot be set or deleted until both the upload and retrieval processes for the archive file are fully completed.

Modify Canned ACL API through Header

  • [PutObject API](BOS/API Reference/Object-Related Interface/Basic Operations/PutObject.md)
  • [PostObject API](BOS/API Reference/Object-Related Interface/Basic Operations/PostObject.md)
  • [AppendObject API](BOS/API Reference/Object-Related Interface/Basic Operations/AppendObject.md)
  • [CopyObject API](BOS/API Reference/Object-Related Interface/Basic Operations/CopyObject.md)
  • [InitMultiUpload API](BOS/API Reference/Multipart Upload-Related Interface/InitiateMultipartUpload.md)
  • [PutObjectAcl API](BOS/API Reference/Object-Related Interface/Permission control/PutObjectAcl.md)

Previous
Audio and Video Processing Interface
Next
Introduction