Attribute Repository using other than username

39 views
Skip to first unread message

Jeffrey Simpson

unread,
Jun 7, 2017, 4:22:15 PM6/7/17
to cas-...@apereo.org

I am trying to upgrade my CAS installation  from 3.5 to 5.1. 

I need to query a database for security roles.   The problem I am having is that they are not keyed on the user's username.  They are keyed on a id that we keep in LDAP.  I can get the LDAP authentication to return the ID fine but all of the AttributeRepositories seem to only take username as the input.  

In 3.5 I extended AbstractDefaultAttributePersonAttributeDao made it the attribute repository and on the constructor passed in a LdapPersonAttributeDao which I called to populate the attributes from LDAP.  Then got the ID out of them and did my query.


Is there a way to access the attributes from the Attribute Repositories? Any Ideas?

Jeffrey Simpson | Senior Software Engineer
Youth For Understanding USA
(p) 202.774.5266 (f) 202.588.7571

Misagh Moayyed

unread,
Jun 7, 2017, 4:31:56 PM6/7/17
to cas-...@apereo.org
I *think* I know what you did. Share the code somewhere and I should be able
to point out options. You will need to write code for this, I suspect, but
need to see working code before I can dig in further.

You are going to have to write code, that cascades queries. This is nothing
new to 5; it's an attribute repository thing. 5 does not expose this as an
option, thus the need for code.

--Misagh
--
- CAS gitter chatroom: https://gitter.im/apereo/cas
- CAS mailing list guidelines:
https://apereo.github.io/cas/Mailing-Lists.html
- CAS documentation website: https://apereo.github.io/cas
- CAS project website: https://github.com/apereo/cas
---
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/BN6PR1001MB2049C8C3645C904C343F3E2FB1CB0%40BN6PR1001MB2049.namprd10.prod.outlook.com.

simpson

unread,
Jun 8, 2017, 11:59:43 AM6/8/17
to CAS Community, mmoa...@unicon.net
Thanks for your reply.  I you can find my deployerConfigContext.xml and java file at the following links:


As you can see I used multiple Authenticators.

Thanks for your help.

Misagh Moayyed

unread,
Jun 9, 2017, 1:05:45 PM6/9/17
to CAS Community

I forget. Are you targetting 5.0 or 5.1?

 

--Misagh


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


=

Jeffrey Simpson

unread,
Jun 9, 2017, 3:59:29 PM6/9/17
to CAS Community

5.1 

thanks


Jeffrey Simpson | Senior Software Engineer
Youth For Understanding USA
(p) 202.774.5266 (f) 202.588.7571

From: cas-...@apereo.org <cas-...@apereo.org> on behalf of Misagh Moayyed <mmoa...@unicon.net>
Sent: Friday, June 9, 2017 1:05:42 PM
To: CAS Community
Subject: RE: [cas-user] Attribute Repository using other than username
 
--
- CAS gitter chatroom: https://gitter.im/apereo/cas
- CAS mailing list guidelines: https://apereo.github.io/cas/Mailing-Lists.html
- CAS documentation website: https://apereo.github.io/cas
- CAS project website: https://github.com/apereo/cas
---
You received this message because you are subscribed to a topic in the Google Groups "CAS Community" group.
To unsubscribe from this topic, visit https://groups.google.com/a/apereo.org/d/topic/cas-user/umVN55tw-DY/unsubscribe.
To unsubscribe from this group and all its topics, 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/010b01d2e142%24a03cb570%24e0b62050%24%40unicon.net.

Misagh Moayyed

unread,
Jun 9, 2017, 4:45:32 PM6/9/17
to cas-...@apereo.org

You can inject your own bean definition into the context with the following signature:

 

https://github.com/apereo/cas/blob/5.1.x/core/cas-server-core-authentication/src/main/java/org/apereo/cas/config/CasPersonDirectoryConfiguration.java#L63

 

Construct the list with your own and stuff your repository impl into it.

 

--Misagh

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/BN6PR1001MB204900EB68DBB48D2B470556B1CE0%40BN6PR1001MB2049.namprd10.prod.outlook.com.

Reply all
Reply to author
Forward
0 new messages