You'll need to configure what the allowed attributes are. By default nothing is released...and you likely don’t need the attributeFilter because that only operates on attributes values, and not the names itself.
http://jasig.github.io/cas/4.0.0/integration/Attribute-Release.html 4.1 cleans up some of this. -----Original Message----- From: Richard Wiseman [mailto:richard.wise...@bt.com] Sent: Tuesday, August 5, 2014 6:43 AM To: cas-user@lists.jasig.org Subject: [cas-user] Java-sourced custom attributes not being released This is probably a simple configuration problem, but I have been searching around for ages and can't find out what I've done wrong! I've got some Java that checks user credentials in a custom way (they're stored in a database but I don't think that's relevant). My class extends AbstractJdbcUsernamePasswordAuthenticationHandler and the authenticateUsernamePasswordInternal method ends with: return createHandlerResult(credential, new SimplePrincipal(username, attributes), null); The "attributes" variable is a HashMap<String,Object> that I populate just beforehand. This class works (in that it correctly allows/denies access), but doesn't return any of my custom attributes. I've got the following inside the deployerConfigContext.xml's default RegexRegisteredService bean: <bean class="org.jasig.cas.services.RegexRegisteredService"> <property name="id" value="1" /> <property name="name" value="Allow HTTP(S)" /> <property name="description" value="Allows HTTP(S)" /> <property name="serviceId" value="^https?://.*" /> <property name="evaluationOrder" value="0" /> <property name="attributeFilter"> <bean class="org.jasig.cas.services.support.RegisteredServiceRegexAttributeFilter" c:regex="^\w+$" /> </property> </bean> (I'm confident that this bean is being used because I initially had the serviceId attribute's value without the question mark and so my non-HTTPS service wasn't allowed to use CAS.) So in summary, I was expecting some <cas:attribute name="..."> elements to appear in the <cas:serviceResponse ...> element, but they aren't for some reason. What have I missed, misunderstood or messed up? Thanks, Richard -- You are currently subscribed to cas-user@lists.jasig.org as: mmoay...@unicon.net To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user -- You are currently subscribed to cas-user@lists.jasig.org as: arch...@mail-archive.com To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user