Micho Rizo
Micho Rizo

Reputation: 1092

CAS LDAP and database query

I have a user authenticated against LDAP using CAS. I now have the UID. Is it possible to use CAS to also query an oracle database using the UID to get other user attributes stored from oracle?

I've tried to use SingleRowJdbcPersonAttributeDao class in my bean but I can't get any attributes to release from it ... I'm not even sure if the query is being executed.

Upvotes: 1

Views: 187

Answers (1)

Misagh Moayyed
Misagh Moayyed

Reputation: 4318

Yes. authentication in CAS is different from attribute retrieval. You can authenticate via one source, and get attributes from another. Authentication is handled via authN handlers, and attribute retrieval is handled via attribute repositories.

Once you have retrieved attributes, you need to configure your service definition to release those attributes. You need to define an attribute policy that authorizes the release of all or select attributes.

See http://jasig.github.io/cas/4.1.x/integration/Attribute-Release.html

Upvotes: 1

Related Questions