本文說明如何使用 Developer Connect 帳戶連結器的高階設定選項。
帳戶連接器是 Developer Connect 的功能,可協助您將 Google Cloud 帳戶與非 Google 開發人員工具供應商的個人帳戶連結。使用者可以為帳戶連接器選取適當的範圍,指定該連接器可存取的資料類型。為機構建立帳戶連接器連線後,該機構的使用者就能透過這項連線授權個人帳戶,以便使用這項連線。
事前準備
-
登入 Google 帳戶。
如果沒有帳戶,請 申請新帳戶。
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator role
(
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission. Learn how to grant roles.
-
Verify that billing is enabled for your Google Cloud project.
Enable the Developer Connect API.
Roles required to enable APIs
To enable APIs, you need the Service Usage Admin IAM role (
roles/serviceusage.serviceUsageAdmin), which contains theserviceusage.services.enablepermission. Learn how to grant roles.-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator role
(
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission. Learn how to grant roles.
-
Verify that billing is enabled for your Google Cloud project.
Enable the Developer Connect API.
Roles required to enable APIs
To enable APIs, you need the Service Usage Admin IAM role (
roles/serviceusage.serviceUsageAdmin), which contains theserviceusage.services.enablepermission. Learn how to grant roles.- 選用:建立客戶自行管理的加密金鑰 (CMEK),用於加密 Developer Connect 建立的驗證密鑰。
啟用 Developer Connect 時,系統也會啟用 Secret Manager API。
必要的角色
如要取得建立連線和連結所需的權限,請要求管理員授予您下列 IAM 角色:
-
如果您不是專案擁有者:
使用者帳戶的開發人員連線管理員 (
roles/developerconnect.admin) 。 -
如果您打算使用 CMEK 加密 Developer Connect 建立的密鑰:
Secret Manager 服務帳戶的「Cloud KMS CryptoKey Encrypter/Decrypter」(Cloud KMS 加密編譯金鑰加密者/解密者) (
roles/cloudkms.cryptoKeyEncrypterDecrypter) 。 -
如果您打算使用 gcloud CLI 完成本指南中的步驟:
Developer Connect 服務帳戶的Secret Manager 管理員角色 (
roles/secretmanager.admin)。 -
如果您打算使用 Google Cloud 控制台完成本指南中的步驟:
專案 IAM 管理員 (
roles/resourcemanager.projectIamAdmin) 使用者帳戶。
如要進一步瞭解如何授予角色,請參閱「管理專案、資料夾和組織的存取權」。
建立帳戶連接器
如要建立新的帳戶連結器,請按照下列步驟操作:
在 Google Cloud 控制台中開啟「Developer Connect」。
選取「帳戶連結器」。
按一下「Create connector」(建立連接器)。
選取要建立這個帳戶連接器的「Region」(區域)。
為帳戶連結器命名。
選取供應商。
選取要授予 Developer Connect 的範圍,以供這個帳戶連接器使用。
範圍會決定 Developer Connect 可在所選供應商的服務中執行哪些動作。範圍會因供應商而異。除非供應商沒有範圍,否則您必須選取至少一個範圍。
視供應商而定,可能無法選取任何範圍。你或許可以手動新增。也可能需要範圍。
按一下「建立」,完成帳戶連結器的建立作業。
連結帳戶
建立帳戶連接器後,您仍須將 Developer Connect 連結至供應商的帳戶,才能使用帳戶連接器。
在 Google Cloud 控制台中開啟「Developer Connect」。
選取「帳戶連結器」。
「帳戶連結器」頁面會列出專案中的所有帳戶連結器。
按一下要連結供應商帳戶的帳戶連結器名稱。
系統隨即會顯示「連線器詳細資料」頁面。
按一下「連結帳戶」。
系統會顯示 OAuth 驗證對話方塊。
在對話方塊中提供資訊,向供應商驗證身分。
按一下 [授權]。
更新帳戶連接器
您可以更新現有帳戶連結器,但只能更新該連結器的範圍。更新特定帳戶連接器的範圍後,該連接器的所有現有使用者都會遭到清空。
在 Google Cloud 控制台中開啟「Developer Connect」。
Developer Connect 會顯示「Git 存放區」頁面。
選取「帳戶連結器」。
「帳戶連結器」頁面會列出專案中的所有帳戶連結器。
按一下要更新的帳戶連結器名稱。
系統隨即會顯示「連線器詳細資料」頁面。
按一下 [編輯]。
在「範圍」清單中,選取要允許這個帳戶連結器使用的範圍。
按一下 [儲存]。
刪除帳戶連接器
在 Google Cloud 控制台中開啟「Developer Connect」。
Developer Connect 會顯示「Git 存放區」頁面。
選取「帳戶連結器」。
「帳戶連結器」頁面會列出專案中的所有帳戶連結器。
在「更多」選單中選取「刪除」。
系統隨即會顯示「連線器詳細資料」頁面。
按一下 [編輯]。