> @Lorenzo: Try adding the name2oid attribute map, possibly even
> globally to your config.php file.
I did but didn't notice any difference.
When I do an authentication test from SSP admin section I see the AD LDAP data about the user (displayName, cn, distinguishedName, pwdLastSet...). In the AuthData section I see the same, in PHP format:
{
"Attributes": {
"objectClass": [
"top",
"person",
"organizationalPerson",
"user"
],
"cn": [
"Lorenzo Milesi"
],
"sn": [
"Milesi"
],
"givenName": [
"Lorenzo"
],
"instanceType": [
"4"
],
"whenCreated": [
"20210611211848.0Z"
],
"displayName": [
"Lorenzo Milesi"
],
....
As per Shibboleth SP I still don't get any attribute.
How do I know if the filter has been processed? This is my metadata/saml20-idp-hosted.php
$metadata['__DYNAMIC:1__'] = [
'host' => '__DEFAULT__',
'privatekey' => 'auth.domain.com.key',
'certificate' => 'auth.domain.com.crt',
'auth' => 'my-ad',
'authproc' => [
50 => [
'class' => 'ldap:AttributeAddFromLDAP',
'attributes' => ['mail'],
'search.filter' => '(mail=%mail%)',
'authsource' => 'my-ad',
],
51 => [
'class' => 'core:AttributeMap',
'name2urn', 'name2oid',
'%duplicate',
],
52 => [
'authsource' => 'my-ad',
'class' => 'ldap:AttributeAddUsersGroups',
'ldap.product' => 'ActiveDirectory'
],
],
];
for the record I don't even see the group attributes (52) when testing auth.
I enabled debug in config but I only get this:
Jul 20 12:40:28 varie simplesamlphp[2496953]: 7 [c415386035] Library - LDAP __construct(): Setup LDAP with host='
dc1.domain.com', tls=true, debug=false, timeout=0, referrals=false
Jul 20 12:40:28 varie simplesamlphp[2496953]: 7 [c415386035] Library - LDAP bind(): Bind successful with DN 'CN=authuser,OU=Users,DC=domain,DC=com'
Jul 20 12:40:28 varie simplesamlphp[2496953]: 7 [c415386035] Library - LDAP search(): Searching base (subtree) 'OU=Users,DC=domain,DC=com' for
'(|(sAMAccountName=lorenzo.milesi)(mail=lorenzo.milesi))'
Jul 20 12:40:28 varie simplesamlphp[2496953]: 7 [c415386035] Library - LDAP bind(): Bind successful with DN 'CN=Lorenzo Milesi,OU=Users,DC=domain,DC=com'
Jul 20 12:40:28 varie simplesamlphp[2496953]: 7 [c415386035] Library - LDAP getAttributes(): Getting all attributes from DN 'CN=Lorenzo Milesi,OU=Users,DC=domain,DC=com'
Jul 20 12:40:28 varie simplesamlphp[2496953]: 7 [c415386035] Library - LDAP getAttributes(): Found attributes '(objectClass,cn,sn,givenName,instanceType,whenCreated,displayName,uSNCreated,name,objectGUID,badPwdCount,codePage,countryCode,badPasswordTime,lastLogoff,lastLogon,primaryGroupID,objectSid,accountExpires,logonCount,sAMAccountName,sAMAccountType,userPrincipalName,objectCategory,mail,userAccountControl,pwdLastSet,lastLogonTimestamp,whenChanged,uSNChanged,distinguishedName)'
Jul 20 12:40:28 varie simplesamlphp[2496953]: 5 STAT [c415386035] User 'lorenzo.milesi' successfully authenticated from 2001:470:26:119:8f:acd:cb25:9167
Jul 20 12:40:28 varie simplesamlphp[2496953]: 7 [c415386035] Deleting state: '_bcc68c37582eb947f6e95b4957ac082672eca743f8'
Jul 20 12:40:28 varie simplesamlphp[2496953]: 7 [c415386035] Session: doLogin("my-ad")
Jul 20 12:40:28 varie simplesamlphp[2127134]: 7 [c415386035] Session: Valid session found with 'my-ad'.
Jul 20 12:40:28 varie simplesamlphp[2127134]: message repeated 2 times: [ 7 [c415386035] Session: Valid session found with 'my-ad'.]
Jul 20 12:40:28 varie simplesamlphp[2127134]: 7 [c415386035] Localization: using old system
Jul 20 12:40:28 varie simplesamlphp[2127134]: 7 [c415386035] Session: Valid session found with 'my-ad'.
Jul 20 12:40:28 varie simplesamlphp[2127134]: 7 [c415386035] Translate: Reading dictionary [/var/www/simplesamlphp/dictionaries/status]
Jul 20 12:40:28 varie simplesamlphp[2127134]: 7 [c415386035] Translate: Reading dictionary [/var/www/simplesamlphp/dictionaries/attributes]