Правила подачи претензий ADFS не возвращают никаких деталей
У меня настроен ADFS 3.0, и любой пользователь в домене может войти на мой сайт (аутентификация была сделана ранее с помощью LDAP). Я настроил некоторые правила подачи заявок, чтобы я мог получить имя пользователя, адрес электронной почты и группы, в которых он участвует. Когда я использовал LDAP, я смог получить всю эту информацию. Я использую панель SAML Chrome для просмотра ответов SAML. Никакая информация, которую я настроил в правилах для претензий, не отображается в ответе. Вот пример ответа (некоторые данные были изменены в целях безопасности):
<samlp:Response Consent="urn:oasis:names:tc:SAML:2.0:consent:unspecified"
Destination="https://ssotest.trknow.local:8443/sammy/saml/SSO"
ID="_alphanumeric" IssueInstant="2019-03-29T13:52:09.586Z" Version="2.0"
xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol">
<Issuer xmlns="urn:oasis:names:tc:SAML:2.0:assertion">http://federation.trknow.com/adfs/services/trust</Issuer>
<samlp:Status><samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success"/></samlp:Status>
<EncryptedAssertion xmlns="urn:oasis:names:tc:SAML:2.0:assertion">
<xenc:EncryptedData Type="http://www.w3.org/2001/04/xmlenc#Element"
xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"><xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes256-cbc"/>
<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
<e:EncryptedKey xmlns:e="http://www.w3.org/2001/04/xmlenc#">
<e:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/></e:EncryptionMethod>
<KeyInfo>
<ds:X509Data xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:X509IssuerSerial>
<ds:X509IssuerName>CN=trknow-VERIFY-CA, DC=trknow, DC=local</ds:X509IssuerName>
<ds:X509SerialNumber>serial_number</ds:X509SerialNumber>
</ds:X509IssuerSerial>
</ds:X509Data>
</KeyInfo>
<e:CipherData>
<e:CipherValue>ciphervalidi/A==</e:CipherValue>
</e:CipherData>
</e:EncryptedKey>
</KeyInfo>
<xenc:CipherData>
<xenc:CipherValue>*truncated*sva2kFMnlfrnfF4Zxd2XRCg6UW4cjrEqpjlR1oaqZrc3EwTAaaHh9Ta7U7T27Q8iPNBq9VRjjW5RcE8mrRCCGThXpeAcEkF5cw9BZ+JCz2QVEpb4Ul6iJVybe1lwA9uaEBimebH+c1hBM9vo3SOAQ=</xenc:CipherValue>
</xenc:CipherData>
</xenc:EncryptedData>
</EncryptedAssertion>
</samlp:Response>
Вы можете увидеть детали не предоставлены. Теперь вот мои правила для утверждений: сначала снимок, а затем язык правил: Нажмите для рисунка требований: обзор
1) Email2Email
c:[Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname", Issuer == "AD AUTHORITY"]
=> issue(store = "Active Directory", types = ("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"), query = ";mail;{0}", param = c.Value);
2) Email2NameID
c:[Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname", Issuer == "AD AUTHORITY"]
=> issue(store = "Active Directory", types = ("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier"), query = ";mail;{0}", param = c.Value);
3) ФИО
c:[Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname", Issuer == "AD AUTHORITY"]
=> issue(store = "Active Directory", types = ("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname", "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname"), query = ";sn,givenName;{0}", param = c.Value);
4) memberOfGroup
c:[Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname", Issuer == "AD AUTHORITY"]
=> issue(store = "Active Directory", types = ("http://schemas.xmlsoap.org/claims/Group"), query = ";memberOf;{0}", param = c.Value);
5) SID группы
c:[Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/groupsid"]
=> issue(claim = c);
Вот мои критерии поиска и фильтрации LDAP. Попытка отразить это с помощью правил утверждений ADFS:
managerDn = 'CN=Site LDAP Service Account,CN=Managed Service Accounts,DC=trk,DC=trknow,DC=com'
managerPassword = 'password'
server = 'ldap://tstrodc01.trk.trknow.com:389'
groupSearchBase = 'ou=Stations,dc=trk,dc=trknow,dc=com'
search.base = 'dc=trk,dc=trknow,dc=com'
search.filter= '(sAMAccountName={0})'