2016-03-17 101 views
0

好吧,我一直在這個日子呆了,所以SO是我唯一的希望。使用SSP和ADFS作爲IdP代理的WordPress單點登錄

我已經配置了Windows 2012 R2與ADFS 3.0,bitnami Wordpress(4.2.2)與SAML 2.0單點登錄插件和Ubuntu服務器與SimpleSAMLphp 1.13。

WordPress的配置是這樣的:

WordPress的政策填充NameID: WordPress NameID policy

WordPress的屬性: WordPress attributes

對於身份驗證源我使用SSP的文件模塊。它具有以下屬性:

User-Name代表用戶ID,mail代表用戶的電子郵件地址,Filter-Id代表用戶的組。

在ADFS方面,我將索賠提供程序信任配置爲SSP,並將依賴方的信任配置爲WP。

那些索賠規則是:

SSP:

規則1:要變換名稱ID政策。如果未設置此規則,則WP的SSP會給出NameIDPolicy無效錯誤。

c:[Type == "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier", Properties["http://schemas.xmlsoap.org/ws/2005/05/identity/claimproperties/format"] == "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress"] => issue(Type = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name", Issuer = c.Issuer, OriginalIssuer = c.OriginalIssuer, Value = c.Value, ValueType = c.ValueType);

規則2:通過全部權利

c:[Type == "https://example.com/simplesamlphp/saml2/idp/metadata.php"] => issue(claim = c);

的WordPress:

規則1:轉換name屬性WP的屬性

c:[Type == "User-Name"] => add(Type = "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname", Value = c.Value);

規則2:轉換郵件屬性

c:[Type == "mail"] => add(Type = "http://schemas.microsoft.com/ws/2008/06/identity/claims/emailaddress", Value = c.Value);

規則3:轉換組屬性

c:[Type == "Filter-Id"] => add(Type = "http://schemas.microsoft.com/ws/2008/06/identity/claims/Group", Value = c.Value);

規則4:精讀用vert到給定名稱屬性

c:[Type == "User-Name"] => add(Type = "http://schemas.microsoft.com/ws/2008/06/identity/claims/givenname", Value = c.Value);

規則5:轉換爲姓屬性

c:[Type == "User-Name"] => add(Type = "http://schemas.microsoft.com/ws/2008/06/identity/claims/surname", Value = c.Value);

規則6:轉換名稱ID政策&問題的所有索賠

c:[Type == "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name"] => issue(Type = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier", Issuer = c.Issuer, OriginalIssuer = c.OriginalIssuer, Value = c.Value, ValueType = c.ValueType, Properties["http://schemas.xmlsoap.org/ws/2005/05/identity/claimproperties/format"] = "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress");

用戶獲得認證正常(SP/IdP發起)。但在WP端,我收到錯誤消息說Username was not provided

ADFS追蹤日誌顯示我SSO token is null or empty. Cannot write SSO token to Cookies.

我檢查的IdP用戶登錄,它顯示用戶登錄。示蹤記錄還顯示Valid assertion returned from 'https://example.com/simplesamlphp/saml2/idp/metadata.php'

我想有什麼不對的權利規則,但我不當然是因爲配置看起來很好。

任何指針都歡迎!

謝謝!

回答

1

所以這個產業鏈是WP - > ADFS - > SSP

通常用於填充NameID,您使用轉換規則,例如

使用電子郵件格式將電子郵件轉換爲NameID。

對於CP,您需要每個屬性的傳遞規則。

此規則「c:[Type ==」https://example.com/simplesamlphp/saml2/idp/metadata.php「] => issue(claim = c);」沒有通過所有規則 - 最好單獨做。

RP規則看起來不錯,但NameID規則具有電子郵件的格式,所以它應該來自電子郵件,而不是名稱。

+0

謝謝。這確實奏效。還有一件事。我正在嘗試爲OWA使用相同的設置。我將OWA RP規則配置爲:Primary sid-'c:[Type ==「User-Name」,Issuer ==「https://example.com/simplesamlphp/saml2/idp/metadata.php」] \t => issue (Type =「http://schemas.microsoft.com/ws/2008/06/identity/claims/primarysid」,Value = c.Value);'和UPN:'c:[Type ==「mail」,Issuer ==「https://example.com/simplesamlphp/saml2/idp/metadata.php」] =>問題(Type =「http://schemas.xmlsoap.org/ws/2005/05/identity/claims/ upn「,Value = c.Value);'。但它顯示出'upnClaimMissing'錯誤。這個設置可以用於OWA嗎? – harshad

+0

不知道OWA,但metadata.php讓我覺得是實際的元數據,即XMl文檔不是索賠。這裏面是什麼? – nzpcmad

+0

我對內部工作並不是很熟悉,但是從代碼來看,它似乎爲idp提供了元數據。但不是真正的XML文檔。我曾在互聯網上觀看過演示,並且他們中的每一個都指示我在SSP的情況下像上面那樣配置'Issuer'。 – harshad