Permissions
If you need to assign different permissions to personnel in your enterprise to access your NAT Gateway resources, Identity and Access Management (IAM) is a good choice for fine-grained permissions management. IAM provides identity authentication, permissions management, and access control, helping you to securely access your Huawei Cloud resources. If your Huawei Cloud account does not require IAM for permissions management, you can skip this section.
IAM is a free service. You only pay for the resources in your account.
With IAM, you can control access to specific Huawei Cloud resources. For example, if you want some software developers in your enterprise to use NAT Gateway resources but do not want them to delete NAT Gateway resources or perform any other high-risk operations, you can grant permissions to use NAT Gateway resources but not permissions to delete them.
IAM supports role/policy-based authorization and identity policy-based authorization.
The following table describes the differences between these two authorization models.
| Authorization Model | Core Relationship | Permissions | Authorization Method | Description |
|---|---|---|---|---|
| Role/Policy | User-permissions-authorization scope |
| Assigning roles or policies to principals | To authorize a user, you need to add it to a user group first and then specify the scope of authorization. It is hard to provide fine-grained permissions control using authorization by user groups and a limited number of condition keys. This method is suitable for small- and medium-sized enterprises. |
| Identity policy | User-policy |
|
| You can authorize a user by attaching an identity policy to it. User-specific authorization and a variety of key conditions allow for more fine-grained permissions control. However, this model can be hard to set up. It requires a certain amount of expertise and is suitable for medium- and large-sized enterprises. |
Assume that you want to grant IAM users the permissions needed to create ECSs in CN North-Beijing4 and OBS buckets in CN South-Guangzhou. With role/policy-based authorization, the administrator needs to create two custom policies and assign both to the IAM users. With identity policy-based authorization, the administrator only needs to create one custom identity policy, configure the condition key g:RequestedRegion for the policy, and attach the policy to the users or grant the users the access permissions to the specified regions. Identity policy-based authorization is more flexible than role/policy-based authorization.
Policies/identity policies and actions in the two authorization models are not interoperable. You are advised to use the identity policy-based authorization model. For details about system-defined permissions in the two authorization models, see Role/Policy-based Permissions Management and Identity Policy-based Authorization.
For more information about IAM, see IAM Service Overview.
Role/Policy-based Permissions Management
NAT Gateway supports authorization with roles and policies. New IAM users do not have any permissions assigned by default. You need to first add them to one or more groups and attach policies or roles to these groups. The users then inherit permissions from the groups and can perform specified operations on cloud services based on the permissions they have been assigned.
NAT Gateway is a project-level service deployed for specific regions. When you set Scope to Region-specific projects and select the specified projects (for example, ap-southeast-2) in the specified regions (for example, AP-Bangkok), the users only have permissions for VPC Endpoint resources in the selected projects. If you set Scope to All resources, the users have permissions for VPC Endpoint resources in all region-specific projects. When accessing NAT Gateway, the users need to switch to a region where they have been authorized to use this service.
Table 2 lists all the system-defined permissions for NAT Gateway. System-defined policies in role/policy-based authorization are not interoperable with those in identity policy-based authorization.
| Role/Policy Name | Description | Type | Dependency |
|---|---|---|---|
| NAT FullAccess | All operations on NAT Gateway resources. | System-defined policy | None |
| NAT ReadOnlyAccess | Read-only permissions for all NAT Gateway resources. | System-defined policy | None |
| NAT Gateway Administrator | All operations on NAT Gateway resources. To be granted this permission, users must also have the Tenant Guest permissions. | System-defined role | Tenant Guest and Tenant Administrator roles, which must be attached in the same project as the NAT Gateway Administrator role |
Table 3 lists common operations supported by NAT Gateway system-defined permissions.
| Operation | NAT FullAccess | NAT ReadOnlyAccess | NAT Gateway Administrator |
|---|---|---|---|
| Creating a NAT gateway | √ | x | √ |
| Querying NAT gateways | √ | √ | √ |
| Querying details about a NAT gateway | √ | √ | √ |
| Updating a NAT gateway | √ | x | √ |
| Deleting a NAT gateway | √ | x | √ |
| Adding an SNAT rule | √ | x | √ |
| Viewing an SNAT rule | √ | √ | √ |
| Modifying an SNAT rule | √ | x | √ |
| Deleting an SNAT rule | √ | x | √ |
| Adding a DNAT rule | √ | x | √ |
| Viewing a DNAT rule | √ | √ | √ |
| Modifying a DNAT rule | √ | x | √ |
| Deleting a DNAT rule | √ | x | √ |
| Deleting DNAT rules in batches | √ | x | √ |
| Importing DNAT rules using templates | √ | x | √ |
| Exporting DNAT rules using templates | √ | √ | √ |
| Creating a transit subnet | √ | x | √ |
| Querying transit subnets | √ | √ | √ |
| Querying details about a transit subnet | √ | √ | √ |
| Modifying a transit subnet | √ | x | √ |
| Deleting a transit subnet | √ | x | √ |
| Assigning a transit IP address | √ | x | √ |
| Querying a transit IP address | √ | √ | √ |
| Releasing a transit IP address | √ | x | √ |
Identity Policy-based Authorization
NAT Gateway supports authorization with identity policies. Table 4 lists all system-defined identity policies for NAT Gateway. System-defined policies in identity policy-based authorization are not interoperable with those in role/policy-based authorization.
| Identity Policy Name | Description | Policy Type |
|---|---|---|
| NATFullAccessPolicy | All operations on NAT Gateway resources. | System-defined identity policies |
| NATReadOnlyPolicy | Read-only permissions for all NAT Gateway resources. | System-defined identity policies |
Table 5 lists common operations supported by system-defined identity policies for NAT Gateway.
| Operation | NATFullAccessPolicy | NATReadOnlyPolicy |
|---|---|---|
| Creating a NAT gateway | √ | x |
| Querying NAT gateways | √ | √ |
| Querying details about a NAT gateway | √ | √ |
| Updating a NAT gateway | √ | x |
| Deleting a NAT gateway | √ | x |
| Adding an SNAT rule | √ | x |
| Viewing an SNAT rule | √ | √ |
| Modifying an SNAT rule | √ | x |
| Deleting an SNAT rule | √ | x |
| Adding a DNAT rule | √ | x |
| Viewing a DNAT rule | √ | √ |
| Modifying a DNAT rule | √ | x |
| Deleting a DNAT rule | √ | x |
| Deleting DNAT rules in batches | √ | x |
| Importing DNAT rules using templates | √ | x |
| Exporting DNAT rules using templates | √ | √ |
| Creating a transit subnet | √ | x |
| Querying transit subnets | √ | √ |
| Querying details about a transit subnet | √ | √ |
| Modifying a transit subnet | √ | x |
| Deleting a transit subnet | √ | x |
| Assigning a transit IP address | √ | x |
| Querying a transit IP address | √ | √ |
| Releasing a transit IP address | √ | x |
Roles or Policies that the NAT Gateway Console Depends on
| Function-Public NAT Gateways | Dependent Cloud Service/Resource | Role/Policy Required |
|---|---|---|
| Adding an SNAT rule | EIP | NATFullAccessPolicy and EIP ReadOnlyAccess |
| Modifying an SNAT rule | EIP | NATFullAccessPolicy and EIP ReadOnlyAccess |
| Adding a DNAT rule | EIP | NATFullAccessPolicy and EIP ReadOnlyAccess |
| Modifying a DNAT rule | EIP | NATFullAccessPolicy and EIP ReadOnlyAccess |
| Deleting a public NAT gateway | EIP | NATFullAccessPolicy and EIP ReadOnlyAccess |
| Unbinding a global EIP from a public NAT gateway | EIP | NATFullAccessPolicy and EIP FullAccess |
Helpful Links
- IAM-based Authorization
- For actions supported by identity policy-based authorization, see Permissions Policies and Supported Actions.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot