fix: revert Homarr to credentials auth only

SSO is handled by Authentik outpost on racknerd Caddy at
auth.researchstack.info. Homarr sits behind this outpost and
only sees already-authenticated traffic from the public URL.
Direct access via tailnet port 7575 uses credentials.
This commit is contained in:
allaun 2026-06-30 05:28:50 -05:00
parent 9f2d4011de
commit 2bc7629bf9

View file

@ -1,44 +1,20 @@
#!/usr/bin/env python3 #!/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 import sqlite3, json
conn = sqlite3.connect("/home/allaun/.local/share/containers/storage/volumes/homarr-data/_data/db/db.sqlite") conn = sqlite3.connect("/home/allaun/.local/share/containers/storage/volumes/homarr-data/_data/db/db.sqlite")
auth_config = { auth_config = {
"json": { "json": {
"oidcProviders": [ "providers": ["credentials"],
{
"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"],
} }
} }
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( conn.execute(
"UPDATE serverSetting SET value = ? WHERE setting_key = ?", "UPDATE serverSetting SET value = ? WHERE setting_key = ?",
(json.dumps(auth_config), "authentication"), (json.dumps(auth_config), "authentication"),
) )
conn.commit() conn.commit()
print("Updated existing authentication config") print("Restored credentials-only auth. SSO is handled by Caddy/Authentik outpost.")
# Verify
row = conn.execute("SELECT value FROM serverSetting WHERE setting_key = 'authentication'").fetchone()
if row:
print(f"\nVerified: {row[0][:200]}")
conn.close() conn.close()