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
|
#!/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(
|
||||||
conn.execute(
|
"UPDATE serverSetting SET value = ? WHERE setting_key = ?",
|
||||||
"INSERT INTO serverSetting (setting_key, value) VALUES (?, ?)",
|
(json.dumps(auth_config), "authentication"),
|
||||||
("authentication", json.dumps(auth_config)),
|
)
|
||||||
)
|
conn.commit()
|
||||||
conn.commit()
|
print("Restored credentials-only auth. SSO is handled by Caddy/Authentik outpost.")
|
||||||
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.close()
|
conn.close()
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue