LongTermClipper preserving LDAP data #14
No reviewers
Labels
No labels
bug
Doing
Good first issue
Question
status -- need review
To Do
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: DGNum/django-allauth-ens#14
Loading…
Reference in a new issue
No description provided.
Delete branch "aureplop/archicubes_keep-ldap"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
And use it to check promo (instead of usernames comparison).
added 1 commit
Compare with previous version
@champeno @tbastian
Looks good to me. Maybe update the README?
To me, the major question is whether we want to handle that at django-allauth level, or at a higher level. Handling it in django-allauth means that every single webapp using it at ENS will replicate archicube's data, which looks bad (no easy "please change my password", etc.).
I'd rather advocate for an archicube's CAS, somewhere (phare? archi.eleves?), handling those accounts. Thus, the only thing we would have to handle at django-allauth's level would be the transition from a cas.eleves account to those new accounts.
We can limit the data to the entrance year when connections are disabled, and fetched again on successful authentication.
What do you want to say in the "please change my password" part ? With allauth, a user can reset (or set) without being connected.
If you don't want to keep hashed passwords, you can use the admin to switch the connections to another CAS (if so, creating a provider in this package would be welcomed).
This is a design decision, so I won't just implement that here, it deserves some discussion :) The "please change my password" was to point out that whenever a user wants to change their password, data replication across every django-allauth-enabled webapp forces them to change their password on every single instance, instead of having something centralized. Or am I missing something?
You're totally right! As a project maintainer, you could open other providers provided by allauth, e.g. OpenID.
If you wanna create a CAS for archis, guess who is gourou 😃
@champeno @mpepin @bclement and maybe others, I think this might be the right time to discuss how we want to handle that :)
I think this is a good design question but rather independent from the one we're addressing here. There can be a CAS for archicubes, and you may associate your account to this (future) third-party, but we will still need to handle the SPI CAS connexion and check whether it is still the same person or not. And the username disambiguation will be useful in any case.
Except if what you're talking about is a CAS of CAS, where the login process would be handled by a more global CAS, that itself handles the "SPI ou archicube" distinction, and outputs a single user connexion. But it doesn't sound to me like a good idea -- every project has its own way to handle archicubes (or not), not sure unifying it will really simplify things.
@champeno I was not talking about a CAS of CAS, and it indeed looks like a bad idea. I just probably misunderstood what the PR does :)
This exact MR is just for handling user disambiguation a better way than mine: I was doing it using the username (
champeno@18 != champeno@12
), @delobell proposes to do it storing the LDAP data in SocialAccount'sextra_data
, which is indeed better.My MR is globally to better use LDAP infos (with fewer queries), and invalidate SPI CAS <-> user association when the user has no more clipper account (so a new
champeno
will not inherit the account of the old one). It will be useful even if we create a new archicube CAS association later (though it will require specific work to handle the username policy)Actually, is that really what we want? Couldn't the test be on the presence of
ldap
inclipper_account.extra_data
and inextra_data
?(This is debatable, as it will result in a systematic database query if we do so)
Indeed, it's safer.
changed this line in version 2 of the diff
added 1 commit
534e0b18
- LongTermClipper preserving LDAP dataCompare with previous version
resolved all discussions
Ok, looks fine, I merge to my branch.
(Btw why did you modify your commit rather than making a new one? I had trouble checking the branch out after that :/)
merged
mentioned in commit
6e77b31e0d