Hello,

I am trying to find a way to use attributes resolved by an LDAP repository
and pass them through to a Groovy repository in order to calculate/derive
additional attributes.  Does anyone know if this is possible?  We are
running CAS 6.5.8.

# LDAP repo
cas.authn.attribute-repository.ldap[0].order=0
cas.authn.attribute-repository.ldap[0].attributes.uid=uid
etc...

# Groovy repo
cas.authn.attribute-repository.groovy[0].order=1
cas.authn.attribute-repository.groovy[0].location=file:/etc/cas/config/groovy_scripts/attributes.groovy
cas.authn.attribute-repository.core.merger=ADD

Here is what the Groovy script gets as input:

2022-11-22 13:46:27,129 TRACE
[org.apereo.cas.util.scripting.ScriptingUtils] - <Creating groovy object
instance from class [/etc/cas/config/groovy_scripts/attributes.groovy]>
2022-11-22 13:46:27,145 TRACE
[org.apereo.cas.util.scripting.ScriptingUtils] - <Executing groovy script's
[run] method, with parameters [[jonathont, {principal=[jonathont],
credentialClass=[UsernamePasswordCredential], credentialId=[jonathont],
username=[jonathont]}, org.apache.logging.slf4j.Log4jLogger@650c2f75,
org.apereo.cas.configuration.CasConfigurationPr
operties@31354e86,
org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@2dc6350c,
started on Tue Nov 22 13:46:02 PST 2022, parent:
org.springframework.context.annotation.AnnotationConfigApplicationContext@23a01439
]]>

Thanks!

-- 
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/CABzqDo8zxPo62pm2HPL1av-q6cnnnkyx4-mYbfh1KUKj9z5Xvg%40mail.gmail.com.

Reply via email to