-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add SSO auth #183
Comments
Hello, |
ah ya thats fair |
@karlomikus you mind if I take a stab at this? I want to run barassistant but sso is a must for me. I can add oidc. |
Sure, give it a go |
probably worth using |
@shotor, is there any forward momentum on implementing OIDC? I echo your sentiment that lack of OIDC is a blocker for deploying this. |
Adding my +1 to this. I'm attempting to consolidate all the services on my network with Authentik to reduce the number of logins my users need. |
There's an easier but clunky solution: Bar Assistant could be configured, not by default, to trust a specific HTTP header that contains the user logged in by SSO. For example, an Authentik proxy sets an There are UX drawbacks to this, but it's an easier development lift than a full ODIC implementation I'd imagine. I emphasize it should not do this by default because otherwise any external request could spoof authentication. But request proxied via the SSO strip out the header and manage it themselves, so it's safe in those scenarios. |
Another option, this one even simpler: add a config option to just automatically log in as a specific user. Then an SSO proxy can handle the authentication and Bar Assistant doesn't need to care. This results in one shared user, but it fits my use case just fine and I imagine other people too. I now have 12 of my network services in Authentik and Bar Assistant is the only straggler that I can't set up with SSO 😢 |
Assuming each Bar Assistant has their own ingredient/cocktail library, not having the separate libraries is the only drawback I see with this approach. I think it's a reasonable tradeoff though. The one thing that's been nagging me with this is if individual libraries aren't a thing and there aren't plans to have that be a feature then why is there native auth in the application in the first place? If there aren't reasons to tie certain datasets to specific users then there shouldn't be auth. At that point I see this as something like an it-tools situation where it just exists on the network for anyone to access and if you want to "secure" it you can but by default it's not a thing. I maybe be crazy for thinking this. |
A feature like SSO is not something you just add and it works. It requires ongoing maintenance and introduces potential issues that can be challenging to debug because it will heavily depend on user's infrastructure and setup. I'm not saying it will never come, but It's not a priority now, and I'm not interested in quick workarounds.
Not sure what you mean with this, but every user can have it's own ingredient shelf in existing bar, share his shelf or open and mange a new bar with his own cocktails. |
So let's recap options:
Of the options, the second one seems the best compromise: users desiring local authentication don't need to change Bar Assistant at all, and those who do want SSO don't need to change much. The flow would be:
An existing administrator would manage the SSO user's permissions, much as an admin today needs to manage other local users, because for all intents and purposes, an SSO user is a local user, just one who has a different authentication flow. Some useful tweaks to apply when a user is logged in via the HTTP header:
API users can whitelist the API endpoints in the SSO so just tokens are respected as they are today. |
I'm just revisiting this and am starting work on this now, didn't have time before.
Yes, the main burden is maintaining the security of the solution. OIDC libraries are however fairly mature and most of the maintenance will be updating the used library in case it has a security vulnerability. Proxy auth as proposed by @skjdghsdjgsdj is a bit trickier. You have to lock down the trusted proxy ips and I don't know what other considerations are needed. Case in point: An app I use just got updated to address a security vulnerability with their proxy auth implementation and to me the thing they changed seemed benign. I'm fine with maintaining a fork, so I'm going to just build it. Then you can see it and we can discuss it. If you like it, keep it,. @skjdghsdjgsdj That's a great comparison, and you're right about the implementation complexity being higher with OIDC. For me the more manageable security burden, the added flexibility of OIDC and my lack of experience with implementing proxy auth is why I favor that approach. If in the future someone wants to add proxy auth to it, then the User Creation on external auth feature may be re-used. I'll have to implement that for OIDC auth in any case. |
When you get to the point of testing it I will grab your fork and write the documentation that way it can merged in to @karlomikus's repo together. |
Update see draft PR: |
hi just wondering if you had any interest in supporting any sort of SSO
The text was updated successfully, but these errors were encountered: