CAS 5.2.7 - inline groovy attributes

69 views
Skip to first unread message

magicserverpixiedust

unread,
Sep 17, 2018, 1:50:33 PM9/17/18
to CAS Community
https://apereo.github.io/cas/5.2.x/integration/Attribute-Release-Policies.html#inline-groovy-attributes

We are using 5.1.4 in production and 5.2.7 in test.  Noticed an issue in 5.2.7 with inline groovy attributes.

"uid" : "groovy { return attributes['uid'] + ' is great' }"

For example, this returns "piper is great" for an attribute value in 5.1.4 but returns multi-value "piper" and " is great" in 5.2.7.  

< --- 5.1.4 --- >
<saml2:Attribute FriendlyName="urn:oid:1.3.6.1.4.1.5923.1.1.1.6" Name="urn:oid:1.3.6.1.4.1.5923.1.1.1.6"> <saml2:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xsd:string">xavtrix@domain.edu </saml2:AttributeValue> </saml2:Attribute>

< ---- 5.2.7 ---- >
<saml2:Attribute FriendlyName="urn:oid:1.3.6.1.4.1.5923.1.1.1.6" Name="urn:oid:1.3.6.1.4.1.5923.1.1.1.6" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"> <saml2:AttributeValue>xavtrix</saml2:AttributeValue> <saml2:AttributeValue>@domain.edu</saml2:AttributeValue> </saml2:Attribute>

Anyone else using inline groovy attributes come across this during their CAS updates?  Been trying different things for a fix so I can roll 5.2.7 into production. Thanks,  

Martin Böhmer

unread,
Dec 7, 2018, 3:31:56 PM12/7/18
to CAS Community
Experienced the same behavior with CAS 5.2. This is what did the trick:

"fullName" : "groovy { return attributes['firstName'][0] + ' ' + attributes['lastName'][0] }"
Code hier eingeben...

Reply all
Reply to author
Forward
0 new messages