Skip to content

[Feature]: SSO Support (User Creation and Login) #1490

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
fservida opened this issue Jan 26, 2024 · 2 comments
Open

[Feature]: SSO Support (User Creation and Login) #1490

fservida opened this issue Jan 26, 2024 · 2 comments
Assignees
Labels
back end Requires back end dev work enhancement New feature or request front end Requires front end dev work investigation Research and/or prototyping before dev work ui/ux This issue requires UI/UX work

Comments

@fservida
Copy link
Contributor

fservida commented Jan 26, 2024

Context

In large organizations it is difficult to manually manage all users that should have access to an instance, and is generally good practice to assign users to groups with permissions to SSO in the required applications.
I've found some issue requests linked to this that have been closed, one of those: #244 was closed given that there is API support for adding users.
However my understanding is that this still does not allow SSO and whilst it might provide admins some kind of endpoint to more easily create users, the created users are still independent, with different login credentials than what the users normally expect, which is also not ideal in lots of enterprise developments.

I've not dug too much into the current auth structure of Btrix but have already had some project where I implemented SSO directly and indirectly and can take a look at it if somebody can give me some starting point.

What change would you like to see?

As a user I'd like to be able to simply login with my institutional credentials.

As an admin I'd like to be able to add users to groups depending on their role, and have them login to Btrix with SSO through SAML/OIDC either with direct support, or through header authentication with a front proxy handling SAML/OIDC.
User should be automatically created if needed and assigned to orgs automatically based on group membership.

Requirements

No response

Todo

No response

@fservida
Copy link
Contributor Author

fservida commented Jan 26, 2024

My understanding is that most of the login logic is here: https://github.com/webrecorder/browsertrix-cloud/blob/b252931c71a35f8cd2a1159935528ecd69115fe5/backend/btrixcloud/auth.py#L169C5-L229C41
I think I can quite easily work out a new endpoint (/#_sso ?) with different logic that would authenticate based on the headers passed in the request, as well as create the user and assign to Organizations depending on groups specified on the headers, as long as the request comes from a trusted proxy (else anyone could forge headers). On the login page would then need to add a button for sso login.

Implementing direct SSO is another story, but if you agree I could test and see if the above approach can be easily done.

@fservida fservida mentioned this issue Jan 27, 2024
9 tasks
@ikreymer
Copy link
Member

Thank you for working on this, yes, would be happy to accept the initial implementation. Will leave comments in the PR.

@Shrinks99 Shrinks99 moved this from Triage to Todo in Webrecorder Projects Feb 21, 2024
@emma-sg emma-sg added front end Requires front end dev work back end Requires back end dev work investigation Research and/or prototyping before dev work ui/ux This issue requires UI/UX work labels Feb 21, 2024
@emma-sg emma-sg added this to the v1.10.0 milestone Feb 21, 2024
@Shrinks99 Shrinks99 removed this from the v1.10.0 milestone Mar 6, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
back end Requires back end dev work enhancement New feature or request front end Requires front end dev work investigation Research and/or prototyping before dev work ui/ux This issue requires UI/UX work
Projects
Status: Todo
Development

No branches or pull requests

5 participants