1 260
szerkesztés
Módosítások
a
<BasicRule>
<AttributeValue>staff@niif.hu</AttributeValue> <AttributeValue>member@href.hu</AttributeValue>
</BasicRule>
<BasicRule> <Description>Create static attribute for some remote providers</Description> <Condition>
</Condition> <Attribute attributeName="homeOrganization">
</Attribute> </BasicRule>
<BasicRule>
<AttributeMatch attributeName="uid"/>
<AttributeValue>${uid}</AttributeValue>
</BasicRule>
<BasicRule>
<AttributeMatch attributeName="edupersonOrgDN" id="regex">o=(.*),c=(.*)</AttributeMatch>
<AttributeValue>${regex[1]}.${regex[2]}</AttributeValue>
</BasicRule>
<MergeRule>
<AttributeValue>${uid}@${homeOrganization}</AttributeValue>
</MergeRule>
<SplitRule>
<AttributeValue>${scopedAffiliation[1]}</AttributeValue>
<AttributeValue>${scopedAffiliation[2]}</AttributeValue>
</SplitRule>
<CustomRule className="org.test.MyCustomRuleImpl">
<!-- any xml here -->
</CustomRule>
→Attribute conversion rule types: correct XML indentation at examples
<source lang="xml">
<Description>Create static attribute (or append to existing if attribute with this name already exists)</Description>
<Attribute attributeName="eduPersonScopedAffiliation" replaceValues="false">
</Attribute>
</source>
<source lang="xml">
<RemoteProviderMatch>^urn:geant:edugain:be:[^:]+\.hu$</RemoteProviderMatch>
<AttributeValue>niif.hu</AttributeValue>
</source>
<source lang="xml">
<Description>Rename attribute uid to edupersonPrincipalName</Description>
<Condition>
</Condition>
<Attribute attributeName="edupersonPrincipalName">
</Attribute>
</source>
<source lang="xml">
<Decription>Transform 'o=org,c=country'-style OrgDN to DNS-based homeOrganization</Decription>
<Condition>
</Condition>
<Attribute attributeName="homeOrganization">
</Attribute>
</source>
This last example needs some more explanation. When you want to reference the regular expression matching groups (enclosed by parentheses), you must define the reference name with the 'id' parameter of <code>AttributeMatch</code>. Then, use <code>${id[0]}</code> to refer to the whole regular expression match (ie. the whole attribute value), and <code>${id[N]}</code> to refer to the Nth. matching group of the regular expression.
{{INFO_EN|You cannot reference other rule's regular expressionsfrom another rule.}}
=== MergeRule ===
<source lang="xml">
<Description>Merges the uid and homeOrganization to edupersonPrincipalName</Description>
<InputAttribute attributeName="homeOrganization" />
<InputAttribute attributeName="uid" />
<Attribute attributeName="edupersonPrincipalName" replaceValues="true">
</Attribute>
</source>
<source lang="xml">
<Description>Split the edupersonScopedAffiliation to edupersonAffiliation and homeOrganization</Description>
<InputAttribute attributeName="edupersonScopedAffiliation" id="scopedAffiliation" >^([^@]+)@(.+)$</InputAttribute>
<Attribute attributeName="edupersonAffiliation">
</Attribute>
<Attribute attributeName="homeOrganization">
</Attribute>
</source>
<source lang="xml">
<Configuration>
</Configuration>
</source>