4.1 -> 5.2 upgrade PrincipalAttributeRegisteredServiceUsernameProvider

73 views
Skip to first unread message

Ian Wright

unread,
Oct 5, 2017, 7:33:59 AM10/5/17
to CAS Community
Working on an upgrade I'm having a problem where the non-default principal name is enclosed in square brackets i.e. with 4.1 I get m...@example.org, with 5.2 [m...@example.org]

For historical reasons I can't change the value of cas.authn.ldap[0].principalAttributeId as not all services can use the same value


In my 4.1 CAS configuration I have the following in deployerConfigContext.xml :

<property name="usernameAttributeProvider">
                                <bean
                                        class="org.jasig.cas.services.PrincipalAttributeRegisteredServiceUsernameProvider"
                                        c:usernameAttribute="mail" />
                        </property>

Using 5.2 I tried:

    "@class": "org.apereo.cas.services.PrincipalAttributeRegisteredServiceUsernameProvider",
    "canonicalizationMode": "NONE",
    "encryptUsername": false,
    "usernameAttribute": "mail"

and (despite not being able to work out how to do this in the cas-management app)

  "@class" : "org.apereo.cas.services.GroovyRegisteredServiceUsernameProvider",
  "groovyScript" : "groovy { return attributes['mail'] }",

Both give <cas:user> value in []

Thanks for any suggestions as to how I can get rid of the brackets

Misagh Moayyed

unread,
Oct 5, 2017, 12:44:14 PM10/5/17
to cas-...@apereo.org
What version of 5.2? 


--
- 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+u...@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/db792d2d-3634-413f-9e86-d17e5339389e%40apereo.org.

--
--Misagh
Message has been deleted

Misagh Moayyed

unread,
Oct 6, 2017, 8:32:18 AM10/6/17
to CAS Community
From: "Ian Wright" <ian.w...@well.ox.ac.uk>
To: "CAS Community" <cas-...@apereo.org>
Cc: "Misagh Moayyed" <mmoa...@unicon.net>
Sent: Friday, October 6, 2017 1:07:19 AM
Subject: Re: [cas-user] 4.1 -> 5.2 upgrade PrincipalAttributeRegisteredServiceUsernameProvider
5.2.0-RC3

Thanks

 


This email has been scanned for spam and viruses by Proofpoint Essentials. Click here to report this email as spam.



--
--Misagh
Reply all
Reply to author
Forward
0 new messages