El contenido no se encuentra disponible en el idioma seleccionado. Estamos trabajando continuamente para agregar más idiomas. Gracias por su apoyo.

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

Data Sharing Among Departments/Projects

Updated on 2024-08-15 GMT+08:00

An enterprise has data that needs to be shared among different departments or projects. To reduce the risks of mistaken deletion and tampering of shared data, the data can only be downloaded but not modified or deleted by users of other departments.

In this scenario, department A shares data in the bucket example-bucket to department B, allowing users of department B to download the data. This case describes how to leverage the least privilege principle to control access permissions for the shared data. Figure 1 shows the logical relationships among administrators, users, and buckets for data sharing between the two departments in this scenario.

Figure 1 Logical relationship

Solution and Process

In this scenario, the administrator of department A can use bucket policies to implement permission control, so that users of department B can only download but not modify or delete the shared data. Figure 2 illustrates the bucket policy configuration process.

Figure 2 Configuration process of permission control for data sharing

Prerequisites

Administrators and common users of departments A and B have been created on IAM. For details, see Creating an IAM User.

NOTE:

The administrator of department A needs to perform operations such as creating buckets and configuring bucket policies. Therefore, when creating an administrator, the user group to which the administrator belongs must be granted at least the OBS Administrator permissions of OBS.

