Atribut eduPersonTargetedId se používá pro persistentni a jednoznačnou identifikaci uživatele na daném SP v případech, kdy je nežádoucí aby SP dostával informace o identitě uživatele. Hodnota tohoto atributu by měla být unikátní pro různé SP. Shibboleth Service Provider 1.3 nepodporuje nativně potřebnou funkcionalitu. Tu je potřeba implementovat použitím skriptovacích možností u definici atributů.
V LDAPu se uživatelům přidělí atribut (říkejme mu třeba SPTID) obsahující dvojici - targetedID oddělené mezerou - „SP_ID TargetedID“, kde SP_ID je ID service providera a TargetedID je hodnota pro daný SP.
V konfiguračním souboru resolver.xml se nadefinuje:
<!-- This scriptlet aquires the value of the eduPersonTargetedID into an unscoped atribute _urn_for_SPTID_ --> <ScriptletAttributeDefinition id="_urn_for_SPTID_"> <DataConnectorDependency requires="directory"/> <Scriptlet><![CDATA[ Attributes attributes = dependencies.getConnectorResolution("directory"); Attribute serID = attributes.get("SPTID"); String value = ""; int index; for (int i = 0; serID != null && i < serID.size(); i++) { value = serID.get(i).toString(); if (value.startsWith(requester + " ")) { for (index = requester.length(); value.charAt(index) == ' ' && index < value.length(); index++) { } if (index >= value.length()) { // log the error and try next continue; } resolverAttribute.addValue(value.substring(index)); break; } } ]]> </Scriptlet> </ScriptletAttributeDefinition> <!-- This definition adds the required scope to the eduPersonTargetedID value gathered in _urn_for_SPTID_ --> <SimpleAttributeDefinition id="urn:mace:dir:attribute-def:eduPersonTargetedID" smartScope="scope.example.cz"> <AttributeDependency requires="_URN_for_SPTID_"/> </SimpleAttributeDefinition>