diff --git a/scripts/configure_homarr_oidc.py b/scripts/configure_homarr_oidc.py index 9b4c3c9e..acad6a88 100644 --- a/scripts/configure_homarr_oidc.py +++ b/scripts/configure_homarr_oidc.py @@ -1,44 +1,20 @@ #!/usr/bin/env python3 -"""Configure Homarr OIDC by inserting into the database.""" +"""Restore Homarr auth to credentials-only. SSO is handled at the Caddy/Authentik outpost level.""" import sqlite3, json conn = sqlite3.connect("/home/allaun/.local/share/containers/storage/volumes/homarr-data/_data/db/db.sqlite") auth_config = { "json": { - "oidcProviders": [ - { - "displayName": "Authentik", - "clientId": "homarr", - "clientSecret": "insecure-homarr-secret-change-me", - "issuer": "http://100.92.88.64:9090/application/o/homarr/", - "discoveryUrl": "http://100.92.88.64:9090/application/o/homarr/.well-known/openid-configuration", - "callbackUrl": "http://homarr.neon.lan:9092/api/auth/callback/authentik", - "enabled": True, - } - ], - "providers": ["credentials", "oidc"], + "providers": ["credentials"], } } -try: - conn.execute( - "INSERT INTO serverSetting (setting_key, value) VALUES (?, ?)", - ("authentication", json.dumps(auth_config)), - ) - conn.commit() - print(f"Inserted OIDC config: {json.dumps(auth_config, indent=2)}") -except sqlite3.IntegrityError: - conn.execute( - "UPDATE serverSetting SET value = ? WHERE setting_key = ?", - (json.dumps(auth_config), "authentication"), - ) - conn.commit() - print("Updated existing authentication config") - -# Verify -row = conn.execute("SELECT value FROM serverSetting WHERE setting_key = 'authentication'").fetchone() -if row: - print(f"\nVerified: {row[0][:200]}") +conn.execute( + "UPDATE serverSetting SET value = ? WHERE setting_key = ?", + (json.dumps(auth_config), "authentication"), +) +conn.commit() +print("Restored credentials-only auth. SSO is handled by Caddy/Authentik outpost.") conn.close()