Return uid in attribute list?

35 views
Skip to first unread message

Mike Osterman

unread,
Aug 14, 2019, 10:52:12 PM8/14/19
to cas-...@apereo.org
Hello,

We're new to "modern" CAS (moving from 3.x to 5.x), and have run into an issue. We configured an attribute release filter to return mail & uid:

"attributeReleasePolicy" : {
"@class" : "org.apereo.cas.services.ReturnAllowedAttributeReleasePolicy",
"allowedAttributes" : [ "java.util.ArrayList", [ "mail", "uid" ] ]
}

But for some reason, the response is coming back with only "mail" in the attribute list and the uid listed as property called "id":

principal=SimplePrincipal(id=username, attributes={mail=[user...@whitman.edu]}),requiredAttributes={}

I found this reference to the "principalIdAttribute" that states "By default, the principal id is NOT released as an attribute."

I can see where we have it listed as principalIdAttribute in our config:
cas.authn.ldap[0].principalAttributeId=uid

So I can see why it's mapping to the principal id and would not release by default, but I can't discern from the documentation how to change the default behavior to release it as part of the attribute list.

Any ideas?

Thank you,
Mike

Misagh Moayyed

unread,
Aug 15, 2019, 2:02:28 AM8/15/19
to CAS Community


So I can see why it's mapping to the principal id and would not release by default, but I can't discern from the documentation how to change the default behavior to release it as part of the attribute list.

Any ideas?

Have you looked at “principalIdAttribute”?


Perhaps:

"attributeReleasePolicy" : {
   "@class" : "org.apereo.cas.services.ReturnAllowedAttributeReleasePolicy",
   "allowedAttributes" : [ "java.util.ArrayList", [ "mail", "uid" ] ],
   “principalIdAttribute”: "uid"
}

Misagh Moayyed

unread,
Aug 15, 2019, 2:05:20 AM8/15/19
to CAS Community
Apologies for the rather quick response; I realize you have certainly looked at that flag and relevant page in the docs. I think you're only missing that construct in your release policy. My example should help, I hope.
Reply all
Reply to author
Forward
0 new messages