benadida / helios-server

Helios server
http://heliosvoting.org
Apache License 2.0
721 stars 343 forks source link

github authentication flow #316

Closed lizthegrey closed 3 years ago

lizthegrey commented 3 years ago

See #315

lizthegrey commented 3 years ago

@benadida do I understand correctly that I could provide a list of github usernames instead of emails for a voter roll once this is enabled, and it should just work? or is there more to the process of authenticating voters?

I do see something for set_eligibility e.g. against a LDAP class in the clever auth method, but instead we want to provide a set list of github user IDs that can vote, and give them the link to login in and vote. Our voter rolls don't neatly correspond 1:1 to github org membership, sadly :(

lizthegrey commented 3 years ago

Basically it looks like there's a way to stub people who don't yet have helios accounts with passworded users eg https://github.com/benadida/helios-server/blob/9308a72e2932987051edcf5344315b17b9c6501b/helios/models.py#L864

but there's no way to create a fake User(user_type='github', user_id=github_username) when creating voter rolls if I'm reading this correctly

lizthegrey commented 3 years ago

https://github.com/benadida/helios-server/blob/9308a72e2932987051edcf5344315b17b9c6501b/helios/models.py#L806 only creates username, password entries. preferences on how I change the bulk upload function to allow uploading loginmethod:username user types instead of emails?

benadida commented 3 years ago

@lizthegrey you are correct, there's no UX for creating an approved list of Github users as voters. I think it should be possible to do by manually creating those voters in the database. Are you planning on using your own install or the official one?