Skip to content

hass: log in only via id.lassul.us (auth_oidc) - #109

Merged
lassulus merged 2 commits into
masterfrom
hass-oidc
Oct 19, 2026
Merged

lassulus merged 2 commits into
masterfrom
hass-oidc

Conversation

@lassulus

Copy link
Copy Markdown
Owner

Already deployed to neoprism (Zitadel project hass, access=managed) and acheron. Password login removed via an empty auth_providers include (one-time line in the volume's configuration.yaml: auth_providers: !include auth_providers.yaml). Long-lived tokens keep working.

Hermes added 2 commits October 19, 2026 12:25
Zitadel project hass on neoprism with a public app (PKCE, no secret) and access = "managed": users get access via a user grant an admin gives in the id.lassul.us console. On acheron the auth_oidc custom component from nixpkgs is mounted into the Home Assistant container and configured via /config/packages, next to the username/password login.

modules.zitadel gets authMethod = "none" for public clients: reconcile generates no secret for them and writes only the client id to the env file, so nothing secret has to reach acheron.

Zitadel generates the client id, so it cannot be known at eval time on acheron. It is not secret; after neoprism is deployed it is copied from /var/lib/zitadel-apps/hass-web.env into the prompted hass-oidc var and passed to the container as HASS_OIDC_CLIENT_ID (!env_var in the yaml).

automatic_user_linking reuses the existing HA user whose username equals the preferred_username claim instead of creating a new one; it stays on because only users granted the project can log in. The groups scope is not requested since Zitadel has no groups claim.
Mounts an empty auth_providers list to /config/auth_providers.yaml. homeassistant: auth_providers is read only from configuration.yaml, packages can't set it, so the volume's configuration.yaml includes it once (auth_providers: !include auth_providers.yaml under homeassistant:). Without the homeassistant provider only auth_oidc remains: the welcome page redirects straight to id.lassul.us and no password form is offered.

Long-lived access tokens have no credential and are not checked against a provider, so they keep working. Refresh tokens from earlier password logins fail on the next refresh and need one id.lassul.us login. The password credentials stay in the auth store, so a revert brings the password login back.
@lassulus
lassulus enabled auto-merge (rebase) October 19, 2026 11:14
@lassulus
lassulus merged commit 5aa3fad into master Oct 19, 2026
9 checks passed
@lassulus
lassulus deleted the hass-oidc branch October 19, 2026 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant