mirror of
https://github.com/allaunthefox/SilverSight.git
synced 2026-07-31 01:25:21 +00:00
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:
parent
9f2d4011de
commit
2bc7629bf9
1 changed files with 8 additions and 32 deletions
|
|
@ -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]}")
|
||||
print("Restored credentials-only auth. SSO is handled by Caddy/Authentik outpost.")
|
||||
|
||||
conn.close()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue