Single Sign in for Home Assistant now possible with OpenID (github.com)
from Lem453@lemmy.ca to selfhosted@lemmy.world on 17 Mar 04:40
https://lemmy.ca/post/61915657

This is a hugely requested feature for many years and a huge hole in my entire self hosted ecosystem. Every self-hosted app I have connects to my Authentik system for user management… Except home assistant. Arguably one of the apps I need it for the most for the whole family to use with their accounts.

Devs have been resistant for some reason.

There is now a community integratation that allows user management for HA to be via any openID backend (authentik, keycloak etc).

I’ve been running it for a few days and it works perfectly. Very easy to setup if you already have a working authentik setup and know how to use it with other apps like immich.

#selfhosted

threaded - newest

Flipper@feddit.org on 17 Mar 05:28 next collapse

If i created a service I would go in the opposit direction. Only offer SSO and no other option.

You loose quite a bit of complexity that way.

Lem453@lemmy.ca on 17 Mar 05:29 next collapse

There are auth libraries that you can just plug into your app so you don’t even have to worry about that part yourself and just focus on the app

authjs.dev/getting-started

Flipper@feddit.org on 17 Mar 06:23 collapse

By default, the Credentials provider does not persist data in the database. However, you can still create and save any data in your database, you just have to provide the necessary logic, eg. to encrypt passwords, add rate-limiting, add password reset functionality, etc.

That is exactly the complexity I wouldn’t want. With just SSO it is enough to send a redirect URL to the browser and on the callback set a cookie. No js needed. If your service gets compromised and someone leeks the credentials, just log everyone out.

irotsoma@piefed.blahaj.zone on 17 Mar 07:54 collapse

Problem is requiring a browser if it’s not primarily a web interface. Even if initial setup is web-based, a lot of times background processes exist that don’t traverse the internet, especially in higher security situations, so exposing those components to the internet just to get external credentials is not worth it, so then an additional proxying component is required. Anyway, the idea is that it can add a significant amount of complexity if it’s something more complex than a simple, single component web application.

illusionist@lemmy.zip on 17 Mar 06:29 collapse

I would hate it if google and apple would be the sole identity providers. If they lock me out, I’m lost. That’s what a majority of people do. And services have the power to choose the identity provider. Most offer only that and that’s horrible.

Flipper@feddit.org on 17 Mar 06:42 collapse

I should have been more clear.

I meant for self hosting.

Though realistically, even if the service is provided for the public, you could just use an instance of keycloak or something similar with open registration. That’s what an association I’m close to is doing already.

illusionist@lemmy.zip on 17 Mar 07:08 collapse

I see you. There are spillover effects. If we don’t use and support passwords, others wont either.

It’s not even that my government provides the identity but a foreign, autocratic, power hungry company for most people

boatswain@infosec.pub on 17 Mar 11:30 collapse

With keycloak you can have a single local password to all your selfhosted apps: you sign in to keycloak, then you sso into everything else from there. I’m building that out on my homelab right now, and it’s working fine.

magic_smoke@lemmy.blahaj.zone on 17 Mar 11:54 next collapse

Haven’t touched HA yet but I run FreeIPA, is there an LDAP option or will I have to get an open I’d solution go sit in front of it?

Lem453@lemmy.ca on 17 Mar 19:22 collapse

I’ve not looked for an LDAP solution but stuff like this is why i went with authentik over other solutions. Because authentik has LDAP built in, i can use this when needed (jellyfin) but then use openid for other apps (which us superior in almost every way for home lab use)

magic_smoke@lemmy.blahaj.zone on 17 Mar 20:02 collapse

(which us superior in almost every way for home lab use)

In which ways? Not disagreeing just a huge fan of the ability to handle Linux users, groups and policy like hbac, ssh keys, and sudoer rules.

Honestly if I could get ansible to dynamically create inventories from host groups I’d be set.

node815@lemmy.world on 17 Mar 12:29 next collapse

I’ve been using this for several months, it works very well with Pocket ID. :)

Strit@lemmy.linuxuserspace.show on 17 Mar 12:40 next collapse

Everything still needs to be set in configuration.yaml. right? I see nothing that inidcates that it’s possible to set up from the UI yet.

Lem453@lemmy.ca on 17 Mar 19:23 collapse

Yes its config file only, but if you get the File editor app, it’s quite easy to just copy and paste a few lines into the editor.

Once it’s setup it never changes.

glizzyguzzler@piefed.blahaj.zone on 17 Mar 15:08 collapse

Do you know of how it compares to the option that’s been around for a while? https://github.com/christiaangoossens/hass-oidc-auth

I see they say “seamless”; the extant one requires a different landing page and it doesn’t remember logged in browser well. So on the face of it, this sounds better.

But the one linked has had many more eyes and is made by the person who made a big stink on the forums https://community.home-assistant.io/t/open-letter-for-improving-home-assistants-authentication-system-oidc-sso/494223

For the ease teased, I’ll prob check it out though