使用 Kerberos 進行 SSO SAP Hana
重要
因為 SAP 不再支援 OpenSSL,所以 Microsoft 也已停止其支援。 您現有的連線會繼續運作,但您無法再建立新的連線。 請改用 CommonCryptoLib) 或 sapcrypto (SAP 密碼編譯程式庫。
本文說明如何設定您的SAP Hana資料來源,以從Power BI 服務啟用單一登入 (SSO) 。
注意
在您嘗試重新整理使用 Kerberos SSO 的SAP Hana式報表之前,請先完成本文中的步驟和設定 Kerberos SSO。
啟用 SAP HANA 的 SSO
若要啟用 SAP Hana 的 SSO,請執行下列動作:
請確定 SAP HANA 伺服器執行的是所需最低版本,這取決於 SAP HANA 伺服器的平台層級:
在閘道電腦上安裝最新的 SAP HANA ODBC 驅動程式。 最低版本為 2017 年 8 月的 HANA ODBC 2.00.020.00 版。
請確定已針對 Kerberos 架構 SSO 設定 SAP HANA 伺服器。 如需使用 Kerberos 設定 SAP Hana SSO 的詳細資訊,請參閱 SAP Hana 安全性指南中的使用 Kerberos 單一登入。 另請參閱該頁面中的連結,尤其是 SAP Note 1837331 – 如何使用 HANA DBSSO Kerberos/Active Directory。
我們也建議您遵循這些額外的步驟,這可改善一些效能:
在閘道安裝目錄中,尋找並開啟此組態檔: Microsoft.PowerBI.DataMovement.Pipeline.GatewayCore.dll.config。
尋找
FullDomainResolutionEnabled屬性,並將其值變更為True。<setting name=" FullDomainResolutionEnabled " serializeAs="String"> <value>True</value> </setting>
疑難排解
本節提供使用 Kerberos 進行單一登入 (SSO) 到Power BI 服務中SAP Hana進行疑難排解的廣泛指示。 藉由使用這些疑難排解步驟,您可以自行診斷並更正可能遇到的任何問題。
驗證閘道錯誤並進行疑難排解
若要遵循本節中的步驟,您必須 收集閘道記錄。
憑證) (SSL 錯誤
錯誤徵兆
此問題有多個徵兆。
當您嘗試新增資料來源時,您可能會看到如下的錯誤訊息:
Unable to connect: We encountered an error while trying to connect to . Details: "We could not register this data source for any gateway instances within this cluster. Please find more details below about specific errors for each gateway instance."當您嘗試建立或重新整理報表時,可能會看到下列錯誤訊息:
當您調查 Mashup[date]*.log 時,您會看到下列錯誤訊息:
A connection was successfully established with the server, but then an error occurred during the login process and The certificate chain was issued by an authority that is not trusted.
解決方法
若要解決此 SSL 錯誤,請移至資料來源連線,然後在 [ 驗證伺服器憑證] 區段中停用設定,如下圖所示:
停用此設定之後,將不再顯示錯誤訊息。
模擬
徵兆
模擬的記錄專案包含類似下列的專案: About to impersonate user DOMAIN\User (IsAuthenticated: True, ImpersonationLevel: Impersonation).
此記錄專案中的重要元素是在 ImpersonationLevel: 專案之後顯示的資訊。 與 模擬 不同的任何值都顯示模擬未正確發生。
解決方法
您可以遵循 在閘道電腦上授與閘道服務帳戶本機原則許可權中的指示,正確設定 ImpersonationLevel。
變更組態檔之後,請重新開機閘道服務,讓變更生效。
驗證
重新整理或建立報告,然後收集閘道記錄。 開啟最新的 GatewayInfo 檔案,並檢查下列字串: About to impersonate user DOMAIN\User (IsAuthenticated: True, ImpersonationLevel: Impersonation) 。 請確定 ImpersonationLevel 設定會傳回 Impersonation。
委派
徵兆
委派問題通常會在Power BI 服務中顯示為一般錯誤。 若要確定問題不是委派問題,請收集 Wireshark 追蹤並使用 Kerberos 作為篩選。 若要深入瞭解 Wireshark,以及 Kerberos 錯誤的相關資訊,請參閱 有關網路擷取中 Kerberos 錯誤的部落格文章。
下列徵兆和疑難排解步驟可協助補救一些常見問題。
SPN 問題
如果您看到下列錯誤: The import [table] matches no exports. Did you miss a module reference?: 調查 Mashup[date]*.log 時,您遇到服務主體名稱 (SPN) 問題。
當您使用 Wireshark 追蹤進一步調查時,會顯示錯誤 KRB4KDC_ERR_S_PRINCIPAL_UNKOWN,這表示找不到 SPN 或不存在。 下圖顯示一個範例:
解決方法
若要解決此問題之類的 SPN 問題,您必須將 SPN 新增至服務帳戶。 如需詳細資訊,請參閱為SAP Hana資料庫主機設定 Kerberos中的 SAP 檔。
此外,請遵循下一節所述的解決指示。
沒有認證問題
此問題可能沒有明確的徵兆。 當您調查 Mashup[date]*.log 時,您會看到下列錯誤:
29T20:21:34.6679184Z","Action":"RemoteDocumentEvaluator/RemoteEvaluation/HandleException","HostProcessId":"1396","identity":"DirectQueryPool","Exception":"Exception:\r\nExceptionType: Microsoft.Mashup.Engine1.Runtime.ValueException, Microsoft.MashupEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35\r\nMessage:
當您進一步調查相同的檔案時,會出現下列 (無説明) 錯誤: No credentials are available in the security package 。
擷取 Wireshark 追蹤會顯示下列錯誤: KRB5KDC_ERR_BADOPTION 。
通常,這些錯誤表示可以在閘道服務帳戶的 [委派] 窗格上,找到 SPN hdb/hana2-s4-sso2.westus2.cloudapp.azure.com檔案,但不在此帳戶可呈現委派認證清單的服務中。
解決方法
To resolve the No credentials issue, follow the steps described in the "Configure the gateway service account for standard Kerberos constrained delegation" section of Configure Kerberos-based SSO from the Power BI service to on-premises data sources. 正確完成時,閘道服務帳戶上的委派索引標籤將會反映 HDB (一般資料庫檔案) 和 FQDN (完整功能變數名稱) 此 帳戶可以呈現委派認證的服務清單中。
驗證
請遵循上述步驟來解決問題。 如果您仍然遇到 Kerberos 問題,則可能在Power BI閘道或 HANA 伺服器本身設定錯誤。
認證錯誤
如果您遇到認證錯誤,記錄或追蹤中的錯誤將會公開描述 認證無效 或類似錯誤的錯誤。 這些錯誤可能會以不同的方式在連線的資料來源端顯示,例如SAP Hana。 下圖顯示範例錯誤:
徵兆 1
在 HANA 驗證追蹤中,您可能會看到類似下列的專案:
[Authentication|manager.cpp:166] Kerberos: Using Service Principal Name johnny@on.contoso.com@CONTOSO.COM with name type: GSS_KRB5_NT_PRINCIPAL_NAME [Authentication|methodgssinitiator.cpp:367] Got principal name: johnny@on.contoso.com@CONTOSO.COM
解決方法
Follow the instructions described in the "Set user-mapping configuration parameters on the gateway machine (if necessary)" section of Configure Kerberos-based SSO from Power BI service to on-premises data sources, even if you've already configured the Azure AD Connect service.
驗證
完成驗證之後,您將能夠在Power BI 服務中成功載入報表。
徵兆 2
在 HANA 驗證追蹤中,您可能會看到類似下列的專案:
Authentication ManagerAcceptor.cpp(00233) : Extending list of expected external names by johnny@CONTOSO.COM (method: GSS) Authentication AuthenticationInfo.cpp(00168) : ENTER getAuthenticationInfo (externalName=johnny@CONTOSO.COM) Authentication AuthenticationInfo.cpp(00237) : Found no user with expected external name!
解決方法
檢查 [HANA 使用者 ] 底下的 Kerberos 外部識別碼,以判斷識別碼是否正確相符。
驗證
解決問題之後,您可以在Power BI 服務中建立或重新整理報表。
後續步驟
如需內部部署資料閘道和 DirectQuery 的詳細資訊,請參閱下列資源: