Jeff,
Something like this ought to do what you are looking for (at least the AD/JDBC
part):
<bean id="attributeRepository"
class="org.jasig.services.persondir.support.MergingPersonAttributeDaoImpl">
<property name="personAttributeDaos">
<list>
<ref bean="attributeRepositoryAD" />
<ref bean="attributeRepositoryJdbc" />
</list>
</property>
<property name="merger">
<bean
class="org.jasig.services.persondir.support.merger.ReplacingAttributeAdder" />
</property>
</bean>
<bean id="attributeRepositoryAD"
class="org.jasig.services.persondir.support.ldap.LdapPersonAttributeDao">
<property name="contextSource" ref="adSource" />
<property name="baseDN" value="${cas.bind.ad.searchBase}" />
<property name="requireAllQueryAttributes" value="false" />
<property name="queryAttributeMapping">
<map>
<entry key="username" value="sAMAccountName" />
</map>
</property>
<property name="resultAttributeMapping">
<map>
<entry key="cn" value="name" />
<entry key="info" value="email" />
<entry key="title" value="title" />
<entry key="memberOf" value="group" />
<entry key="description" value="type" />
<entry key="objectGUID" value="GUID" />
<entry key="l" value="campus" />
</map>
</property>
</bean>
<bean id="attributeRepositoryJdbc"
class="org.jasig.services.persondir.support.jdbc.MultiRowJdbcPersonAttributeDao">
<constructor-arg index="0" ref="mysqlDataSource" />
<constructor-arg index="1" value="SELECT * FROM USER_DATA WHERE {0}" />
<property name="nameValueColumnMappings">
<map>
<entry key="attr_name" value="attr_value" />
</map>
</property>
<property name="queryAttributeMapping">
<map>
<entry key="username" value="uid" />
</map>
</property>
<property name="resultAttributeMapping">
<map>
<entry key="uid" value="username" />
<entry key="first_name" value="first_name" />
<entry key="last_name" value="last_name" />
<entry key="email" value="email" />
<entry key="role" value="role" />
<entry key="campus" value="campus" />
</map>
</property>
</bean>
MySQL schema in use for the JDBC part is:
CREATE TABLE `USER_DATA` (
`uid` varchar(32) NOT NULL,
`attr_name` varchar(256) NOT NULL,
`attr_value` varchar(256) NOT NULL,
KEY `uid_indx` (`uid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
You may want to check out the different merger strategies at
http://developer.jasig.org/projects/person-directory/1.5.0-RC5/apidocs/org/jasig/services/persondir/support/merger/BaseAdditiveAttributeMerger.html.
Thanks
Paul Vitty
Apache/MySQL Web Platform Engineer
Information Services
University of Ulster
http://www.ulster.ac.uk
On 9 Sep 2011, at 02:28, Scott Battaglia wrote:
Jeff,
By using more of the PersonDirectory features (merging DAOs, etc.) you should
be able to do what you want:
https://wiki.jasig.org/display/PD/Home
Cheers,
Scott
On Thu, Sep 8, 2011 at 7:15 PM, Jeff Abernathy
<[email protected]<mailto:[email protected]>> wrote:
Hello,
I'm using CAS 3.4.10 with a functioning LDAP/AD Repository. I'm wondering two
things, and haven't found either in the documentation, nor through searches of
this list.
* Can you provide a SAML Response (attributes) with data from multiple
repositories, ie both an LDAP as well as perhaps a JDBC repository such as
MySQL?
* Can you provide attributes for the response which are static or
augmented, ie, for everyone I might want to respond with
InstitutionName=University or in an augmented scenario something like
fakeemail=%username% + "@testdomain.univ.edu<http://testdomain.univ.edu/>"
Thanks for your help!
Jeff Abernathy
________________________________
[http://www.slu.edu/Images/marketing_communications/logos/slu/slu_4c.gif]
Jeff
Abernathy
[email protected]<mailto:[email protected]>
314-977-2019<tel:314-977-2019>
Web
Portal Programmer
Information Technology Services
Saint
Louis University
ITS<http://www.slu.edu/its> | Saint
Louis University<http://www.slu.edu/>
________________________________
--
You are currently subscribed to
[email protected]<mailto:[email protected]> as:
[email protected]<mailto:[email protected]>
To unsubscribe, change settings or access archives, see
http://www.ja-sig.org/wiki/display/JSG/cas-user
--
You are currently subscribed to
[email protected]<mailto:[email protected]> as:
[email protected]<mailto:[email protected]>
To unsubscribe, change settings or access archives, see
http://www.ja-sig.org/wiki/display/JSG/cas-user
________________________________
This email and any attachments are confidential and intended solely for the use
of the addressee and may contain information which is covered by legal,
professional or other privilege. If you have received this email in error
please notify the system manager at [email protected] and delete this
email immediately. Any views or opinions expressed are solely those of the
author and do not necessarily represent those of the University of Ulster. The
University's computer systems may be monitored and communications carried out
on them may be recorded to secure the effective operation of the system and for
other lawful purposes. The University of Ulster does not guarantee that this
email or any attachments are free from viruses or 100% secure. Unless expressly
stated in the body of a separate attachment, the text of email is not intended
to form a binding contract. Correspondence to and from the University may be
subject to requests for disclosure by 3rd parties under relevant legislation.
The University of Ulster was founded by Royal Charter in 1984 and is registered
with company number RC000726 and VAT registered number GB672390524.The primary
contact address for the University of Ulster in Northern Ireland is,Cromore
Road, Coleraine, Co. Londonderry BT52 1SA
--
You are currently subscribed to [email protected] as:
[email protected]
To unsubscribe, change settings or access archives, see
http://www.ja-sig.org/wiki/display/JSG/cas-user