You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shiro.apache.org by "Art O Cathain (JIRA)" <ji...@apache.org> on 2013/05/20 17:17:15 UTC

[jira] [Updated] (SHIRO-442) CAS client fails with multi-valued SAML attributes

     [ https://issues.apache.org/jira/browse/SHIRO-442?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Art O Cathain updated SHIRO-442:
--------------------------------

    Attachment: shiro-cas-saml.patch
    
> CAS client fails with multi-valued SAML attributes
> --------------------------------------------------
>
>                 Key: SHIRO-442
>                 URL: https://issues.apache.org/jira/browse/SHIRO-442
>             Project: Shiro
>          Issue Type: Bug
>          Components: Authorization (access control) 
>    Affects Versions: 1.2.1
>            Reporter: Art O Cathain
>             Fix For: 1.2.3
>
>         Attachments: shiro-cas-saml.patch
>
>
> When using org.apache.shiro.cas.CasRealm, if the SAML returned by CAS contains multiple attributes of the same name (e.g. roles?), CasRealm blows up in doGetAuthorizationInfo
> String value = attributes.get(attributeName);
>  with
> java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.lang.String
> This is because the org.jasig.cas.client.validation.Saml11TicketValidator is populating the attributes in the
> principal as follows:
> personAttributes.put(samlAttribute.getName(), values.size() == 1 ? values.get(0) : values);
> See attached patch for a fix

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira