„Shib2PersistentId” változatai közötti eltérés
(→Perzisztens attribútum feloldása) |
(→Perzisztens attribútum feloldása) |
||
46. sor: | 46. sor: | ||
<source lang="xml"> | <source lang="xml"> | ||
− | <resolver:AttributeDefinition id="persistentId" xsi:type="Simple" xmlns="urn:mace:shibboleth:2.0:resolver:ad"> | + | <resolver:AttributeDefinition id="persistentId" xsi:type="Simple" |
+ | xmlns="urn:mace:shibboleth:2.0:resolver:ad"> | ||
<resolver:Dependency ref="persistentIdConnector" /> | <resolver:Dependency ref="persistentIdConnector" /> | ||
− | <resolver:AttributeEncoder xsi:type="SAML2StringNameID" xmlns="urn:mace:shibboleth:2.0:attribute:encoder" | + | <resolver:AttributeEncoder xsi:type="SAML2StringNameID" |
− | + | xmlns="urn:mace:shibboleth:2.0:attribute:encoder" | |
+ | nameFormat="urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" /> | ||
</resolver:AttributeDefinition> | </resolver:AttributeDefinition> | ||
</source> | </source> |
A lap 2009. február 12., 16:20-kori változata
Tartalomjegyzék
[elrejtés]Perzisztens azonosító használata Shibboleth2 IdP esetén
Táblaszerkezet
CREATE TABLE `shibpid` (
`localEntity` varchar(200) NOT NULL,
`peerEntity` varchar(200) NOT NULL,
`principalName` varchar(200) NOT NULL,
`localId` varchar(200) NOT NULL,
`persistentId` varchar(200) NOT NULL,
`peerProvidedId` varchar(200) default NULL,
`creationDate` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`deactivationDate` timestamp NULL default NULL,
KEY `i_shibpid_pid` (`persistentId`),
KEY `i_shibpid_pid_date` (`persistentId`,`deactivationDate`),
KEY `i_shibpid_lid` (`localEntity`,`peerEntity`,`localId`),
KEY `i_shibpid_lid_date` (`localEntity`,`peerEntity`,`localId`,`deactivationDate`)
) ENGINE=MyISAM DEFAULT CHARSET=utf-8
Perzisztens attribútum feloldása
Az attribute-resolver.xml konfigurációs fájlban vegyük fel a következő DataConnectort illetve PrincipalConnectort:
<resolver:DataConnector xsi:type="StoredId"
xmlns="urn:mace:shibboleth:2.0:resolver:dc"
id="persistentIdConnector"
sourceAttributeID="uid"
generatedAttributeID="persistentId"
salt="valami-random-sztring">
<resolver:Dependency ref="myLDAP" />
<ApplicationManagedConnection jdbcDriver="com.mysql.jdbc.Driver"
jdbcURL=""
jdbcUserName=""
jdbcPassword="" />
</resolver:DataConnector>
<resolver:PrincipalConnector xsi:type="StoredId"
xmlns="urn:mace:shibboleth:2.0:resolver:pc" id="saml2Persistent"
nameIDFormat="urn:oasis:names:tc:SAML:2.0:nameid-format:persistent"
storedIdDataConnectorRef="persistentIdConnector" />
Definiáljuk a persistentId attribútumot:
<resolver:AttributeDefinition id="persistentId" xsi:type="Simple"
xmlns="urn:mace:shibboleth:2.0:resolver:ad">
<resolver:Dependency ref="persistentIdConnector" />
<resolver:AttributeEncoder xsi:type="SAML2StringNameID"
xmlns="urn:mace:shibboleth:2.0:attribute:encoder"
nameFormat="urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" />
</resolver:AttributeDefinition>
Perzisztens attribútum kódolása a SAML válaszba
Az attribute_filter.xml -ben meg kell adni hogy a frissen létrehozott persistentId attribútumot kiadja az SP-nek:
<AttributeFilterPolicy id="releaseNameIDToAnyone">
<PolicyRequirementRule xsi:type="basic:ANY" />
<AttributeRule attributeID="transientId">
<PermitValueRule xsi:type="basic:ANY" />
</AttributeRule>
<AttributeRule attributeID="persistentId">
<PermitValueRule xsi:type="basic:ANY" />
</AttributeRule>
</AttributeFilterPolicy>