cs:tech:attributes:subjectid

Rozdíly

Zde můžete vidět rozdíly mezi vybranou verzí a aktuální verzí dané stránky.

Odkaz na výstup diff

Obě strany předchozí revize Předchozí verze
Následující verze Obě strany příští revize
cs:tech:attributes:subjectid [2021/12/15 18:53]
Jan Oppolzer
cs:tech:attributes:subjectid [2021/12/15 19:43]
Jan Oppolzer [Poznámka]
Řádek 39: Řádek 39:
 <​AttributeDefinition xsi:​type="​Scoped"​ id="​samlSubjectID"​ scope="​%{idp.scope}">​ <​AttributeDefinition xsi:​type="​Scoped"​ id="​samlSubjectID"​ scope="​%{idp.scope}">​
     <​InputAttributeDefinition ref="​subjectIdHash"/>​     <​InputAttributeDefinition ref="​subjectIdHash"/>​
 +</​AttributeDefinition>​
 +
 +
 +
 +<​AttributeDefinition xsi:​type="​ScriptedAttribute"​ id="​samlSubjectHash"​ dependencyOnly="​true">​
 +    <​InputDataConnector ref="​myLDAP"​ attributeNames="​unstructuredName"/>​
 +    <​Script>​
 +        <​![CDATA[
 +            if (typeof unstructuredName != "​undefined"​ && unstructuredName != "​null"​ && unstructuredName.getValues().size()) {
 +                var digestUtils = Java.type("​org.apache.commons.codec.digest.DigestUtils"​);​
 +                var saltedHash = digestUtils.sha256Hex(unstructuredName.getValues().get(0) + "​%{idp.persistentId.salt}"​);​
 +                samlSubjectHash.addValue(saltedHash);​
 +        }
 +        ]]>
 +    </​Script>​
 +</​AttributeDefinition>​
 +
 +<​AttributeDefinition xsi:​type="​Scoped"​ id="​samlSubjectID"​ scope="​%{idp.scope}">​
 +    <​InputAttributeDefinition ref="​samlSubjectHash"/>​
 </​AttributeDefinition>​ </​AttributeDefinition>​
 </​code>​ </​code>​
Poslední úprava:: 2022/03/02 10:40