Hi,

I'm having an issue with getting AUP working in CAS 5.2.4.  Actually, it 
works fine except when the user accepts the policy an error occurs.  If I 
manually change the attribute then the user can sign in with no issue.

The error happens when LdapUtils attempts to modify the attribute.

2018-05-02 20:45:47,284 DEBUG 
[org.apereo.cas.aup.AbstractPrincipalAttributeAcceptableUsagePolicyRepository] 
- <Principal attributes found for [paul.d.mitchell@****] are 
[{businessCategory=false, cn=P
aul Mitchell, displayName=Paul Mitchell, givenName=Paul, 
mail=paul.d.mitchell@****, objectClass=[top, inetOrgPerson, person, 
organizationalPerson], sn=Mitchell, uid=[***]}]>
2018-05-02 20:45:47,284 DEBUG 
[org.apereo.cas.aup.AbstractPrincipalAttributeAcceptableUsagePolicyRepository] 
- <Evaluating attribute value [[false]] found for [businessCategory]>
2018-05-02 20:45:47,285 WARN 
[org.apereo.cas.aup.AbstractPrincipalAttributeAcceptableUsagePolicyRepository] 
- <Usage policy has not been accepted by [paul.d.mitchell@***]>
2018-05-02 20:45:51,164 DEBUG 
[org.apereo.cas.aup.LdapAcceptableUsagePolicyRepository] - <Updating 
[uid=pmitche2,ou=*****]>
2018-05-02 20:45:51,181 ERROR 
[org.apereo.cas.aup.LdapAcceptableUsagePolicyRepository] - 
<java.util.ArrayList cannot be cast to java.util.Set>
java.lang.ClassCastException: java.util.ArrayList cannot be cast to 
java.util.Set
        at 
org.apereo.cas.util.LdapUtils.lambda$executeModifyOperation$0(LdapUtils.java:366)
 
~[cas-server-support-ldap-core-5.2.4.jar!/:5.2.4]
        at 
java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) 
~[?:1.8.0_151]
        at 
java.util.HashMap$EntrySpliterator.forEachRemaining(HashMap.java:1696) 
~[?:1.8.0_151]
        at 
java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) 
~[?:1.8.0_151]
        at 
java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) 
~[?:1.8.0_151]
        at 
java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) 
~[?:1.8.0_151]
        at 
java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) 
~[?:1.8.0_151]
        at 
java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) 
~[?:1.8.0_151]
        at 
org.apereo.cas.util.LdapUtils.executeModifyOperation(LdapUtils.java:367) 
~[cas-server-support-ldap-core-5.2.4.jar!/:5.2.4]
        at 
org.apereo.cas.aup.LdapAcceptableUsagePolicyRepository.submit(LdapAcceptableUsagePolicyRepository.java:52)
 
~[cas-server-support-aup-ldap-5.2.4.jar!/:5.2.4]
....



After manually changing it.
2018-05-02 20:54:39,272 DEBUG 
[org.apereo.cas.aup.AbstractPrincipalAttributeAcceptableUsagePolicyRepository] 
- <Evaluating attribute value [[true]] found for [businessCategory]>
2018-05-02 20:54:39,273 DEBUG 
[org.apereo.cas.aup.AbstractPrincipalAttributeAcceptableUsagePolicyRepository] 
- <Usage policy has been accepted by [paul.d.mitchell@****]>

Regards,
Paul.

-- 
- 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 cas-user+unsubscr...@apereo.org.
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/3d30eb31-183a-4124-b62e-c0bafe4e1bd2%40apereo.org.

Reply via email to