Hi Martin,
> On 29 Jan 2015, at 03:14 am, Martyn Bissett <
marty...@gmail.com> wrote:
> Thanks for the very detailed response, I'll explain a little more in detail if I didn't before. By the way, we don't store authentication details on the SP. For example, the SP does not store user passwords. But, each SP has fields (e.g. user settings, their role such members/ admin, display name etc - for that SP only) that are specific to that SP only. If we store all of that data on the IdP, for all SPs. which isn't related to authentication anyway, our IdP might become a little messy.
Yes, I assumed you were creating the accounts at the IdP, but thought that also the SP-specific attributes were there.
> On the SP side, the user is presented with a form. Upon submitting that form (username, password, email, and any additional fields such as display name for that SP app), the form action script on the SP side will first, via curl request, POST the username, password and email to the IdP POST script handler registering the user there.
There’s no way to make that work, you need to make the request front-channel. That also implies that the IdP would have some mechanism to: first, log you in after registration, and second, return to the URL that “posted” the registration form. Not very usable, I think…
> Once confirmation is returned to the SP side that the user has been added to the IdP, the an account is created on the SP side with any SP relevant fields such as display name. So just to summarize - authentication details are held on the IdP but some additional fields are stored on the SP linked by a unique username.
Ok, so you actually have automatic provisioning at the SP, sort of, at least. Why not doing that when the user accesses the SP for the first time? What happens with users that already have an account at the IdP, but not at an SP?
> So, when the user logins in - this is all done on the IdP side (user clicks login link, redirected to IdP login screen, enters credentials, redirected back to the SP and SSP cookie is created for the domain)
Yes, that’s absolutely correct.
> We are considering a single registration form on the IdP though. We could create default values for app specific fields, or we prompt em the first time they log in.
The latter is the way to go. You cannot register a user and all the attributes needed by all SPs, anyway, so why bothering at every single SP? Let the user register at the IdP, and then if something else is needed at a specific SP, ask for it.
> However, whether we have the user register via the SP using curl to POST to the IdP, or we do the alternative - we're still storing authentication details only on the IdP. And, we would still want to have user related information which is relevant to that SP app only and tied by unique identifier (such as username) on the SP I think.
Yes, and that’s absolutely legitimate, most service providers work like that. It just means you need to store data about your users at both sides (the IdP and the SPs).
> Anyway thanks again for your help. It would be great though if some means existed for automatically signing a user on, but I certainly don't want to jeopardize security in doing so, so I really appreciate your suggestion. If it doesn't currently exist in SSP, is it something that could be implemented? Or is the very SAML process and the means in which the IdP identifies users on different domains make it very difficult if not impossible?
No prob, glad to help!
The problem with security is that if you get your users accustomed to entering details like their password at places different than the IdP (that meaning, looking different, and having different domains), then it’s easier to trick them to give away their credentials. There’s also a different issue, which is your service providers actually getting the user’s password. When you perform registration at the SP (even if you are storing the account in the IdP), you are in a way breaking the trust model on which an identity federation relies.
AFAICT, you could use the selfregister module with SSP to allow users to register on their own. I don’t know if it logs you in automatically right after registration, though. If not, I guess that should be quite easy to implement, and I’m sure Dick Visser will be happy to include it in the module.
So to summarize, what I would do recommend you to do:
- All SPs delegate authentication *unconditionally* to the IdP. No “register here” link, just a login link.
- The IdP provides a “register here” link, pointing either to the selfregister module or to your home-made solution if that fits better your needs.
- When a user accesses an SP for the first time (being authenticated, of course), perform automatic provisioning.
- If the SP needs to store more information for its users, make it ask for it right after automatic provisioning.
Hope it helps. Just tell us if we can help you with anything else :-)