本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
設定 Confluence 的基本身分驗證
基本身分驗證 (BASIC) 是 Confluence 資料來源的建議身分驗證方法。連接器使用 Confluence 使用者的電子郵件地址和 Atlassian API 字符 (用來取代密碼) 登入。這是唯一支援文件層級存取控制 (ACLs) 的身分驗證方法;ACLs 也需要相同秘密中的 Atlassian 組織管理員憑證。
步驟 1:產生 Atlassian API 權杖
使用您想要連接器使用其存取權的 Confluence 使用者帳戶。帳戶必須能夠存取您要編目的所有空間、頁面和部落格文章。
-
使用 Confluence 使用者帳戶登入 id.atlassian.com
。 -
選擇建立 API 字符,輸入標籤,然後選擇建立。
-
立即複製 API 字符並安全地存放它。字符只會顯示一次。
如需詳細資訊,請參閱 Atlassian 網站上的管理 Atlassian 帳戶的 API 權杖
步驟 2:(適用於 ACLs) 取得 Atlassian 組織管理員憑證
如果您不打算啟用文件層級存取控制,請略過此步驟。
除了使用者層級 API 字符之外,文件層級存取控制還需要 Atlassian 組織管理員憑證。管理員登入資料可讓 Amazon Bedrock 從組織解析使用者和群組成員資格,無論個別電子郵件可見性設定為何。管理員登入資料與使用者 API 字符不同,且必須來自 Atlassian 組織管理員。
您需要三個值:
| Value | 如何取得 |
|---|---|
adminApiKey |
具有 read:directories:admin和 read:workspaces:admin範圍的 Atlassian 組織 API 金鑰。在設定 → API 金鑰admin.atlassian.com下產生它 (僅限組織管理員)。 |
organizationId |
您 Atlassian 組織的 UUID。登入 admin.atlassian.com 並從 URL 複製 ID:admin.atlassian.com/o/。 |
directoryId |
Confluence 工作區的使用者目錄 UUID。使用 adminApiKey做為承載字符,以 Atlassian Admin Workspace API (GET /v2/orgs/) 擷取它。使用對應至 Confluence 網站的工作區directoryId中的 。 |
步驟 3:建立 Secrets Manager 秘密
使用下列鍵值對將登入資料存放在 AWS Secrets Manager 秘密中。
沒有文件層級存取控制
{ "username": "your-confluence-email", "password": "your-atlassian-api-token", "hostUrl": "https://your-instance.atlassian.net" }
使用文件層級存取控制
{ "username": "your-confluence-email", "password": "your-atlassian-api-token", "hostUrl": "https://your-instance.atlassian.net", "adminApiKey": "your-atlassian-admin-api-key", "organizationId": "your-org-uuid", "directoryId": "your-directory-uuid" }
使用 建立秘密 AWS Command Line Interface:
aws secretsmanager create-secret \ --namebedrock-confluence-basic-creds\ --secret-string file://secret.json
從回應記錄秘密 ARN。您可以使用它做為資料來源 secretArn。
後續步驟
存放秘密之後,請建立將 authType 設為 的資料來源BASIC。請參閱 連接 Confluence 資料來源。若要依使用者許可篩選查詢結果,請參閱 文件層級存取控制。