Active
Project:
CAS Attributes
Version:
7.x-1.x-dev
Component:
CAS Attributes
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
22 Jun 2011 at 18:35 UTC
Updated:
15 Feb 2013 at 22:47 UTC
We should strive to ensure the module is compatible with Profile 2.
I haven't done any testing, but I assume there is currently no support.
Comments
Comment #1
aanjaneyam commentedThis is what I was looking for. I have a profile2 user profile type on cas server (where the accounts are created) I need to duplicate the same profile type on cas client with profile2 attributes mapped from cas server to cas client. Is there currently any work around to do so.
Comment #2
olarin commentedI'm afraid there's no real "workaround", but if you're a developer and don't mind digging in with some custom code I can point you to where to start.
Building proper, generic Profile2 support into CAS Attributes isn't really a big technical challenge; the biggest hassle would be figuring out the cleanest way to lay out the admin interface for it. (In your case you could cheat and just hard-code the attribute to profile field relationships you need, but if you are ambitious enough to cook up a good generic solution, patches are more than welcome.)
Comment #3
aanjaneyam commentedThanks olarin for your detailed response. I will try to look at the cas module code to find out where and how I can add to it to be able to map my custom profile type fields to the cas user profile on client. It is actually profile2 to profile2 mapping. This solution has been a nightmare I have been spending days find a suitable way to map profile2 fields. I looked at feeds but was not sure how secure it is. I am at the moment battling with services/wsclient modules (using rules to set data). The REST service is set up correctly, it is only the client which is not connecting (wsclient does not provide even a way to enter user and password in UI for session authentication). The cas login session does not work services (between cas server and client). There are very few services client.
I have already implemented cas in my sites and it would be good if cas has the profile2 mapping feature. It will save people from hunting other places just for a solution to map profile2 fields. I don't think so that I am competent enough at coding to come up with a generic solution but I will definitely give a try to cheating. Is there a possibility that CAS developers can come up with a generic solution.
Comment #4
olarin commentedSomething I almost forgot to mention - CAS attributes aren't a very secure way to pass user data unless the CAS Server is checking authentication clients against a whitelist, and only allowing your sites to authenticate (otherwise anyone else could set up their site to use your CAS Server to authenticate, and if they can trick people in to logging into their site using your CAS Server, they could collect those users' CAS attributes). The cas_server module does not yet have whitelisting support but there's a patch in the following issue which you can use: #1260588: CAS Server service whitelisting
Comment #5
bfroehle commentedOlarin: Yes, whitelisting is probably a good idea, but it isn't secure either. A malicious user could easily just spoof a valid hostname (using their /etc/hosts file) and the CAS server would have no idea.
In general you should ONLY send data which you are comfortable with the user knowing. The cas_server.api.php mentions this in the
hook_cas_server_user_attributes()method.Comment #6
aanjaneyam commentedI was looking at the possibilities with suggested method in #2. After looking at #4 and #5 I am now thinking if I should even try. In prepration of #2 I was still searching as to what to use to represent profiles object instead of $account (ex. $profiles or something else)??. Thanks
Comment #7
olarin commentedValid point about "malicious" users still being able to read their own attributes bfroehle, although my concern was about malicious third-party sites using social engineering to trick gullible users into logging into their site via the CAS server and thus the third party collecting that gullible user's attributes, which whitelisting should prevent (unless the third party has hacked the user's personal computer in which case that user probably has much bigger problems anyway). But yes, attributes should never be used for data which is to be kept secure from even the user themself. If you have really really sensitive data in these profiles, a Services or RestWS solution is probably the safer route to go.
Anyway, to get back to the original point of this issue: I'm not likely to have the time or inclination to pursue profile2 support for this module myself in the near future, given that there doesn't appear to be a huge wave of interest in it. Of course if someone else wants to give it a try, then as always, patches are welcome.