Procedure

  1. Create a bucket.

    1. Log in to the Huawei Cloud console as the administrator of department A.
    2. On the homepage, choose Service List > Storage > Object Storage Service to access OBS Console.
    3. Click Create Bucket in the upper right corner.
    4. Configure relevant parameters, including Region, Bucket Name, Default Storage Class, and Bucket Policy. For details, see Creating a Bucket.
      NOTE:

      To ensure data security, you are advised to set Bucket Policy to Private.

    5. Click Create Now. The bucket is created.

  2. Grant upload permissions to users in department A.

    If the user group where the users of department A belong has been assigned Tenant Administrator, OBS Administrator, or OBS OperateAccess, skip this step and go to Step 3. If such permission is not assigned to this user group or OBS Buckets Viewer, OBS ReadOnlyAccess, or Tenant Guest is assigned to the user group, perform the following steps to grant upload permissions to users of department A.
    1. On OBS Console, click the name of the bucket where the shared data is stored to go to the Objects page.
    2. In the navigation pane, choose Permissions > Bucket Policies.
    3. Click Create.
    4. Choose a policy configuration method you like. Visual Editor is used here.
    5. Configure parameters listed in the table below to grant users of department A the permissions to access the bucket (to list objects in the bucket) and to upload objects to the bucket.
      Table 1 Parameters for granting permissions to access buckets and upload objects

      Parameter

      Description

      Policy Name

      Enter a policy name.

      Policy content

      Effect

      Select Allow.

      Principals

      • Select Current account.
      • IAM users: Select the users who are allowed to upload data.

      Resources

      • Method 1:
        • Select Entire bucket (including the objects in it).
      • Method 2:
        • Select Current bucket and Specified objects.
        • Set the resource path to * to indicate all objects in the bucket.
          NOTE:

          If you want users only to upload objects to certain folders in the bucket, set the resource path to a folder name plus a wildcard character (for example, example-folder/*). You can add multiple resource paths.

      Actions

      • Choose Customize.
      • Select the following actions:
        • ListBucket (to list objects in the bucket and obtain the bucket metadata)
        • PutObject (to upload objects using PUT and POST, upload parts, initiate multipart uploads, and assemble parts)
    6. Click Create.

  3. Grant download permissions to users in department B.

    If the user group where the users of department B belong has been assigned Tenant Administrator, OBS Administrator, OBS OperateAccess, or Tenant Guest, skip this step and go to Step 4. If such permission is not assigned to this user group or OBS ReadOnlyAccess or Tenant Guest is assigned to the user group, perform the following steps to grant download permissions to users of department B.
    1. On OBS Console, click the name of the bucket where the shared data is stored to go to the Objects page.
    2. In the navigation pane, choose Permissions > Bucket Policies.
    3. Click Create.
    4. Choose a policy configuration method you like. Visual Editor is used here.
    5. Configure parameters listed in the table below to grant users of department B the permissions to download objects from the bucket.
      Table 2 Parameters for granting permissions to download objects from the bucket

      Parameter

      Description

      Policy Name

      Enter a policy name.

      Policy content

      Effect

      Select Allow.

      Principals

      • Select Current account.
      • IAM users: Select the users who are allowed to download data.

      Resources

      • Method 1:
        • Select Entire bucket (including the objects in it).
      • Method 2:
        • Select Current bucket and Specified objects.
        • Set the resource path to * to indicate all objects in the bucket.
          NOTE:

          If you want the users of department B only to download a set of objects from the bucket, set the resource path to a folder name (for example, example-folder/, indicating the objects in this folder) or an object set with * (for example, *.doc, indicating all objects whose name ends with .doc). You can add multiple resource paths.

      Actions

      • Choose Customize.
      • Select the following actions:
        • ListBucket (to list objects in the bucket and obtain the bucket metadata)
        • GetObject (to obtain the object content and metadata)
        • GetObjectVersion (to obtain the content and metadata of a specified object version)
    6. Click Create.

  4. Prevent users of department B from writing or deleting the shared data.

    1. On OBS Console, click the name of the bucket where the shared data is stored to go to the Objects page.
    2. In the navigation pane, choose Permissions > Bucket Policies.
    3. Click Create.
    4. Choose a policy configuration method you like. Visual Editor is used here.
    5. Configure parameters listed in the table below to prevent users of department B from writing or deleting the shared data.
      Table 3 Parameters for preventing users from writing or deleting data

      Parameter

      Description

      Policy Name

      Enter a policy name.

      Policy content

      Effect

      Select Deny.

      Principals

      • Select Current account.
      • IAM users: Select the users who are not allowed to write or delete data.

      Resources

      • Method 1:
        • Select Entire bucket (including the objects in it).
      • Method 2:
        • Select Current bucket and Specified objects.
        • Set the resource path to * to indicate all objects in the bucket.
          NOTE:

          If you do not want the users of department B to write or delete a set of objects from the bucket, set the resource path to a folder name (for example, example-folder/, indicating the objects in this folder) or an object set with * (for example, *.doc, indicating all objects whose name ends with .doc). You can add multiple resource paths.

      Actions

      • Choose Customize.
      • Select the following actions:
        • PutObject (to upload objects using PUT and POST, upload parts, initiate multipart uploads, and assemble parts)
        • PutObjectAcl (to configure the object ACL)
        • PutObjectVersionAcl (to configure the ACL for a specific object version)
        • DeleteObject (to delete objects)
        • DeleteObjectVersion (to delete a specified object version)
        • AbortMultipartUpload (to abort multipart uploads)
    6. Click Create.

  5. Upload data.

    Users in department A can upload data through OBS Console, OBS Browser+, APIs, and SDKs. This section takes the operations on OBS Console as an example to describe how to upload data.
    1. Log in to OBS Console as a user of department A.
    2. In the bucket list, click the name of the bucket that stores the shared data.
    3. In the navigation pane on the left, click Objects and then Upload Object.
    4. In the displayed Upload Object dialog box, select the upload mode, storage class, and data to be uploaded.
    5. Click Upload.

      You can click Task Management in the lower part of the page to view the upload progress and result.

  6. Verify the permission.

    After the permission is granted, users in department B can verify it using OBS Console, OBS Browser+, APIs, and SDKs. This section takes OBS Console as an example to present how to verify that users of department B can only read the shared data.
    1. Log in to OBS Console as an IAM user of department B.
    2. In the bucket list, click the name of the target bucket.
    3. In the left navigation pane, click Objects. The object list is displayed.
    4. Click Download in the row where a public data record is located.
      • If the download fails, the download permission fails to be granted. Check whether the user group permission configuration is correct.
      • If the download is successful, the download permission is granted successfully. Go to the next step.
    5. Click Upload Object, select a file, and click Upload.
      • If the upload is successful, the permission configuration for preventing write and deletion by users of other departments fails. Check whether the bucket policy is correctly configured.
      • If the upload fails, the permission configuration is successful. Go to the next step.
    6. Click Delete in the row where a public data record is located.
      • If the deletion is successful, the permission configuration for preventing write and deletion by users of other departments fails. Check whether the bucket policy is correctly configured.
      • If the deletion fails, the permission configuration is successful.

Utilizamos cookies para mejorar nuestro sitio y tu experiencia. Al continuar navegando en nuestro sitio, tú aceptas nuestra política de cookies. Descubre más

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback