Google Cloud 提供「身分與存取權管理」(IAM) 功能,可讓您以更精細的方式授予使用者特定 Google Cloud 資源的存取權,避免其他資源遭到未經授權者擅自存取。本頁面說明 Cloud DNS API 角色。如要進一步瞭解 IAM,請參閱身分與存取權管理說明文件。
IAM 能讓您採用最低權限安全性原則,僅授予必要的資源存取權限給使用者。
設定身分與存取權管理政策後,即可控管「哪些人」具備「何種」權限,可以存取「哪些」資源。身分與存取權管理政策可將特定角色授予使用者,讓該使用者擁有特定權限。例如,特定使用者可能需要建立和修改網域名系統 (DNS) 記錄資源。然後將 /roles/dns.admin
角色授予該使用者 (哪些人),其中該角色具有 dns.changes.create
和 dns.resourceRecordSets.create
權限 (何種權限),以便他們建立和更新資源記錄集 (哪些資源)。相較之下,支援部門可能只需要檢視現有的資源記錄集,因此可授予他們 /roles/dns.reader
角色。
Cloud DNS 支援專案層級和個別 DNS 區域層級的 IAM 權限。預設權限為專案層級。如要在個別 DNS 區域 (或資源) 層級設定權限,請參閱「建立具備特定 IAM 權限的可用區」。
權限與角色
每個 Cloud DNS API 方法都需要呼叫者具備必要的身分與存取權管理權限。您可以將角色授予使用者、群組或服務帳戶,藉此指派權限。除了基本角色擁有者、編輯者和檢視者外,您還可以將 Cloud DNS API 角色授予專案使用者。
權限
下表列出呼叫者呼叫每個方法所需的權限。
方法 | 所需權限 |
---|---|
dns.changes.create
用於建立資源記錄集。 |
dns.changes.create 和 dns.resourceRecordSets.create ,且須位於包含記錄集的專案中。 |
dns.changes.create
用於更新資源記錄集。 |
dns.changes.create 和 dns.resourceRecordSets.update ,且須位於包含記錄集的專案中。 |
dns.changes.create
用於刪除資源記錄集。 |
dns.changes.create 和 dns.resourceRecordSets.delete ,且須位於包含記錄集的專案中。 |
dns.changes.get |
包含代管區域的專案。dns.changes.get |
dns.changes.list |
包含代管區域的專案。dns.changes.list |
dns.dnsKeys.get |
包含代管區域的專案。dns.dnsKeys.get |
dns.dnsKeys.list |
包含代管區域的專案。dns.dnsKeys.list |
dns.managedZoneOperations.get |
包含代管區域的專案。dns.managedZoneOperations.get |
dns.managedZoneOperations.list |
包含代管區域的專案。dns.managedZoneOperations.list |
dns.managedZones.create |
dns.managedZones.create 專案。如要建立不公開區域,您還需要對包含已授權存取該區域的虛擬私有雲網路的每個專案具備 如果您要建立與 GKE 整合的私人區域,也需要 |
dns.managedZones.delete |
包含代管區域的專案。dns.managedZones.delete |
dns.managedZones.get |
包含代管區域的專案。dns.managedZones.get |
dns.managedZones.list |
dns.managedZones.list 專案。 |
dns.managedZones.update |
dns.managedZones.update 專案。如要建立不公開區域,您還需要對包含已授權存取該區域的虛擬私有雲網路的每個專案具備 如果您要建立與 GKE 整合的私人區域,也需要 |
dns.policies.create |
對包含政策的專案具備 dns.policies.create 權限。
如果是在虛擬私有雲網路上建立政策,您還需要對包含每個虛擬私有雲網路的每個專案具備 |
dns.policies.delete |
包含政策的專案。dns.policies.delete |
dns.policies.get |
包含政策的專案。dns.policies.get |
dns.policies.list |
包含政策的專案。dns.policies.list |
dns.policies.update |
對包含政策的專案具備 dns.policies.update 權限。
如果政策更新為虛擬私有雲網路,您也需要包含每個虛擬私有雲網路的每個專案具備 |
dns.projects.get |
專案的 dns.projects.get 權限。 |
dns.resourceRecordSets.create |
包含記錄集的專案。dns.resourceRecordSets.create |
dns.resourceRecordSets.delete |
包含記錄集的專案。dns.resourceRecordSets.delete |
dns.resourceRecordSets.get |
包含記錄集的專案。dns.resourceRecordSets.get |
dns.resourceRecordSets.list |
dns.resourceRecordSets.list 專案。 |
dns.resourceRecordSets.update |
dns.resourceRecordSets.update 和 dns.changes.create 權限。 |
dns.responsePolicies.create |
dns.responsePolicies.create 包含回應政策的專案。您也需要 如要建立附加至 GKE 叢集的回應政策,您需要:
|
dns.responsePolicies.delete |
dns.responsePolicies.delete 包含回應政策的專案。 |
dns.responsePolicies.get |
dns.responsePolicies.get 包含回應政策的專案。 |
dns.responsePolicies.list |
專案的 dns.responsePolicies.list 權限。 |
dns.responsePolicies.update |
dns.responsePolicies.update 包含回應政策的專案。您也需要 如要建立附加至 GKE 叢集的回應政策,您需要 |
dns.responsePolicyRules.create |
包含回應政策規則的專案。dns.responsePolicyRules.create |
dns.responsePolicyRules.delete |
包含回應政策規則的專案。dns.responsePolicyRules.delete |
dns.responsePolicyRules.get |
包含回應政策規則的專案。dns.responsePolicyRules.get |
dns.responsePolicyRules.list |
dns.responsePolicyRules.list 包含回應政策的專案。 |
dns.responsePolicyRules.update |
包含回應政策規則的專案。dns.responsePolicyRules.update |
networksecurity.dnsThreatDetectors.list (預覽) |
networksecurity.dnsThreatDetectors.list 專案,其中虛擬私有雲網路會受到威脅監控。 |
networksecurity.dnsThreatDetectors.get (預覽) |
networksecurity.dnsThreatDetectors.get 專案,其中虛擬私有雲網路會受到威脅監控。 |
networksecurity.dnsThreatDetectors.create (預覽) |
在包含要監控威脅的 VPC 網路的專案上,按一下 networksecurity.dnsThreatDetectors.create 。 |
networksecurity.dnsThreatDetectors.update (預覽) |
networksecurity.dnsThreatDetectors.update 專案,其中虛擬私有雲網路會受到威脅監控。 |
networksecurity.dnsThreatDetectors.delete (預覽) |
networksecurity.dnsThreatDetectors.delete 專案,其中虛擬私有雲網路會受到威脅監控。 |
角色
下表列出 Cloud DNS API 身分與存取權管理角色,以及各角色具備的所有權限對應清單。每個權限只適用於特定資源類型。
您也可以使用基本角色進行 DNS 變更。
Role | Permissions |
---|---|
DNS Administrator( Provides read-write access to all Cloud DNS resources. Lowest-level resources where you can grant this role:
|
|
DNS Peer( Access to target networks with DNS peering zones |
|
DNS Reader( Provides read-only access to all Cloud DNS resources. Lowest-level resources where you can grant this role:
|
|
Cloud DNS Service Agent( Gives Cloud DNS Service Agent access to Cloud Platform resources. |
|
角色 | 權限 |
---|---|
DNS 威脅偵測工具管理員 Beta 版( 可完整存取 DNS 威脅偵測工具資源。 |
|
DNS 威脅偵測工具檢視者 Beta 版( 可查看 DNS 威脅偵測工具資源。 |
|
管理存取權控管機制
您可以使用 Google Cloud 主控台控管主題和專案的存取權。
如要在專案層級設定存取權控管選項,請按照下列步驟操作。
主控台
前往 Google Cloud 控制台的「IAM」頁面。
從頂端的下拉式選單中選取專案。
按一下「新增」。
在「New principals」(新增主體) 中,輸入新主體的電子郵件地址。
從清單中選取角色。
按一下 [儲存]。
確認您授予的角色下方有列出該主體。
後續步驟
- 如要開始使用 Cloud DNS,請參閱快速入門導覽課程:使用 Cloud DNS 設定網域名稱的 DNS 記錄。
- 如要尋找使用 Cloud DNS 時可能遇到的常見問題解決方案,請參閱「疑難排解」。